Skip to content

Commit 835664f

Browse files
KasinhouMatus Kasak
andauthored
ZCU-PUB/Refactored playwright tests (#916)
* Refactored playwright tests for zcu customer * Changed incorrect name of json file * Rename zcu to zcu-pub --------- Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk>
1 parent ab4d282 commit 835664f

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
@@ -64,39 +64,10 @@ jobs:
6464
docker compose --env-file $ENVFILE -p dspace-$INSTANCE -f docker/docker-compose.yml -f docker/docker-compose-rest.yml -f /opt/dspace-envs/4/extra.yml up -d --no-build
6565
6666
playwright-after-deploy4:
67-
runs-on: dspace-test-1
6867
needs: deploy-4
69-
timeout-minutes: 45
7068
if: '!inputs.IMPORT'
71-
steps:
72-
- name: Checkout Playwright tests
73-
uses: actions/checkout@v4
74-
with:
75-
repository: dataquest-dev/dspace-ui-tests
76-
path: dspace-ui-tests
77-
token: ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}
78-
79-
- name: Checkout main repository
80-
uses: actions/checkout@v4
81-
with:
82-
path: this-repository
83-
84-
- name: Copy customer config to UI tests repository for merging
85-
run: |
86-
cp this-repository/config/config.zcu.ui.tests.json dspace-ui-tests/customer-constants/
87-
88-
- name: test
89-
working-directory: dspace-ui-tests/scripts
90-
env:
91-
HOME_URL: http://dev-5.pc:84/
92-
NAME: ZCU
93-
run: |
94-
./test.sh
95-
96-
- uses: mazoea/ga-maz/end@master
97-
with:
98-
CHOWN_DIR: ./
99-
if: ${{ always() }}
69+
uses: ./.github/workflows/playwright-tests.yml
70+
secrets: inherit
10071

10172
rest-tests-after-deploy4:
10273
runs-on: ubuntu-latest
@@ -133,39 +104,10 @@ jobs:
133104
134105
135106
playwright-after-import4:
136-
runs-on: ubuntu-latest
137107
needs: import-4
138108
if: inputs.IMPORT
139-
timeout-minutes: 45
140-
steps:
141-
- name: Checkout Playwright tests
142-
uses: actions/checkout@v4
143-
with:
144-
repository: dataquest-dev/dspace-ui-tests
145-
path: dspace-ui-tests
146-
token: ${{ secrets.DEPLOY_DEV5_GH_ACTION_DISPATCH }}
147-
148-
- name: Checkout main repository
149-
uses: actions/checkout@v4
150-
with:
151-
path: this-repository
152-
153-
- name: Copy customer config to UI tests repository for merging
154-
run: |
155-
cp this-repository/config/config.zcu.ui.tests.json dspace-ui-tests/customer-constants/
156-
157-
- name: test
158-
working-directory: dspace-ui-tests/scripts
159-
env:
160-
HOME_URL: http://dev-5.pc:84/
161-
NAME: ZCU
162-
run: |
163-
./test.sh
164-
165-
- uses: mazoea/ga-maz/end@master
166-
with:
167-
CHOWN_DIR: ./
168-
if: ${{ always() }}
109+
uses: ./.github/workflows/playwright-tests.yml
110+
secrets: inherit
169111

170112
rest-tests-after-import4:
171113
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.zcu-pub.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:84/
31+
NAME: ZCU
32+
run: |
33+
./test.sh
34+
- uses: mazoea/ga-maz/end@master
35+
with:
36+
CHOWN_DIR: ./
37+
if: ${{ always() }}
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": true
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 at University of West Bohemia Home",

0 commit comments

Comments
 (0)