aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/po/login.po.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/e2e/src/po/login.po.ts')
-rw-r--r--client/e2e/src/po/login.po.ts10
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 }