From 6d210220be0875d63461829d83c6e3a59d05cf7a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 3 Sep 2021 10:27:04 +0200 Subject: Fix NSFW filter and add tests --- client/e2e/src/po/my-account.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'client/e2e/src/po/my-account.ts') diff --git a/client/e2e/src/po/my-account.ts b/client/e2e/src/po/my-account.ts index 85dc02805..8b5e79b5e 100644 --- a/client/e2e/src/po/my-account.ts +++ b/client/e2e/src/po/my-account.ts @@ -14,6 +14,24 @@ export class MyAccountPage { return $('a[href="/my-library/history/videos"]').click() } + // Settings + + navigateToMySettings () { + return $('a[href="/my-account"]').click() + } + + async updateNSFW (newValue: 'do_not_list' | 'blur' | 'display') { + const nsfw = $('#nsfwPolicy') + + await nsfw.waitForDisplayed() + await nsfw.scrollIntoView(false) // Avoid issues with fixed header on firefox + await nsfw.selectByAttribute('value', newValue) + + const submit = $('my-user-video-settings input[type=submit]') + await submit.scrollIntoView(false) + await submit.click() + } + // My account Videos async removeVideo (name: string) { -- cgit v1.2.3