test: add search functionality test case
All checks were successful
Playwright Tests / test (pull_request) Successful in 1m58s

This commit is contained in:
Jan Gleytenhoover 2025-01-17 12:04:25 +01:00
parent d4cdfba01a
commit 56a2ef77fa
Signed by: jank
GPG key ID: 50620ADD22CD330B

View file

@ -41,6 +41,18 @@ test.describe('mitarbeiter', () => {
const users = page.getByText('Delete'); const users = page.getByText('Delete');
await users.first().waitFor({ state: "visible" }); await users.first().waitFor({ state: "visible" });
expect(await users.count()).toBe(2); expect(await users.count()).toBe(2);
expect(button).toBeTruthy();
});
test('SearchShouldWork', async ({ page }) => {
const searchField = page.getByRole('textbox');
const searchButton = page.getByText('Search').first();
await searchField.fill('Max');
await searchButton.click();
const hiddenItem = page.getByText('MusterFrau');
await expect(hiddenItem).toHaveCount(0);
}); });
}); });