Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: playwright setup first step #10

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

sfvcode
Copy link

@sfvcode sfvcode commented Nov 19, 2024

testing pipelines github actions

@vi-sudo
Copy link

vi-sudo commented Nov 19, 2024

tests/registration/registration.spec.ts Outdated Show resolved Hide resolved
.getByLabel(/(passwort\s?wiederholen|repeat\s?password)/i)
.fill(password!);
await page
.getByLabel(/Ich habe die Datenschutzerklä|I have the Privacy policy/)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check on what you are checking. Someone can change the texts in Weblate which will then result in failing tests and development work needed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not recommend using .getByLabel in our setup

const username = process.env.TEST_USERNAME;
const password = process.env.TEST_PASSWORD;
await page.goto(`${caritasRework.dev}`);
ensureLanguage(page);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can start with this, but generally I would recommend having the tests working no matter what language is used.

const password = process.env.TEST_PASSWORD;
await page.goto(`${caritasRework.dev}`);
ensureLanguage(page);
await page.getByLabel(/(user\s?name|benutzername)/i).fill(username!);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather go with something like searching input with id "username"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants