Skip to content

Commit 9e843f4

Browse files
authored
Add concurrency argument for Permission testing (#1510)
* Add concurrency argument for Permission testing * Create group before trying to view table * Increase wait duration for one of the Diagnostic tests
1 parent 4e14ec2 commit 9e843f4

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

.github/workflows/permissions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- name: Run TestCafe Tests
6464
uses: DevExpress/testcafe-action@latest
6565
with:
66-
args: '"chrome:headless" portal-ui/tests/permissions/ --skip-js-errors '
66+
args: '"chrome:headless" portal-ui/tests/permissions/ --skip-js-errors -c 3'
6767

6868
- name: Clean up users & policies
6969
run: |

portal-ui/tests/permissions/diagnostics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ test("Download button exists after Diagnostic is completed", async (t) => {
6161
.useRole(roles.diagnostics)
6262
.navigateTo("http://localhost:9090/support/diagnostics")
6363
.click(elements.startDiagnosticButton)
64-
.wait(2000)
64+
.wait(3000)
6565
.expect(elements.downloadButton.exists)
6666
.ok();
6767
});

portal-ui/tests/permissions/groups.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ test.before(async (t) => {
106106
}
107107
);
108108

109-
test("Groups table exists", async (t) => {
109+
test.before(async (t) => {
110+
// A user must be created as we need to choose a user from the dropdown
111+
await functions.createUser(t);
112+
await createGroup(t, "groups-table");
113+
})("Groups table exists", async (t) => {
110114
await t
111115
.navigateTo("http://localhost:9090/identity/groups")
112116
.expect(elements.table.exists)
@@ -115,6 +119,7 @@ test("Groups table exists", async (t) => {
115119

116120
test.before(async (t) => {
117121
// A user must be created as we need to choose a user from the dropdown
122+
await functions.createUser(t);
118123
await createGroup(t, "disable-enable");
119124
})("Created Group can be disabled and enabled back", async (t) => {
120125
await t
@@ -130,6 +135,7 @@ test.before(async (t) => {
130135

131136
test.before(async (t) => {
132137
// A user must be created as we need to choose a user from the dropdown
138+
await functions.createUser(t);
133139
await createGroup(t, "view-delete");
134140
})("Created Group can be viewed and deleted", async (t) => {
135141
await t

portal-ui/tests/scripts/permissions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ __init__() {
8080
}
8181

8282
main() {
83-
(yarn start &> /dev/null) & (./console server &> /dev/null) & (testcafe "chrome:headless" portal-ui/tests/permissions/ -q --skip-js-errors)
83+
(yarn start &> /dev/null) & (./console server &> /dev/null) & (testcafe "chrome:headless" portal-ui/tests/permissions/ -q --skip-js-errors -c 3)
8484
cleanup
8585
}
8686

0 commit comments

Comments
 (0)