-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testfall Ergebnisliste Schuule auf Vollstaendigkeit pruefen fertig
- Loading branch information
Showing
7 changed files
with
63 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { type Locator, Page } from '@playwright/test'; | ||
|
||
export class SchuleManagementViewPage{ | ||
readonly page: Page; | ||
readonly text_h1_Administrationsbereich: Locator; | ||
readonly text_h2_Schulverwaltung: Locator; | ||
readonly table_header_Dienstellennummer: Locator; | ||
readonly table_header_Schulname: Locator; | ||
|
||
constructor(page){ | ||
this.page = page; | ||
this.text_h1_Administrationsbereich = page.getByTestId('admin-headline'); | ||
this.text_h2_Schulverwaltung = page.getByTestId('layout-card-headline'); | ||
this.table_header_Dienstellennummer = page.getByText('Dienststellennummer'); | ||
this.table_header_Schulname = page.getByText('Schulname'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { LandingPage } from '../pages/LandingView.page'; | ||
import { LoginPage } from '../pages/LoginView.page'; | ||
import { StartPage } from '../pages/StartView.page'; | ||
import { MenuPage } from '../pages/MenuBar.page'; | ||
import { SchuleManagementViewPage } from '../pages/admin/SchuleManagementView.page'; | ||
|
||
const PW = process.env.PW; | ||
const ADMIN = process.env.USER; | ||
const FRONTEND_URL = process.env.FRONTEND_URL; | ||
|
||
test.describe(`Testfälle für die Administration von Schulen: Umgebung: ${process.env.UMGEBUNG}: URL: ${process.env.FRONTEND_URL}:`, () => { | ||
test('Ergebnisliste Schulen auf Vollständigkeit prüfen', async ({ page }) => { | ||
const Landing = new LandingPage(page); | ||
const Startseite = new StartPage(page); | ||
const Login = new LoginPage(page); | ||
const Menue = new MenuPage(page); | ||
const SchuleManagementView = new SchuleManagementViewPage(page); | ||
|
||
await test.step(`Annmelden mit Benutzer ${ADMIN} und Schulverwaltung öffnen`, async () => { | ||
await page.goto(FRONTEND_URL); | ||
await Landing.button_Anmelden.click(); | ||
await Login.login(ADMIN, PW); | ||
await expect(Startseite.text_h2_Ueberschrift).toBeVisible(); | ||
await Startseite.card_item_schulportal_administration.click(); | ||
await Menue.menueItem_AlleSchulenAnzeigen.click(); | ||
}) | ||
|
||
await test.step(`Alle Elemente in der Ergebnisliste auf Existenz prüfen`, async () => { | ||
await expect(SchuleManagementView.text_h1_Administrationsbereich).toBeVisible(); | ||
await expect(SchuleManagementView.text_h2_Schulverwaltung).toBeVisible(); | ||
await expect(SchuleManagementView.text_h2_Schulverwaltung).toHaveText('Schulverwaltung'); | ||
await expect(SchuleManagementView.table_header_Dienstellennummer).toBeVisible(); | ||
await expect(SchuleManagementView.table_header_Schulname).toBeVisible(); | ||
}) | ||
}) | ||
}) |