-
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.
created import page and spec and use page returns
- Loading branch information
1 parent
41b9bd2
commit 1eb944c
Showing
9 changed files
with
113 additions
and
31 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
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,14 @@ | ||
import { type Locator, Page } from '@playwright/test'; | ||
|
||
export class PersonImportViewPage { | ||
readonly page: Page; | ||
readonly body: Locator; | ||
readonly headlineBenutzerImport: Locator; | ||
|
||
constructor(page) { | ||
// Benutzerimport | ||
this.page = page; | ||
this.body = page.locator('body'); | ||
this.headlineBenutzerImport = page.getByTestId('layout-card-headline'); | ||
} | ||
} |
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,45 @@ | ||
import { test, expect } from "@playwright/test"; | ||
import { LandingPage } from "../pages/LandingView.page"; | ||
import { HeaderPage } from "../pages/Header.page"; | ||
import { LONG } from "../base/tags"; | ||
|
||
const PW = process.env.PW; | ||
const ADMIN = process.env.USER; | ||
const FRONTEND_URL = process.env.FRONTEND_URL || ""; | ||
|
||
test.describe(`Testfälle für den Benutzerimport": Umgebung: ${process.env.UMGEBUNG}: URL: ${process.env.FRONTEND_URL}:`, () => { | ||
test.beforeEach(async ({ page }) => { | ||
await test.step(`Login and navigate to Benutzerimport`, async () => { | ||
const landingPage = new LandingPage(page); | ||
|
||
await page.goto(FRONTEND_URL); | ||
const loginPage = await landingPage.goToLogin(); | ||
const startPage = await loginPage.login(ADMIN, PW); | ||
const menuPage = await startPage.goToAdministration(); | ||
const importPage = await menuPage.goToBenutzerImport(); | ||
|
||
await expect(importPage.headlineBenutzerImport).toBeVisible(); | ||
}); | ||
}); | ||
|
||
test.afterEach(async ({ page }) => { | ||
await test.step(`Testdaten löschen via API`, async () => { | ||
// delete test data | ||
}); | ||
|
||
await test.step(`Abmelden`, async () => { | ||
const header = new HeaderPage(page); | ||
await header.logout(); | ||
}); | ||
}); | ||
|
||
test("Als Landesadmin eine CSV-Datei mit Benutzerdaten hochladen und importieren", {tag: [LONG]}, async ({ page }) => { | ||
const schulname = ""; | ||
const rollenname = ""; | ||
const csvFile = ""; | ||
|
||
await test.step(``, async () => { | ||
// upload CSV file | ||
}); | ||
}); | ||
}); |
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