diff options
Diffstat (limited to 'client/e2e/src/suites-local/signup.e2e-spec.ts')
-rw-r--r-- | client/e2e/src/suites-local/signup.e2e-spec.ts | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/client/e2e/src/suites-local/signup.e2e-spec.ts b/client/e2e/src/suites-local/signup.e2e-spec.ts new file mode 100644 index 000000000..0f6d7a0e6 --- /dev/null +++ b/client/e2e/src/suites-local/signup.e2e-spec.ts | |||
@@ -0,0 +1,87 @@ | |||
1 | import { AdminConfigPage } from '../po/admin-config.po' | ||
2 | import { LoginPage } from '../po/login.po' | ||
3 | import { SignupPage } from '../po/signup.po' | ||
4 | import { waitServerUp } from '../utils' | ||
5 | |||
6 | describe('Signup', () => { | ||
7 | let loginPage: LoginPage | ||
8 | let adminConfigPage: AdminConfigPage | ||
9 | let signupPage: SignupPage | ||
10 | |||
11 | before(async () => { | ||
12 | await waitServerUp() | ||
13 | }) | ||
14 | |||
15 | beforeEach(async () => { | ||
16 | loginPage = new LoginPage() | ||
17 | adminConfigPage = new AdminConfigPage() | ||
18 | signupPage = new SignupPage() | ||
19 | |||
20 | await browser.maximizeWindow() | ||
21 | }) | ||
22 | |||
23 | it('Should disable signup', async () => { | ||
24 | await loginPage.loginAsRootUser() | ||
25 | |||
26 | await adminConfigPage.navigateTo('basic-configuration') | ||
27 | await adminConfigPage.toggleSignup() | ||
28 | |||
29 | await adminConfigPage.save() | ||
30 | |||
31 | await loginPage.logout() | ||
32 | await browser.refresh() | ||
33 | |||
34 | expect(signupPage.getRegisterMenuButton()).not.toBeDisplayed() | ||
35 | }) | ||
36 | |||
37 | it('Should enable signup', async () => { | ||
38 | await loginPage.loginAsRootUser() | ||
39 | |||
40 | await adminConfigPage.navigateTo('basic-configuration') | ||
41 | await adminConfigPage.toggleSignup() | ||
42 | |||
43 | await adminConfigPage.save() | ||
44 | |||
45 | await loginPage.logout() | ||
46 | await browser.refresh() | ||
47 | |||
48 | expect(signupPage.getRegisterMenuButton()).toBeDisplayed() | ||
49 | }) | ||
50 | |||
51 | it('Should go on signup page', async function () { | ||
52 | await signupPage.clickOnRegisterInMenu() | ||
53 | }) | ||
54 | |||
55 | it('Should validate the first step (about page)', async function () { | ||
56 | await signupPage.validateStep() | ||
57 | }) | ||
58 | |||
59 | it('Should validate the second step (terms)', async function () { | ||
60 | await signupPage.checkTerms() | ||
61 | await signupPage.validateStep() | ||
62 | }) | ||
63 | |||
64 | it('Should validate the third step (account)', async function () { | ||
65 | await signupPage.fillAccountStep({ | ||
66 | displayName: 'user 1', | ||
67 | username: 'user_1', | ||
68 | email: 'user_1@example.com', | ||
69 | password: 'my_super_password' | ||
70 | }) | ||
71 | |||
72 | await signupPage.validateStep() | ||
73 | }) | ||
74 | |||
75 | it('Should validate the third step (channel)', async function () { | ||
76 | await signupPage.fillChannelStep({ | ||
77 | displayName: 'user 1 channel', | ||
78 | name: 'user_1_channel' | ||
79 | }) | ||
80 | |||
81 | await signupPage.validateStep() | ||
82 | }) | ||
83 | |||
84 | it('Should be logged in', async function () { | ||
85 | await loginPage.ensureIsLoggedInAs('user 1') | ||
86 | }) | ||
87 | }) | ||