diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-21 09:09:46 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-21 10:49:54 +0200 |
commit | 1db86422eb516acd23550f30536de4ebd8f0daea (patch) | |
tree | 909c01cf3f5903ba5d44f182d4988586ad8650c1 /client/e2e/src/po/login.po.ts | |
parent | 2b621ac0ebe83693bba6354b3482a03ba58143e7 (diff) | |
download | PeerTube-1db86422eb516acd23550f30536de4ebd8f0daea.tar.gz PeerTube-1db86422eb516acd23550f30536de4ebd8f0daea.tar.zst PeerTube-1db86422eb516acd23550f30536de4ebd8f0daea.zip |
Add E2E tests for signup
Diffstat (limited to 'client/e2e/src/po/login.po.ts')
-rw-r--r-- | client/e2e/src/po/login.po.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/client/e2e/src/po/login.po.ts b/client/e2e/src/po/login.po.ts index 486b9a6d8..2c4561b7d 100644 --- a/client/e2e/src/po/login.po.ts +++ b/client/e2e/src/po/login.po.ts | |||
@@ -15,9 +15,7 @@ export class LoginPage { | |||
15 | 15 | ||
16 | await $('form input[type=submit]').click() | 16 | await $('form input[type=submit]').click() |
17 | 17 | ||
18 | await this.getLoggedInInfoElem().waitForExist() | 18 | await this.ensureIsLoggedInAs('root') |
19 | |||
20 | await expect(this.getLoggedInInfoElem()).toHaveText('root') | ||
21 | } | 19 | } |
22 | 20 | ||
23 | async logout () { | 21 | async logout () { |
@@ -31,6 +29,12 @@ export class LoginPage { | |||
31 | await $('.login-buttons-block').waitForDisplayed() | 29 | await $('.login-buttons-block').waitForDisplayed() |
32 | } | 30 | } |
33 | 31 | ||
32 | async ensureIsLoggedInAs (displayName: string) { | ||
33 | await this.getLoggedInInfoElem().waitForExist() | ||
34 | |||
35 | await expect(this.getLoggedInInfoElem()).toHaveText(displayName) | ||
36 | } | ||
37 | |||
34 | private getLoggedInInfoElem () { | 38 | private getLoggedInInfoElem () { |
35 | return $('.logged-in-display-name') | 39 | return $('.logged-in-display-name') |
36 | } | 40 | } |