]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/e2e/src/po/signup.po.ts
Fix horizontal overflow on rtl languages
[github/Chocobozzz/PeerTube.git] / client / e2e / src / po / signup.po.ts
1 import { getCheckbox } from '../utils'
2
3 export class SignupPage {
4
5 getRegisterMenuButton () {
6 return $('.create-account-button')
7 }
8
9 async clickOnRegisterInMenu () {
10 const button = this.getRegisterMenuButton()
11
12 await button.waitForClickable()
13 await button.click()
14 }
15
16 async validateStep () {
17 const next = $('button[type=submit]')
18
19 await next.waitForClickable()
20 await next.click()
21 }
22
23 async checkTerms () {
24 const terms = await getCheckbox('terms')
25 await terms.waitForClickable()
26
27 return terms.click()
28 }
29
30 async fillAccountStep (options: {
31 displayName: string
32 username: string
33 email: string
34 password: string
35 }) {
36 if (options.displayName) {
37 await $('#displayName').setValue(options.displayName)
38 }
39
40 if (options.username) {
41 await $('#username').setValue(options.username)
42 }
43
44 if (options.email) {
45 await $('#email').setValue(options.email)
46 }
47
48 if (options.password) {
49 await $('#password').setValue(options.password)
50 }
51 }
52
53 async fillChannelStep (options: {
54 displayName: string
55 name: string
56 }) {
57 if (options.displayName) {
58 await $('#displayName').setValue(options.displayName)
59 }
60
61 if (options.name) {
62 await $('#name').setValue(options.name)
63 }
64 }
65 }