Skip to content

Commit

Permalink
Spsh 692 (#47)
Browse files Browse the repository at this point in the history
* In der Ergebnisliste Schulen Anzahl Zeilen auf 300 gesetzt

* developer notes: TestId combobox 'Eintraege pro Seite' fehlt

* fix locator combobox FooterDataTable
  • Loading branch information
jakobmadp authored Aug 15, 2024
1 parent 122b79a commit 99571e7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ Die data-testid muss genau in dem Bereich liegen, in dem der Endanwender auch ta
--

## StartView.page.ts
--
## FooterDataTable.page.ts
--
11 changes: 11 additions & 0 deletions pages/FooterDataTable.page .ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { type Locator, Page } from '@playwright/test';

export class FooterDataTablePage{
readonly page: Page;
readonly combobox_AnzahlEintraege: Locator;

constructor(page){
this.page = page;
this.combobox_AnzahlEintraege = page.locator('.v-data-table-footer__items-per-page .v-input');
}
}
4 changes: 4 additions & 0 deletions tests/Schule.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { SchuleCreationViewPage } from "../pages/admin/SchuleCreationView.page";
import { SchuleManagementViewPage } from "../pages/admin/SchuleManagementView.page";
import { faker } from "@faker-js/faker/locale/de";
import { HeaderPage } from "../pages/Header.page";
import { FooterDataTablePage } from "../pages/FooterDataTable.page ";

const PW = process.env.PW;
const ADMIN = process.env.USER;
Expand Down Expand Up @@ -38,6 +39,7 @@ test.describe(`Testfälle für die Administration von Schulen: Umgebung: ${proce
const Menue = new MenuPage(page);
const SchuleCreationView = new SchuleCreationViewPage(page);
const SchuleManagementView = new SchuleManagementViewPage(page);
const FooterDataTable = new FooterDataTablePage(page);

const SCHULNAME1 = "TAuto-PW-S1-" + faker.lorem.word({ length: { min: 8, max: 12 }});
const SCHULNAME2 = "TAuto-PW-S2-" + faker.lorem.word({ length: { min: 8, max: 12 }});
Expand Down Expand Up @@ -73,6 +75,8 @@ test.describe(`Testfälle für die Administration von Schulen: Umgebung: ${proce

await test.step(`In der Ergebnisliste prüfen, dass die beiden neuen Schulen angezeigt werden`, async () => {
await Menue.menueItem_AlleSchulenAnzeigen.click();
await FooterDataTable.combobox_AnzahlEintraege.click();
await page.getByText('300').click();
await expect(SchuleManagementView.text_h2_Schulverwaltung).toHaveText("Schulverwaltung");
await expect(page.getByRole("cell", { name: SCHULNAME1 })).toBeVisible();
await expect(page.getByRole("cell", { name: SCHULNAME2 })).toBeVisible();
Expand Down

0 comments on commit 99571e7

Please sign in to comment.