From 814e9e07ba65446af8446dbbd2f0d70c85fd1b33 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 28 Oct 2022 11:19:54 +0200 Subject: Improve E2E tests Add tests for private video static endpoints Fix tests for local firefox --- client/e2e/src/po/admin-config.po.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'client/e2e/src/po/admin-config.po.ts') diff --git a/client/e2e/src/po/admin-config.po.ts b/client/e2e/src/po/admin-config.po.ts index 6d48a0fd7..27957a71f 100644 --- a/client/e2e/src/po/admin-config.po.ts +++ b/client/e2e/src/po/admin-config.po.ts @@ -14,8 +14,14 @@ export class AdminConfigPage { await $('.inner-form-title=' + waitTitles[tab]).waitForDisplayed() } - updateNSFWSetting (newValue: 'do_not_list' | 'blur' | 'display') { - return $('#instanceDefaultNSFWPolicy').selectByAttribute('value', newValue) + async updateNSFWSetting (newValue: 'do_not_list' | 'blur' | 'display') { + const elem = $('#instanceDefaultNSFWPolicy') + + await elem.waitForDisplayed() + await elem.scrollIntoView(false) // Avoid issues with fixed header on firefox + await elem.waitForClickable() + + return elem.selectByAttribute('value', newValue) } updateHomepage (newValue: string) { @@ -24,11 +30,15 @@ export class AdminConfigPage { async toggleSignup () { const checkbox = await getCheckbox('signupEnabled') + + await checkbox.waitForClickable() await checkbox.click() } async save () { const button = $('input[type=submit]') + + await button.waitForClickable() await button.click() } } -- cgit v1.2.3