-
Notifications
You must be signed in to change notification settings - Fork 1
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
Sergio Florez
authored and
Sergio Florez
committed
Jan 26, 2025
1 parent
40d51db
commit 34dd332
Showing
2 changed files
with
9 additions
and
6 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,17 +1,21 @@ | ||
import { expect, test } from '@playwright/test'; | ||
import { caritasRework } from '../config'; | ||
import { ensureLanguage } from '../utils'; | ||
|
||
test('Login as an advice seeker', async ({ page }) => { | ||
const username = process.env.TEST_USERNAME; | ||
const password = process.env.TEST_PASSWORD; | ||
const loginButton = page.locator('button.button__item.button__primary'); | ||
await page.goto(`${caritasRework.dev}`); | ||
ensureLanguage(page); | ||
await page.fill('input[id="username"]', username!); | ||
await page.fill('input[id="passwordInput"]', password!); | ||
await page.click('button[id="login"]'); | ||
await loginButton.click(); | ||
await page.locator('.sessionsList__illustration__image').click(); | ||
await expect(page.locator('a[href="/profile"]')).toBeVisible(); | ||
await expect(page.locator('div[id="local-switch-wrapper"]')).toBeVisible(); | ||
await page.click('div[id="logout"]'); | ||
await page | ||
.locator('svg[aria-label="Log out"]') | ||
.nth(0) | ||
.click({ force: true }); | ||
await expect(page.locator('h1.headline--1')).toBeVisible(); | ||
await expect(page.locator('h4.headline--4')).toBeVisible(); | ||
}); |
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