mirror of
https://github.com/inventree/InvenTree.git
synced 2026-04-06 19:41:16 +00:00
[CI] Playwright improvements (#9395)
* Allow port 4173 (vite preview) * Change 'base' attr based on vite command * Allow api_host to be specified separately * Harden API host functionality * Adjust server selections * Cleanup vite.config.ts * Adjust playwright configuration - Allow to run in "production" mode - Builds the code first - Runs only the backend web server - Not suitable for coverage * Tweak github actions * Tweak QC file * Reduce number of steps * Tweak CI file * Fix typo * Ensure translation before build * Fix hard-coded test * Test tweaks * uncomment * Revert some changes * Run with gunicorn, single worker * Reduce log output in DEBUG mode * Update deps * Add global-setup func * Fix for .gitignore file * Cached auth state * Tweak login func * Updated tests * Enable parallel workers again * Simplify config * Try with a single worker again * Single retry mode * Run auth setup first - Prevent issues with parallel test doing login * Improve test setup process * Tweaks * Bump to 3 workers * Tweak playwright settings * Revert change * Revert change
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import test from '@playwright/test';
|
||||
import { globalSearch, loadTab, navigate } from './helpers';
|
||||
import { doQuickLogin } from './login';
|
||||
import { doCachedLogin } from './login';
|
||||
|
||||
// Helper function to open the export data dialog
|
||||
const openExportDialog = async (page) => {
|
||||
@@ -11,11 +11,12 @@ const openExportDialog = async (page) => {
|
||||
};
|
||||
|
||||
// Test data export for various order types
|
||||
test('Exporting - Orders', async ({ page }) => {
|
||||
await doQuickLogin(page, 'steven', 'wizardstaff');
|
||||
|
||||
// Download list of purchase orders
|
||||
await navigate(page, 'purchasing/index/purchase-orders');
|
||||
test('Exporting - Orders', async ({ browser }) => {
|
||||
const page = await doCachedLogin(browser, {
|
||||
username: 'steven',
|
||||
password: 'wizardstaff',
|
||||
url: 'purchasing/index/purchase-orders'
|
||||
});
|
||||
|
||||
await openExportDialog(page);
|
||||
|
||||
@@ -69,8 +70,11 @@ test('Exporting - Orders', async ({ page }) => {
|
||||
});
|
||||
|
||||
// Test for custom BOM exporter
|
||||
test('Exporting - BOM', async ({ page }) => {
|
||||
await doQuickLogin(page, 'steven', 'wizardstaff');
|
||||
test('Exporting - BOM', async ({ browser }) => {
|
||||
const page = await doCachedLogin(browser, {
|
||||
username: 'steven',
|
||||
password: 'wizardstaff'
|
||||
});
|
||||
|
||||
await globalSearch(page, 'MAST');
|
||||
await page.getByLabel('search-group-results-part').locator('a').click();
|
||||
|
||||
Reference in New Issue
Block a user