2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-06 05:30:56 +00:00

[CI] Playwright testing improvements (#8985)

* Run playwright tests in headless mode

* Add navigation helper

* Validate files

* test fix

* Remove 'headless'

* Fixes

* Fix for 'navigate' helper

* Further updates
This commit is contained in:
Oliver
2025-02-01 16:29:13 +11:00
committed by GitHub
parent 66496fb669
commit 821b311d73
16 changed files with 116 additions and 87 deletions

View File

@ -1,11 +1,11 @@
import { test } from './baseFixtures.js';
import { baseUrl } from './defaults.js';
import { navigate } from './helpers.js';
import { doQuickLogin } from './login.js';
test('Company', async ({ page }) => {
await doQuickLogin(page);
await page.goto(`${baseUrl}/company/1/details`);
await navigate(page, 'company/1/details');
await page.getByLabel('Details').getByText('DigiKey Electronics').waitFor();
await page.getByRole('cell', { name: 'https://www.digikey.com/' }).waitFor();
await page.getByRole('tab', { name: 'Supplied Parts' }).click();
@ -44,7 +44,7 @@ test('Company', async ({ page }) => {
*/
test('Admin Button', async ({ page }) => {
await doQuickLogin(page, 'admin', 'inventree');
await page.goto(`${baseUrl}/company/1/details`);
await navigate(page, 'company/1/details');
// Click on the admin button
await page.getByLabel(/action-button-open-in-admin/).click();