mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 20:45:44 +00:00
Platform UI - React integration (#5011)
* Add SPA views for react #2789 * split up frontend urls * Add settings for frontend url loading * add new UI scaffold * remove tracking insert * add platform app * ensure static indexes work too * add lingui * add lingui config * add mgmt tasks * add base locales * settings for frontend dev * fix typo * update deps * add pre-commit * add eslint * add testing scaffold * fix paths * remove error - tests trip correctly * merge workflow * cleanup samples * use name inline with other tests * Add real worl frontend tests * setup env * tun migrations first * optimize setup time * setup demo dataset * optimize run setup * add test for class ui * rename * fix typo * and another typo * do install * run migrations first * fix name * cleanup * use other credentials * use other credentials * fix qc * move envs to qc * remove create_site * reduce testing env * fix test * fix test call * allaccess user * add ui plattform check * add better check * remove unneeded env * enable debug * reduce wait time * also build frontend on static * add sort plugin * fix order * run pre-commit fixes * add node min version * Docker container (#129) * Fix allocation check for completing build order (#5199) - Allocation check only applies to untracked line items * docker dev Install required node packages to docker development image * add import order settings * cleanout built ui * remove default arg from build * remove eslint * optimize svg * add build step for plattform UI * fix install command * use alpine commands * do not use cache when creating image --------- Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
31
src/frontend/tests/classic.spec.ts
Normal file
31
src/frontend/tests/classic.spec.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
import exp from 'constants';
|
||||
|
||||
test('Check classic index site', async ({ page }) => {
|
||||
await page.goto('./api/');
|
||||
await page.goto('./index/');
|
||||
await expect(page).toHaveTitle('InvenTree Demo Server | Sign In');
|
||||
await expect(
|
||||
page.getByRole('heading', { name: 'InvenTree Demo Server' })
|
||||
).toBeVisible();
|
||||
|
||||
await page.getByLabel('username').fill('allaccess');
|
||||
await page.getByLabel('password').fill('nolimits');
|
||||
await page.click('button', { text: 'Sign In' });
|
||||
await page.waitForURL('**/index/');
|
||||
|
||||
await page.waitForLoadState('networkidle');
|
||||
await expect(page).toHaveTitle('InvenTree Demo Server | Index');
|
||||
await expect(page.getByRole('button', { name: 'allaccess' })).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: 'Parts', exact: true })
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: 'Stock', exact: true })
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: 'Build', exact: true })
|
||||
).toBeVisible();
|
||||
await expect(page.getByRole('button', { name: 'Buy' })).toBeVisible();
|
||||
await expect(page.getByRole('button', { name: 'Sell' })).toBeVisible();
|
||||
});
|
20
src/frontend/tests/ui_plattform.spec.ts
Normal file
20
src/frontend/tests/ui_plattform.spec.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
|
||||
test('Basic Platform UI test', async ({ page }) => {
|
||||
await page.goto('./index/');
|
||||
await expect(page).toHaveTitle('InvenTree Demo Server | Sign In');
|
||||
await expect(
|
||||
page.getByRole('heading', { name: 'InvenTree Demo Server' })
|
||||
).toBeVisible();
|
||||
|
||||
await page.getByLabel('username').fill('allaccess');
|
||||
await page.getByLabel('password').fill('nolimits');
|
||||
await page.click('button', { text: 'Sign In' });
|
||||
|
||||
await page.goto('./platform/');
|
||||
|
||||
await expect(page).toHaveTitle('InvenTree Demo Server');
|
||||
await expect(
|
||||
page.getByRole('heading', { name: 'Welcome to the new frontend!' })
|
||||
).toBeVisible();
|
||||
});
|
Reference in New Issue
Block a user