mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 21:45:39 +00:00
[PUI] Page titles (#8467)
* Add <PageTitle /> component * Use useEffect to override hard-coded value * Ensure page titles are tracked across the site * Adjust unit tests * Playwright test updates * Tweak tests * Update InvenTreeTable.tsx Revert unused change
This commit is contained in:
@ -100,14 +100,12 @@ test('Parts - Allocations', async ({ page }) => {
|
||||
await doQuickLogin(page);
|
||||
|
||||
// Let's look at the allocations for a single stock item
|
||||
await page.goto(`${baseUrl}/stock/item/324/`);
|
||||
await page.getByRole('tab', { name: 'Allocations' }).click();
|
||||
|
||||
// TODO: Un-comment these lines!
|
||||
// await page.goto(`${baseUrl}/stock/item/324/`);
|
||||
// await page.getByRole('tab', { name: 'Allocations' }).click();
|
||||
|
||||
// await page.getByRole('button', { name: 'Build Order Allocations' }).waitFor();
|
||||
// await page.getByRole('cell', { name: 'Making some blue chairs' }).waitFor();
|
||||
// await page.getByRole('cell', { name: 'Making tables for SO 0003' }).waitFor();
|
||||
await page.getByRole('button', { name: 'Build Order Allocations' }).waitFor();
|
||||
await page.getByRole('cell', { name: 'Making some blue chairs' }).waitFor();
|
||||
await page.getByRole('cell', { name: 'Making tables for SO 0003' }).waitFor();
|
||||
|
||||
// Let's look at the allocations for an entire part
|
||||
await page.goto(`${baseUrl}/part/74/details`);
|
||||
@ -172,7 +170,8 @@ test('Parts - Pricing (Nothing, BOM)', async ({ page }) => {
|
||||
|
||||
// Part with no history
|
||||
await page.goto(`${baseUrl}/part/82/pricing`);
|
||||
await page.getByText('1551ABK').waitFor();
|
||||
|
||||
await page.getByText('Small plastic enclosure, black').waitFor();
|
||||
await page.getByRole('tab', { name: 'Part Pricing' }).click();
|
||||
await page.getByLabel('Part Pricing').getByText('Part Pricing').waitFor();
|
||||
await page.getByRole('button', { name: 'Pricing Overview' }).waitFor();
|
||||
@ -183,7 +182,7 @@ test('Parts - Pricing (Nothing, BOM)', async ({ page }) => {
|
||||
|
||||
// Part with history
|
||||
await page.goto(`${baseUrl}/part/108/pricing`);
|
||||
await page.getByText('Part: Blue Chair').waitFor();
|
||||
await page.getByText('A chair - with blue paint').waitFor();
|
||||
await page.getByRole('tab', { name: 'Part Pricing' }).click();
|
||||
await page.getByLabel('Part Pricing').getByText('Part Pricing').waitFor();
|
||||
await page.getByRole('button', { name: 'Pricing Overview' }).waitFor();
|
||||
@ -221,7 +220,7 @@ test('Parts - Pricing (Supplier)', async ({ page }) => {
|
||||
|
||||
// Part
|
||||
await page.goto(`${baseUrl}/part/55/pricing`);
|
||||
await page.getByText('Part: C_100nF_0603').waitFor();
|
||||
await page.getByText('Ceramic capacitor, 100nF in').waitFor();
|
||||
await page.getByRole('tab', { name: 'Part Pricing' }).click();
|
||||
await page.getByLabel('Part Pricing').getByText('Part Pricing').waitFor();
|
||||
await page.getByRole('button', { name: 'Pricing Overview' }).waitFor();
|
||||
@ -247,7 +246,7 @@ test('Parts - Pricing (Variant)', async ({ page }) => {
|
||||
|
||||
// Part
|
||||
await page.goto(`${baseUrl}/part/106/pricing`);
|
||||
await page.getByText('Part: Chair').waitFor();
|
||||
await page.getByText('A chair - available in multiple colors').waitFor();
|
||||
await page.getByRole('tab', { name: 'Part Pricing' }).click();
|
||||
await page.getByLabel('Part Pricing').getByText('Part Pricing').waitFor();
|
||||
await page.getByRole('button', { name: 'Pricing Overview' }).waitFor();
|
||||
@ -273,7 +272,7 @@ test('Parts - Pricing (Internal)', async ({ page }) => {
|
||||
|
||||
// Part
|
||||
await page.goto(`${baseUrl}/part/65/pricing`);
|
||||
await page.getByText('Part: M2x4 SHCS').waitFor();
|
||||
await page.getByText('Socket head cap screw, M2').waitFor();
|
||||
await page.getByRole('tab', { name: 'Part Pricing' }).click();
|
||||
await page.getByLabel('Part Pricing').getByText('Part Pricing').waitFor();
|
||||
await page.getByRole('button', { name: 'Pricing Overview' }).waitFor();
|
||||
@ -298,7 +297,7 @@ test('Parts - Pricing (Purchase)', async ({ page }) => {
|
||||
|
||||
// Part
|
||||
await page.goto(`${baseUrl}/part/69/pricing`);
|
||||
await page.getByText('Part: 530470210').waitFor();
|
||||
await page.getByText('1.25mm Pitch, PicoBlade PCB').waitFor();
|
||||
await page.getByRole('tab', { name: 'Part Pricing' }).click();
|
||||
await page.getByLabel('Part Pricing').getByText('Part Pricing').waitFor();
|
||||
await page.getByRole('button', { name: 'Pricing Overview' }).waitFor();
|
||||
|
Reference in New Issue
Block a user