diff options
author | Chocobozzz <me@florianbigard.com> | 2021-04-20 15:36:00 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-04-20 15:36:00 +0200 |
commit | 51b66ea7cb39f075f4deb8ea92ba70f3be289769 (patch) | |
tree | 62c60473bcec76c44ebbb3b52e762eeaafc8beb3 /client/e2e/src/po | |
parent | 9929fbd6f4e209346cd31d05888417a94949da84 (diff) | |
download | PeerTube-51b66ea7cb39f075f4deb8ea92ba70f3be289769.tar.gz PeerTube-51b66ea7cb39f075f4deb8ea92ba70f3be289769.tar.zst PeerTube-51b66ea7cb39f075f4deb8ea92ba70f3be289769.zip |
Fix E2E tests
Diffstat (limited to 'client/e2e/src/po')
-rw-r--r-- | client/e2e/src/po/app.po.ts | 16 | ||||
-rw-r--r-- | client/e2e/src/po/login.po.ts | 3 | ||||
-rw-r--r-- | client/e2e/src/po/my-account.ts | 2 |
3 files changed, 4 insertions, 17 deletions
diff --git a/client/e2e/src/po/app.po.ts b/client/e2e/src/po/app.po.ts deleted file mode 100644 index 3ed65399e..000000000 --- a/client/e2e/src/po/app.po.ts +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | import { browser, by, element } from 'protractor' | ||
2 | |||
3 | export class AppPage { | ||
4 | |||
5 | async closeWelcomeModal () { | ||
6 | const firstHandle = await browser.getWindowHandle() | ||
7 | |||
8 | if (await element(by.css('.configure-instance-button')).isPresent() === false) return | ||
9 | |||
10 | await element(by.css('.configure-instance-button')).click() | ||
11 | |||
12 | await browser.sleep(5000) | ||
13 | |||
14 | await browser.switchTo().window(firstHandle) | ||
15 | } | ||
16 | } | ||
diff --git a/client/e2e/src/po/login.po.ts b/client/e2e/src/po/login.po.ts index 90b65c7ea..20412ee0d 100644 --- a/client/e2e/src/po/login.po.ts +++ b/client/e2e/src/po/login.po.ts | |||
@@ -4,6 +4,9 @@ export class LoginPage { | |||
4 | async loginAsRootUser () { | 4 | async loginAsRootUser () { |
5 | await browser.get('/login') | 5 | await browser.get('/login') |
6 | 6 | ||
7 | await browser.executeScript(`window.localStorage.setItem('no_instance_config_warning_modal', 'true')`) | ||
8 | await browser.executeScript(`window.localStorage.setItem('no_welcome_modal', 'true')`) | ||
9 | |||
7 | element(by.css('input#username')).sendKeys('root') | 10 | element(by.css('input#username')).sendKeys('root') |
8 | element(by.css('input#password')).sendKeys('test1') | 11 | element(by.css('input#password')).sendKeys('test1') |
9 | 12 | ||
diff --git a/client/e2e/src/po/my-account.ts b/client/e2e/src/po/my-account.ts index 0255cee16..61d42214d 100644 --- a/client/e2e/src/po/my-account.ts +++ b/client/e2e/src/po/my-account.ts | |||
@@ -28,7 +28,7 @@ export class MyAccountPage { | |||
28 | } | 28 | } |
29 | 29 | ||
30 | validRemove () { | 30 | validRemove () { |
31 | return element(by.css('.action-button-submit')).click() | 31 | return element(by.css('input[type=submit]')).click() |
32 | } | 32 | } |
33 | 33 | ||
34 | countVideos (names: string[]) { | 34 | countVideos (names: string[]) { |