From 1ef9512f188914a2b00313f4c08be8662b14cd81 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 30 Apr 2024 01:59:16 +0200 Subject: [PATCH] [PUI] Add more table tests (#7143) * expand part tests * add stock item tests --- src/frontend/tests/pui_general.spec.ts | 11 ++++++++++- src/frontend/tests/pui_stock.spec.ts | 8 ++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/frontend/tests/pui_general.spec.ts b/src/frontend/tests/pui_general.spec.ts index eb688a37ba..97c8df588e 100644 --- a/src/frontend/tests/pui_general.spec.ts +++ b/src/frontend/tests/pui_general.spec.ts @@ -27,10 +27,19 @@ test('PUI - Parts', async ({ page }) => { await page.getByText('1551ACLR').click(); await page.getByRole('tab', { name: 'Part Details' }).click(); await page.getByRole('tab', { name: 'Parameters' }).click(); - // await page.getByRole('tab', { name: 'Stock' }).click(); + await page + .getByRole('tab', { name: 'Part Details' }) + .locator('xpath=..') + .getByRole('tab', { name: 'Stock', exact: true }) + .click(); await page.getByRole('tab', { name: 'Allocations' }).click(); await page.getByRole('tab', { name: 'Used In' }).click(); await page.getByRole('tab', { name: 'Pricing' }).click(); + + await page.goto(`${baseUrl}/part/category/index/parts`); + await page.getByText('Blue Chair').click(); + await page.getByRole('tab', { name: 'Bill of Materials' }).click(); + await page.getByRole('tab', { name: 'Build Orders' }).click(); }); test('PUI - Parts - Manufacturer Parts', async ({ page }) => { diff --git a/src/frontend/tests/pui_stock.spec.ts b/src/frontend/tests/pui_stock.spec.ts index cf6ea247f5..976eed1d49 100644 --- a/src/frontend/tests/pui_stock.spec.ts +++ b/src/frontend/tests/pui_stock.spec.ts @@ -16,6 +16,14 @@ test('PUI - Stock', async ({ page }) => { await page.getByRole('tab', { name: 'Stock Locations' }).click(); await page.getByRole('tab', { name: 'Stock Items' }).click(); await page.getByRole('tab', { name: 'Location Details' }).click(); + + await page.goto(`${baseUrl}/stock/item/1194/details`); + await page.getByText('D.123 | Doohickey').waitFor(); + await page.getByText('Batch Code: BX-123-2024-2-7').waitFor(); + await page.getByRole('tab', { name: 'Stock Tracking' }).click(); + await page.getByRole('tab', { name: 'Test Data' }).click(); + await page.getByText('395c6d5586e5fb656901d047be27e1f7').waitFor(); + await page.getByRole('tab', { name: 'Installed Items' }).click(); }); test('PUI - Build', async ({ page }) => {