mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 19:44:59 +03:00
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
|
import { test } from '@playwright/test'
|
||
|
import { PlatformUser } from '../utils'
|
||
|
import { LoginPage } from '../model/login-page'
|
||
|
|
||
|
test.describe('login test', () => {
|
||
|
let loginPage: LoginPage
|
||
|
|
||
|
test.beforeEach(async ({ page }) => {
|
||
|
loginPage = new LoginPage(page)
|
||
|
await loginPage.goto()
|
||
|
})
|
||
|
|
||
|
test('check login', async () => {
|
||
|
await loginPage.clickOnLoginWithPassword()
|
||
|
await loginPage.login(PlatformUser, '1234')
|
||
|
})
|
||
|
|
||
|
test('TESTS-392 - As a non workspace user account I cannot log into TraceX', async () => {
|
||
|
await loginPage.clickOnLoginWithPassword()
|
||
|
await loginPage.login('Wrong User', 'Wrong password')
|
||
|
await loginPage.checkIfErrorMessageIsShown('Account not found')
|
||
|
})
|
||
|
|
||
|
test('TESTS-396 - Correct email and wrong password: I cannot log in', async () => {
|
||
|
await loginPage.clickOnLoginWithPassword()
|
||
|
await loginPage.login(PlatformUser, 'Wrong password')
|
||
|
await loginPage.checkIfErrorMessageIsShown('Invalid password')
|
||
|
})
|
||
|
|
||
|
test('TESTS-397 - Wrong email and correct password: I cannot log in', async () => {
|
||
|
await loginPage.clickOnLoginWithPassword()
|
||
|
await loginPage.login('Wrong User', '1234')
|
||
|
await loginPage.checkIfErrorMessageIsShown('Account not found')
|
||
|
})
|
||
|
})
|