-
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.
* test case pw-reset finished * fix regarding new landing page * menue.page deleted * Variable NewPW_Username nach new_password umbenannt * text_warning_pwReset entfernt, da bereits definiert, * Prüfung ob Text vorhanden ist jetzt mit expect und toBeVisible anstatt locator.click * Findings aus review behoben
- Loading branch information
Showing
13 changed files
with
445 additions
and
175 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,11 @@ | ||
import { type Locator, Page } from '@playwright/test'; | ||
|
||
export class HeaderPage{ | ||
readonly page: Page; | ||
readonly button_logout: Locator; | ||
|
||
constructor(page){ | ||
this.page = page; | ||
this.button_logout = page.getByTestId('nav-logout-button'); | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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,11 @@ | ||
import { type Locator, Page } from '@playwright/test'; | ||
|
||
export class UserManagementPage{ | ||
readonly page: Page; | ||
readonly text_h2: Locator; | ||
|
||
constructor(page){ | ||
this.page = page; | ||
this.text_h2 = page.getByRole('heading', { name: "Benutzerverwaltung" }); | ||
} | ||
} |
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,23 @@ | ||
import { type Locator, Page } from '@playwright/test'; | ||
|
||
export class UserManagementDetailPage{ | ||
readonly page: Page; | ||
readonly text_h2: Locator; | ||
readonly button_pwChange: Locator; | ||
readonly button_pwReset: Locator; | ||
readonly text_pwResetInfo: Locator; | ||
readonly icon_pwVisible: Locator; | ||
readonly input_pw: Locator; | ||
readonly button_close_pwreset: Locator; | ||
|
||
constructor(page){ | ||
this.page = page; | ||
this.text_h2 = page.getByRole('heading', { name: 'Benutzer bearbeiten' }); | ||
this.button_pwChange = page.getByTestId('open-password-reset-dialog-icon'); | ||
this.button_pwReset = page.getByTestId('password-reset-button'); | ||
this.text_pwResetInfo = page.getByTestId('password-reset-info-text'); | ||
this.icon_pwVisible = page.getByTestId('show-password-icon'); | ||
this.input_pw = page.locator('[data-testid="password-output-field"] input'); | ||
this.button_close_pwreset = page.getByTestId('close-password-reset-dialog-button'); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,26 +1,30 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { LandingPage } from '../pages/landing.page'; | ||
import { StartPage } from '../pages/start.page'; | ||
import { LoginPage } from '../pages/login.page'; | ||
import { MenuePage } from '../pages/menue.page'; | ||
import { HeaderPage } from '../pages/header.page'; | ||
|
||
const PW = process.env.PW; | ||
const USER = process.env.USER; | ||
const URL_PORTAL = process.env.URL_PORTAL; | ||
|
||
test.describe(`Testfälle für die Authentifizierung: Umgebung: ${process.env.UMGEBUNG}: URL: ${process.env.URL_PORTAL}:`, () => { | ||
test('Erfolgreicher Standard Logoff', async ({ page }) => { | ||
test('SPSH-185 Erfolgreicher Standard Logoff', async ({ page }) => { | ||
const Landing = new LandingPage(page); | ||
const Startseite = new StartPage(page) | ||
const Login = new LoginPage(page); | ||
const Menue = new MenuePage(page); | ||
const Header = new HeaderPage(page); | ||
|
||
await test.step(`Annmelden mit Benutzer ${USER}`, async () => { | ||
await page.goto(URL_PORTAL); | ||
await Menue.button_Anmelden.click(); | ||
await Landing.button_Anmelden.click(); | ||
await Login.login(USER, PW); | ||
await expect(Menue.button_Abmelden).toBeVisible(); | ||
await expect(Startseite.text_h2_Ueberschrift).toBeVisible(); | ||
}) | ||
|
||
await test.step(`Abmelden Benutzer ${USER}`, async () => { | ||
await Menue.button_Abmelden.click(); | ||
await expect(Menue.button_Anmelden).toBeEnabled(); | ||
await Header.button_logout.click(); | ||
await expect(Landing.text_Willkommen).toBeEnabled(); | ||
}) | ||
}) | ||
}) |
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