platform/qms-tests/sanity/tests/documents/ES-40.2.spec.ts
JasminMus 1d3299e384
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Visual check for PDF (#6599)
Signed-off-by: Jasmin <jasmin@hardcoreeng.com>
2024-10-16 14:18:38 +04:00

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')
})
})