aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/po/signup.po.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/e2e/src/po/signup.po.ts')
-rw-r--r--client/e2e/src/po/signup.po.ts51
1 files changed, 24 insertions, 27 deletions
diff --git a/client/e2e/src/po/signup.po.ts b/client/e2e/src/po/signup.po.ts
index cc2ed7c5f..7917cdda7 100644
--- a/client/e2e/src/po/signup.po.ts
+++ b/client/e2e/src/po/signup.po.ts
@@ -27,42 +27,39 @@ export class SignupPage {
27 return terms.click() 27 return terms.click()
28 } 28 }
29 29
30 async getEndMessage () {
31 const alert = $('.pt-alert-primary')
32 await alert.waitForDisplayed()
33
34 return alert.getText()
35 }
36
37 async fillRegistrationReason (reason: string) {
38 await $('#registrationReason').setValue(reason)
39 }
40
30 async fillAccountStep (options: { 41 async fillAccountStep (options: {
31 displayName: string
32 username: string 42 username: string
33 email: string 43 password?: string
34 password: string 44 displayName?: string
45 email?: string
35 }) { 46 }) {
36 if (options.displayName) { 47 await $('#displayName').setValue(options.displayName || `${options.username} display name`)
37 await $('#displayName').setValue(options.displayName)
38 }
39
40 if (options.username) {
41 await $('#username').setValue(options.username)
42 }
43 48
44 if (options.email) { 49 await $('#username').setValue(options.username)
45 // Fix weird bug on firefox that "cannot scroll into view" when using just `setValue` 50 await $('#password').setValue(options.password || 'password')
46 await $('#email').scrollIntoView(false)
47 await $('#email').waitForClickable()
48 await $('#email').setValue(options.email)
49 }
50 51
51 if (options.password) { 52 // Fix weird bug on firefox that "cannot scroll into view" when using just `setValue`
52 await $('#password').setValue(options.password) 53 await $('#email').scrollIntoView(false)
53 } 54 await $('#email').waitForClickable()
55 await $('#email').setValue(options.email || `${options.username}@example.com`)
54 } 56 }
55 57
56 async fillChannelStep (options: { 58 async fillChannelStep (options: {
57 displayName: string
58 name: string 59 name: string
60 displayName?: string
59 }) { 61 }) {
60 if (options.displayName) { 62 await $('#displayName').setValue(options.displayName || `${options.name} channel display name`)
61 await $('#displayName').setValue(options.displayName) 63 await $('#name').setValue(options.name)
62 }
63
64 if (options.name) {
65 await $('#name').setValue(options.name)
66 }
67 } 64 }
68} 65}