2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-03 22:08:49 +00:00
InvenTree/src/frontend/tests/ui_plattform.spec.ts
Matthias Mair f58eacf64e
[PUI] Add coverage testing ()
* add coverage to PUI

* fix testing command

* always do all steps

* fix test assumptions

* add test for serving and logging into pui from django / cui tech stack

* fix up coverage

* fix intentation

* remove paralell flags

* remove coverage finish step

* remove flag

* change names

* add full clickdown test

* more tests

* more tests

* sprinkle in some timeouts

* try using admin

* disable page 1 tests for now

* remove additional tests for now

* only build sourcemaps if coverage is enabled

* fix sourcemap assumption

* Update .github/workflows/qc_checks.yaml

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>

* fix package.json

* add finish step

---------

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
2024-04-03 19:26:38 +11:00

29 lines
1.1 KiB
TypeScript

import { classicUrl } from './baseFixtures';
import { expect, test } from './baseFixtures.js';
test('PUI - Basic test via django', async ({ page }) => {
await page.goto(`${classicUrl}/platform/`);
await expect(page).toHaveTitle('InvenTree Demo Server');
await page.waitForURL('**/platform/');
await page.getByLabel('username').fill('allaccess');
await page.getByLabel('password').fill('nolimits');
await page.getByRole('button', { name: 'Log in' }).click();
await page.waitForURL('**/platform/*');
await page.goto(`${classicUrl}/platform/`);
await expect(page).toHaveTitle('InvenTree Demo Server');
});
test('PUI - Basic test', async ({ page }) => {
await page.goto('./platform/');
await expect(page).toHaveTitle('InvenTree');
await page.waitForURL('**/platform/');
await page.getByLabel('username').fill('allaccess');
await page.getByLabel('password').fill('nolimits');
await page.getByRole('button', { name: 'Log in' }).click();
await page.waitForURL('**/platform');
await page.goto('./platform/');
await expect(page).toHaveTitle('InvenTree');
});