|
|
@ -5,6 +5,7 @@ import { LoginPage } from '../pages/LoginPage'; |
|
|
|
import { SettingsPage, SettingTab } from '../pages/Dashboard/Settings'; |
|
|
|
import { SettingsPage, SettingTab } from '../pages/Dashboard/Settings'; |
|
|
|
import { SignupPage } from '../pages/SignupPage'; |
|
|
|
import { SignupPage } from '../pages/SignupPage'; |
|
|
|
import { ProjectsPage } from '../pages/ProjectsPage'; |
|
|
|
import { ProjectsPage } from '../pages/ProjectsPage'; |
|
|
|
|
|
|
|
import { AccountPage } from '../pages/Account'; |
|
|
|
|
|
|
|
|
|
|
|
test.describe('Auth', () => { |
|
|
|
test.describe('Auth', () => { |
|
|
|
let context: any; |
|
|
|
let context: any; |
|
|
@ -12,12 +13,15 @@ test.describe('Auth', () => { |
|
|
|
let settings: SettingsPage; |
|
|
|
let settings: SettingsPage; |
|
|
|
let signupPage: SignupPage; |
|
|
|
let signupPage: SignupPage; |
|
|
|
let projectsPage: ProjectsPage; |
|
|
|
let projectsPage: ProjectsPage; |
|
|
|
|
|
|
|
let accountPage: AccountPage; |
|
|
|
|
|
|
|
|
|
|
|
test.beforeEach(async ({ page }) => { |
|
|
|
test.beforeEach(async ({ page }) => { |
|
|
|
context = await setup({ page }); |
|
|
|
context = await setup({ page }); |
|
|
|
dashboard = new DashboardPage(page, context.project); |
|
|
|
dashboard = new DashboardPage(page, context.project); |
|
|
|
signupPage = new SignupPage(page); |
|
|
|
signupPage = new SignupPage(page); |
|
|
|
projectsPage = new ProjectsPage(page); |
|
|
|
projectsPage = new ProjectsPage(page); |
|
|
|
|
|
|
|
accountPage = new AccountPage(page); |
|
|
|
|
|
|
|
|
|
|
|
settings = dashboard.settings; |
|
|
|
settings = dashboard.settings; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -43,24 +47,24 @@ test.describe('Auth', () => { |
|
|
|
await projectsPage.openPasswordChangeModal(); |
|
|
|
await projectsPage.openPasswordChangeModal(); |
|
|
|
|
|
|
|
|
|
|
|
// Existing active pass incorrect
|
|
|
|
// Existing active pass incorrect
|
|
|
|
await projectsPage.changePasswordPage.changePassword({ |
|
|
|
await accountPage.users.changePasswordPage.changePassword({ |
|
|
|
oldPass: '123456789', |
|
|
|
oldPass: '123456789', |
|
|
|
newPass: '123456789', |
|
|
|
newPass: '123456789', |
|
|
|
repeatPass: '123456789', |
|
|
|
repeatPass: '123456789', |
|
|
|
}); |
|
|
|
}); |
|
|
|
await projectsPage.changePasswordPage.verifyFormError({ error: 'Current password is wrong' }); |
|
|
|
await accountPage.users.changePasswordPage.verifyFormError({ error: 'Current password is wrong' }); |
|
|
|
|
|
|
|
|
|
|
|
// New pass and repeat pass mismatch
|
|
|
|
// New pass and repeat pass mismatch
|
|
|
|
await projectsPage.changePasswordPage.changePassword({ |
|
|
|
await accountPage.users.changePasswordPage.changePassword({ |
|
|
|
oldPass: 'Password123.', |
|
|
|
oldPass: 'Password123.', |
|
|
|
newPass: '123456789', |
|
|
|
newPass: '123456789', |
|
|
|
repeatPass: '987654321', |
|
|
|
repeatPass: '987654321', |
|
|
|
networkValidation: false, |
|
|
|
networkValidation: false, |
|
|
|
}); |
|
|
|
}); |
|
|
|
await projectsPage.changePasswordPage.verifyPasswordDontMatchError(); |
|
|
|
await accountPage.users.changePasswordPage.verifyPasswordDontMatchError(); |
|
|
|
|
|
|
|
|
|
|
|
// All good
|
|
|
|
// All good
|
|
|
|
await projectsPage.changePasswordPage.changePassword({ |
|
|
|
await accountPage.users.changePasswordPage.changePassword({ |
|
|
|
oldPass: 'Password123.', |
|
|
|
oldPass: 'Password123.', |
|
|
|
newPass: 'NewPasswordConfigured', |
|
|
|
newPass: 'NewPasswordConfigured', |
|
|
|
repeatPass: 'NewPasswordConfigured', |
|
|
|
repeatPass: 'NewPasswordConfigured', |
|
|
|