diff options
Diffstat (limited to 'client/e2e/src/po/admin-config.po.ts')
-rw-r--r-- | client/e2e/src/po/admin-config.po.ts | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/client/e2e/src/po/admin-config.po.ts b/client/e2e/src/po/admin-config.po.ts index 27957a71f..510037ddd 100644 --- a/client/e2e/src/po/admin-config.po.ts +++ b/client/e2e/src/po/admin-config.po.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { getCheckbox, go } from '../utils' | 1 | import { browserSleep, getCheckbox, go, isCheckboxSelected } from '../utils' |
2 | 2 | ||
3 | export class AdminConfigPage { | 3 | export class AdminConfigPage { |
4 | 4 | ||
@@ -8,7 +8,6 @@ export class AdminConfigPage { | |||
8 | 'basic-configuration': 'APPEARANCE', | 8 | 'basic-configuration': 'APPEARANCE', |
9 | 'instance-information': 'INSTANCE' | 9 | 'instance-information': 'INSTANCE' |
10 | } | 10 | } |
11 | |||
12 | await go('/admin/config/edit-custom#' + tab) | 11 | await go('/admin/config/edit-custom#' + tab) |
13 | 12 | ||
14 | await $('.inner-form-title=' + waitTitles[tab]).waitForDisplayed() | 13 | await $('.inner-form-title=' + waitTitles[tab]).waitForDisplayed() |
@@ -28,17 +27,39 @@ export class AdminConfigPage { | |||
28 | return $('#instanceCustomHomepageContent').setValue(newValue) | 27 | return $('#instanceCustomHomepageContent').setValue(newValue) |
29 | } | 28 | } |
30 | 29 | ||
31 | async toggleSignup () { | 30 | async toggleSignup (enabled: boolean) { |
31 | if (await isCheckboxSelected('signupEnabled') === enabled) return | ||
32 | |||
32 | const checkbox = await getCheckbox('signupEnabled') | 33 | const checkbox = await getCheckbox('signupEnabled') |
33 | 34 | ||
34 | await checkbox.waitForClickable() | 35 | await checkbox.waitForClickable() |
35 | await checkbox.click() | 36 | await checkbox.click() |
36 | } | 37 | } |
37 | 38 | ||
39 | async toggleSignupApproval (required: boolean) { | ||
40 | if (await isCheckboxSelected('signupRequiresApproval') === required) return | ||
41 | |||
42 | const checkbox = await getCheckbox('signupRequiresApproval') | ||
43 | |||
44 | await checkbox.waitForClickable() | ||
45 | await checkbox.click() | ||
46 | } | ||
47 | |||
48 | async toggleSignupEmailVerification (required: boolean) { | ||
49 | if (await isCheckboxSelected('signupRequiresEmailVerification') === required) return | ||
50 | |||
51 | const checkbox = await getCheckbox('signupRequiresEmailVerification') | ||
52 | |||
53 | await checkbox.waitForClickable() | ||
54 | await checkbox.click() | ||
55 | } | ||
56 | |||
38 | async save () { | 57 | async save () { |
39 | const button = $('input[type=submit]') | 58 | const button = $('input[type=submit]') |
40 | 59 | ||
41 | await button.waitForClickable() | 60 | await button.waitForClickable() |
42 | await button.click() | 61 | await button.click() |
62 | |||
63 | await browserSleep(1000) | ||
43 | } | 64 | } |
44 | } | 65 | } |