Merge in DNS/adguard-home from AG-38975-upd-proxy to master Squashed commit of the following: commit 94fc1fb9bb1c004fea17d52f586af263b6918694 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Apr 17 20:45:12 2025 +0300 home: fix typo commit b1cbf45dcc54c6d4dc7de86868c189114caf7cb1 Merge: c2c868b7d3521e8ed9Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Apr 17 20:44:14 2025 +0300 Merge branch 'master' into AG-38975-upd-proxy commit c2c868b7d938eee6e4e4a19d43b2ed734155c7da Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Apr 17 20:19:23 2025 +0300 all: upd to tag commit 1680a9d79f34bd42f0b64712b2e7e968890e7c6e Merge: df42dec3a4d258972dAuthor: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Apr 16 14:08:46 2025 +0300 Merge branch 'master' into AG-38975-upd-proxy commit df42dec3a302af0e6e301365a943763cd87d752d Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Apr 16 13:43:29 2025 +0300 all: add thanks commit f212d6a9ee3d614bd6db776204c65298f0359a87 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Apr 14 17:57:33 2025 +0300 dnsforward: use bool commit 055072e29dee0673cf38b198476e252bdbade8d9 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Apr 11 18:35:38 2025 +0300 stats: imp doc commit 6554101a73564b7786cd77d250344ba141c0cbb5 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Apr 10 19:32:34 2025 +0300 all: log changes commit da8ecf17778be9481232222c8bb7682beea475c6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Apr 10 19:07:04 2025 +0300 all: upd proxy, add config
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import { test, expect } from '@playwright/test';
|
|
import { ADMIN_USERNAME, ADMIN_PASSWORD } from '../constants';
|
|
|
|
test.describe('Control Panel', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto('/login.html');
|
|
await page.getByTestId('username').click();
|
|
await page.getByTestId('username').fill(ADMIN_USERNAME);
|
|
await page.getByTestId('password').click();
|
|
await page.getByTestId('password').fill(ADMIN_PASSWORD);
|
|
await page.keyboard.press('Tab');
|
|
await page.getByTestId('sign_in').click();
|
|
await page.waitForURL((url) => !url.href.endsWith('/login.html'));
|
|
});
|
|
|
|
test('should sign out successfully', async ({ page }) => {
|
|
await page.getByTestId('sign_out').click();
|
|
|
|
await page.waitForURL((url) => url.href.endsWith('/login.html'));
|
|
|
|
await expect(page.getByTestId('sign_in')).toBeVisible();
|
|
});
|
|
|
|
test('should change theme to dark and then light', async ({ page }) => {
|
|
await page.getByTestId('theme_dark').click();
|
|
|
|
await expect(page.locator('body[data-theme="dark"]')).toBeVisible();
|
|
|
|
|
|
await page.getByTestId('theme_light').click();
|
|
|
|
await expect(page.locator('body:not([data-theme="dark"])')).toBeVisible();
|
|
});
|
|
});
|