25 lines
766 B
TypeScript
25 lines
766 B
TypeScript
|
import { test, expect } from "@playwright/test";
|
||
|
|
||
|
test.describe('mitarbeiterbearbeiten', () => {
|
||
|
test.beforeEach(async ({ page }) => {
|
||
|
await page.goto('http://localhost:4200');
|
||
|
|
||
|
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');
|
||
|
|
||
|
await page.goto('http://localhost:4200/mitarbeiterbearbeiten/1');
|
||
|
});
|
||
|
|
||
|
test('ShouldLoad', async ({ page }) => {
|
||
|
expect(page.getByText("Save")).toBeTruthy();
|
||
|
});
|
||
|
|
||
|
test('FieldsShouldHaveValues', async ({page}) => {
|
||
|
await expect(page.getByLabel('First Name')).toHaveValue('Max');
|
||
|
});
|
||
|
});
|
||
|
|