Skip to content

Commit 7fe3441

Browse files
KasinhouMatus Kasak
andauthored
TUL/Refactored playwright tests (#917)
* Refactored playwright tests for tul * Changed incorrect name of json file --------- Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk>
1 parent 993d0d1 commit 7fe3441

3 files changed

Lines changed: 45 additions & 64 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -58,39 +58,10 @@ jobs:
5858
./start.sh dspace-$INSTANCE
5959
6060
playwright-after-deploy6:
61-
runs-on: dspace-test-1
6261
needs: deploy-6
63-
timeout-minutes: 45
6462
if: '!inputs.IMPORT'
65-
steps:
66-
- name: Checkout Playwright tests
67-
uses: actions/checkout@v4
68-
with:
69-
repository: dataquest-dev/dspace-ui-tests
70-
path: dspace-ui-tests
71-
token: ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}
72-
73-
- name: Checkout main repository
74-
uses: actions/checkout@v4
75-
with:
76-
path: this-repository
77-
78-
- name: Copy customer config to UI tests repository for merging
79-
run: |
80-
cp this-repository/config/config.tul.ui.tests.json dspace-ui-tests/customer-constants/
81-
82-
- name: test
83-
working-directory: dspace-ui-tests/scripts
84-
env:
85-
HOME_URL: http://dev-5.pc:86/
86-
NAME: TUL
87-
run: |
88-
./test.sh
89-
90-
- uses: mazoea/ga-maz/end@master
91-
with:
92-
CHOWN_DIR: ./
93-
if: ${{ always() }}
63+
uses: ./.github/workflows/playwright-tests.yml
64+
secrets: inherit
9465

9566
rest-tests-after-deploy6:
9667
runs-on: ubuntu-latest
@@ -127,39 +98,10 @@ jobs:
12798
12899
129100
playwright-after-import6:
130-
runs-on: ubuntu-latest
131101
needs: import-6
132102
if: inputs.IMPORT
133-
timeout-minutes: 45
134-
steps:
135-
- name: Checkout Playwright tests
136-
uses: actions/checkout@v4
137-
with:
138-
repository: dataquest-dev/dspace-ui-tests
139-
path: dspace-ui-tests
140-
token: ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}
141-
142-
- name: Checkout main repository
143-
uses: actions/checkout@v4
144-
with:
145-
path: this-repository
146-
147-
- name: Copy customer config to UI tests repository for merging
148-
run: |
149-
cp this-repository/config/config.tul.ui.tests.json dspace-ui-tests/customer-constants/
150-
151-
- name: test
152-
working-directory: dspace-ui-tests/scripts
153-
env:
154-
HOME_URL: http://dev-5.pc:86/
155-
NAME: TUL
156-
run: |
157-
./test.sh
158-
159-
- uses: mazoea/ga-maz/end@master
160-
with:
161-
CHOWN_DIR: ./
162-
if: ${{ always() }}
103+
uses: ./.github/workflows/playwright-tests.yml
104+
secrets: inherit
163105

164106
rest-tests-after-import6:
165107
runs-on: ubuntu-latest
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Playwright tests
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
7+
jobs:
8+
playwright-tests:
9+
runs-on: dspace-test-1
10+
timeout-minutes: 45
11+
steps:
12+
- name: Checkout Playwright tests
13+
uses: actions/checkout@v4
14+
with:
15+
repository: dataquest-dev/dspace-ui-tests
16+
path: dspace-ui-tests
17+
token: ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}
18+
19+
- name: Checkout main repository
20+
uses: actions/checkout@v4
21+
with:
22+
path: this-repository
23+
24+
- name: Copy customer config to UI tests repository for merging
25+
run: |
26+
cp this-repository/config/config.tul.ui.tests.json dspace-ui-tests/customer-constants/
27+
- name: test
28+
working-directory: dspace-ui-tests/scripts
29+
env:
30+
HOME_URL: http://dev-5.pc:86/
31+
NAME: TUL
32+
run: |
33+
./test.sh
34+
- uses: mazoea/ga-maz/end@master
35+
with:
36+
CHOWN_DIR: ./
37+
if: ${{ always() }}

config/config.tul.ui.tests.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
"has_discojuice": false,
44
"has_whats_new": false,
55
"has_profile_and_logout_link": true,
6-
"can_create_item_test": "enabled",
7-
"author_has_one_field": false
6+
"has_resource_select": false,
7+
"has_contact_person": false,
8+
"has_license_select": false,
9+
"has_size_dropdown": false
810
},
911
"locators": {
1012
"title": "DSpace :: Home",

0 commit comments

Comments
 (0)