Skip to content

Commit

Permalink
Merge branch 'main' into SPSH-1359
Browse files Browse the repository at this point in the history
  • Loading branch information
YoussefBouch authored Nov 20, 2024
2 parents c23890b + 1e9bf76 commit 9d2d3f4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
2 changes: 2 additions & 0 deletions pages/admin/PersonCreationView.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export class PersonCreationViewPage{
readonly data_Organisationsebene: Locator;
readonly label_Klasse: Locator;
readonly data_Klasse: Locator;
readonly listbox_Rolle: Locator;

constructor(page){
// Anlage Person
Expand Down Expand Up @@ -70,5 +71,6 @@ export class PersonCreationViewPage{
this.input_EinstiegsPasswort = page.locator('[data-testid="password-output-field"] input');
this.button_ZurueckErgebnisliste = page.getByTestId('back-to-list-button');
this.button_WeiterenBenutzerAnlegen = page.getByTestId('create-another-person-button');
this.listbox_Rolle = page.locator('.v-list');
}
}
40 changes: 20 additions & 20 deletions tests/Person.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,11 @@ test.describe(`Testfälle für die Administration von Personen": Umgebung: ${pro
await page.getByText(Organisation_Land, { exact: true }).nth(1).click();

await personCreationView.combobox_Rolle.click();
await expect(personCreationView.body).toContainText(landesadminRolle);
await expect(personCreationView.body).not.toContainText(rolleLehr);
await expect(personCreationView.body).not.toContainText(rolleLiV);
await expect(personCreationView.body).not.toContainText(schuladminOeffentlichRolle);
await expect(personCreationView.body).not.toContainText(schuelerRolle);
await expect(personCreationView.listbox_Rolle).toContainText(landesadminRolle);
await expect(personCreationView.listbox_Rolle).not.toContainText(rolleLehr);
await expect(personCreationView.listbox_Rolle).not.toContainText(rolleLiV);
await expect(personCreationView.listbox_Rolle).not.toContainText(schuladminOeffentlichRolle);
await expect(personCreationView.listbox_Rolle).not.toContainText(schuelerRolle);
});

await test.step(`Organisation 'Öffentliche Schulen Land Schleswig-Holstein' auswählen und Dropdown 'Rolle' prüfen`, async () => {
Expand All @@ -366,11 +366,11 @@ test.describe(`Testfälle für die Administration von Personen": Umgebung: ${pro
await page.keyboard.type(Organisation_OeffentlicheSchule);
await page.getByText(Organisation_OeffentlicheSchule, { exact: true }).click();
await personCreationView.combobox_Rolle.click();
await expect(personCreationView.body).toContainText(landesadminRolle);
await expect(personCreationView.body).not.toContainText(rolleLehr);
await expect(personCreationView.body).not.toContainText(rolleLiV);
await expect(personCreationView.body).not.toContainText(schuladminOeffentlichRolle);
await expect(personCreationView.body).not.toContainText(schuelerRolle);
await expect(personCreationView.listbox_Rolle).toContainText(landesadminRolle);
await expect(personCreationView.listbox_Rolle).not.toContainText(rolleLehr);
await expect(personCreationView.listbox_Rolle).not.toContainText(rolleLiV);
await expect(personCreationView.listbox_Rolle).not.toContainText(schuladminOeffentlichRolle);
await expect(personCreationView.listbox_Rolle).not.toContainText(schuelerRolle);
});

await test.step(`Organisation 'Ersatzschulen Land Schleswig-Holstein' auswählen und Dropdown 'Rolle' prüfen`, async () => {
Expand All @@ -379,23 +379,23 @@ test.describe(`Testfälle für die Administration von Personen": Umgebung: ${pro
await page.keyboard.type(Organisation_Ersatzschule);
await page.getByText(Organisation_Ersatzschule, { exact: true }).click();
await personCreationView.combobox_Rolle.click();
await expect(personCreationView.body).toContainText(landesadminRolle);
await expect(personCreationView.body).not.toContainText(rolleLehr);
await expect(personCreationView.body).not.toContainText(rolleLiV);
await expect(personCreationView.body).not.toContainText(schuladminOeffentlichRolle);
await expect(personCreationView.body).not.toContainText(schuelerRolle);
await expect(personCreationView.listbox_Rolle).toContainText(landesadminRolle);
await expect(personCreationView.listbox_Rolle).not.toContainText(rolleLehr);
await expect(personCreationView.listbox_Rolle).not.toContainText(rolleLiV);
await expect(personCreationView.listbox_Rolle).not.toContainText(schuladminOeffentlichRolle);
await expect(personCreationView.listbox_Rolle).not.toContainText(schuelerRolle);
});

await test.step(`Organisation 'Schule' auswählen und Dropdown 'Rolle' prüfen`, async () => {
await personCreationView.combobox_Schulstrukturknoten_Clear.click();
await personCreationView.combobox_Schulstrukturknoten.click();
await page.getByText(Organisation_Schule).click();
await personCreationView.combobox_Rolle.click();
await expect(personCreationView.body).toContainText(rolleLehr);
await expect(personCreationView.body).toContainText(rolleLiV);
await expect(personCreationView.body).toContainText(schuladminOeffentlichRolle);
await expect(personCreationView.body).toContainText(schuelerRolle);
await expect(personCreationView.body).not.toContainText(landesadminRolle);
await expect(personCreationView.listbox_Rolle).toContainText(rolleLehr);
await expect(personCreationView.listbox_Rolle).toContainText(rolleLiV);
await expect(personCreationView.listbox_Rolle).toContainText(schuladminOeffentlichRolle);
await expect(personCreationView.listbox_Rolle).toContainText(schuelerRolle);
await expect(personCreationView.listbox_Rolle).not.toContainText(landesadminRolle);
});
});

Expand Down
6 changes: 6 additions & 0 deletions tests/workflow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ test.describe(`Testfälle für den Test von workflows: Umgebung: ${process.env.E
await expect(personManagement.text_h2_Benutzerverwaltung).toBeVisible();
await personManagement.input_Suchfeld.fill(username);
await personManagement.button_Suchen.click();
await expect(header.icon_myProfil).toBeVisible();
await expect(header.icon_logout).toBeVisible();
await expect(personManagement.comboboxMenuIcon_Schule).toBeVisible();
await expect(personManagement.comboboxMenuIcon_Rolle).toBeVisible();
await expect(personManagement.comboboxMenuIcon_Klasse).toBeVisible();
await expect(personManagement.comboboxMenuIcon_Status).toBeVisible();
await page.getByRole("cell", { name: lastname, exact: true }).click({delay:500});
});

Expand Down

0 comments on commit 9d2d3f4

Please sign in to comment.