diff options
Diffstat (limited to 'client/e2e/src/po/admin-config.po.ts')
-rw-r--r-- | client/e2e/src/po/admin-config.po.ts | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/client/e2e/src/po/admin-config.po.ts b/client/e2e/src/po/admin-config.po.ts new file mode 100644 index 000000000..a15184781 --- /dev/null +++ b/client/e2e/src/po/admin-config.po.ts | |||
@@ -0,0 +1,29 @@ | |||
1 | import { browserSleep, go } from '../utils' | ||
2 | |||
3 | export class AdminConfigPage { | ||
4 | |||
5 | async navigateTo (tab: 'instance-homepage' | 'basic-configuration' | 'instance-information') { | ||
6 | const waitTitles = { | ||
7 | 'instance-homepage': 'INSTANCE HOMEPAGE', | ||
8 | 'basic-configuration': 'APPEARANCE', | ||
9 | 'instance-information': 'INSTANCE' | ||
10 | } | ||
11 | |||
12 | await go('/admin/config/edit-custom#' + tab) | ||
13 | |||
14 | await $('.inner-form-title=' + waitTitles[tab]).waitForDisplayed() | ||
15 | } | ||
16 | |||
17 | updateNSFWSetting (newValue: 'do_not_list' | 'blur' | 'display') { | ||
18 | return $('#instanceDefaultNSFWPolicy').selectByAttribute('value', newValue) | ||
19 | } | ||
20 | |||
21 | updateHomepage (newValue: string) { | ||
22 | return $('#instanceCustomHomepageContent').setValue(newValue) | ||
23 | } | ||
24 | |||
25 | async save () { | ||
26 | await $('input[type=submit]').click() | ||
27 | await browserSleep(200) | ||
28 | } | ||
29 | } | ||