-
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.
- Loading branch information
Showing
7 changed files
with
64 additions
and
73 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
FOO="bar100" | ||
FOO="bar100" | ||
UMGEBUNG="dev" | ||
PW="" | ||
USER="" | ||
URL_PORTAL="https://portal.qs.schule-sh.de/univention/portal/#/" | ||
URL_COOKIE_PORTAL="https://portal.qs.schule-sh.de" | ||
URL_COOKIE_UCS="https://ucs-sso.qs.schule-sh.de" |
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 +1,32 @@ | ||
# toDo | ||
# Schulportal Playwright, Doku für lokale Ausführung von den Tests | ||
|
||
## Zu installierende Node.js-Pakete | ||
npm install dotenv | ||
npm install otpauth | ||
npm install jimp | ||
npm install qrcode-reader | ||
|
||
## Oft verwendetet Konsolenbefehle | ||
|
||
# Einen bestimmten Test ausführen: | ||
npx playwright test TF0001.spec.ts | ||
|
||
# Umgebungsvariablen überschreiben | ||
gitbash: TIMEOUT="" npx playwright test TF0001.spec.ts --headed | ||
|
||
powershell: | ||
$env:TIMEOUT="" | ||
npx playwright test TF0001.spec.ts --headed | ||
|
||
# Einen Report von der Testausführung öffnen: | ||
npx playwright show-report results\results-2023-10-06T13_49_14_593 | ||
|
||
# Code-Generator starten: | ||
npx playwright codegen https://portal.qs.schule-sh.de/univention/portal/#/ | ||
|
||
# debug-mode: | ||
git bash: PWDEBUG=1 npx playwright test TF0001.spec.ts --headed | ||
|
||
powershell: | ||
PWDEBUG=1 | ||
npx playwright test TF0001.spec.ts --headed |
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 |
---|---|---|
@@ -1,21 +1,24 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { LoginPage } from '../pages/login'; | ||
|
||
test.describe('Erfolgreicher Standard Login', () => { | ||
test('Login Test', async ({ context, page }) => { | ||
const server = 'portal'; | ||
const url = 'https://' + server + '.qs.schule-sh.de/univention/login/#/'; | ||
const PW = process.env.PW; | ||
const USER = process.env.USER; | ||
const URL_PORTAL = process.env.URL_PORTAL; | ||
const URL_COOKIE_PORTAL = process.env.URL_COOKIE_PORTAL; | ||
const URL_COOKIE_UCS = process.env.URL_COOKIE_UCS; | ||
|
||
test.describe(`Start Test in der Umgebung: ${process.env.UMGEBUNG} und Server: ${process.env.URL_PORTAL}`, () => { | ||
test('Erfolgreicher Standard Login', async ({ context, page }) => { | ||
const Login = new LoginPage(page); | ||
|
||
await test.step('Hier passiert nichts', async () => { | ||
await test.step("Vorab die Browser-Cookies setzen (Simulation, dass der Benutzer in der Vergangen schon mal auf der Seite war)", async () => { | ||
context.addCookies([{name:"schuposh-consent", value: "do-not-change-me", url: URL_COOKIE_PORTAL}]); | ||
context.addCookies([{name:"schuposh-consent", value: "do-not-change-me", url: URL_COOKIE_UCS}]); | ||
}) | ||
|
||
await test.step('Negativer login', async () => { | ||
await Login.login('xxxxxxxx', 'xxxxxxx', url); | ||
await Login.login('xxxxxxxx', 'yyyyyyyy', URL_PORTAL); | ||
}) | ||
// await page.pause(); | ||
}) | ||
}) | ||
|
||
|
||
|
||
//await page.pause(); | ||
}) |
This file was deleted.
Oops, something went wrong.