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'
6 describe('Signup', () => {
7 let loginPage: LoginPage
8 let adminConfigPage: AdminConfigPage
9 let signupPage: SignupPage
15 beforeEach(async () => {
16 loginPage = new LoginPage()
17 adminConfigPage = new AdminConfigPage()
18 signupPage = new SignupPage()
20 await browser.maximizeWindow()
23 it('Should disable signup', async () => {
24 await loginPage.loginAsRootUser()
26 await adminConfigPage.navigateTo('basic-configuration')
27 await adminConfigPage.toggleSignup()
29 await adminConfigPage.save()
31 await loginPage.logout()
32 await browser.refresh()
34 expect(signupPage.getRegisterMenuButton()).not.toBeDisplayed()
37 it('Should enable signup', async () => {
38 await loginPage.loginAsRootUser()
40 await adminConfigPage.navigateTo('basic-configuration')
41 await adminConfigPage.toggleSignup()
43 await adminConfigPage.save()
45 await loginPage.logout()
46 await browser.refresh()
48 expect(signupPage.getRegisterMenuButton()).toBeDisplayed()
51 it('Should go on signup page', async function () {
52 await signupPage.clickOnRegisterInMenu()
55 it('Should validate the first step (about page)', async function () {
56 await signupPage.validateStep()
59 it('Should validate the second step (terms)', async function () {
60 await signupPage.checkTerms()
61 await signupPage.validateStep()
64 it('Should validate the third step (account)', async function () {
65 await signupPage.fillAccountStep({
66 displayName: 'user 1',
68 email: 'user_1@example.com',
69 password: 'my_super_password'
72 await signupPage.validateStep()
75 it('Should validate the third step (channel)', async function () {
76 await signupPage.fillChannelStep({
77 displayName: 'user 1 channel',
78 name: 'user_1_channel'
81 await signupPage.validateStep()
84 it('Should be logged in', async function () {
85 await loginPage.ensureIsLoggedInAs('user 1')