test: Add login redirection test for employees page
All checks were successful
Playwright Tests / test (pull_request) Successful in 1m51s

This commit is contained in:
Jan Gleytenhoover 2025-01-16 17:42:00 +01:00
parent 59b210ff46
commit 769c775be4
Signed by: jank
GPG key ID: 50620ADD22CD330B

View file

@ -31,12 +31,16 @@ test('LoginPageButtonShouldRedirectToKeycloak', async ({ page }) => {
expect(page.url()).toContain("keycloak.szut.dev");
});
// test('get started link', async ({ page }) => {
// await page.goto('https://playwright.dev/');
test('AfterLoginUserShouldBeRedirectedToEmployees', async ({ page }) => {
await page.goto('http://localhost:4200');
// // Click the get started link.
// await page.getByRole('link', { name: 'Get started' }).click();
await page.getByRole('button').click();
await page.waitForFunction(() => window.location.href.includes('keycloak'));
await page.getByLabel('Username or email').fill('user');
await page.getByLabel('Password').fill('test');
await page.click('#kc-login');
expect(page.url()).toContain('localhost');
expect(page.url()).toContain('mitarbeiter');
});
// // Expects page to have a heading with the name of Installation.
// await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
// });