feat: add Playwright testing framework configuration and tests #71

Merged
jank merged 48 commits from feature/add-playwright into main 2025-01-17 13:34:52 +00:00
Showing only changes of commit 769c775be4 - Show all commits

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();
// });