diff --git a/src/frontend/tests/pages/pui_part.spec.ts b/src/frontend/tests/pages/pui_part.spec.ts index 06345d9fc7..b7a44697ea 100644 --- a/src/frontend/tests/pages/pui_part.spec.ts +++ b/src/frontend/tests/pages/pui_part.spec.ts @@ -3,7 +3,7 @@ import { test } from '@playwright/test'; import { baseUrl } from '../defaults'; import { doQuickLogin } from '../login'; -test('PUI - Pages - Part - Pricing', async ({ page }) => { +test('PUI - Pages - Part - Pricing (Nothing, BOM)', async ({ page }) => { await doQuickLogin(page); // Part with no history @@ -12,7 +12,6 @@ test('PUI - Pages - Part - Pricing', async ({ page }) => { 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(); - await page.getByRole('button', { name: 'Pricing Overview' }).waitFor(); await page.getByText('Last Updated').waitFor(); await page.getByRole('button', { name: 'Purchase History' }).isDisabled(); await page.getByRole('button', { name: 'Internal Pricing' }).isDisabled(); @@ -24,7 +23,6 @@ test('PUI - Pages - Part - Pricing', async ({ page }) => { 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(); - await page.getByRole('button', { name: 'Pricing Overview' }).waitFor(); await page.getByText('Last Updated').waitFor(); await page.getByRole('button', { name: 'Internal Pricing' }).isDisabled(); await page.getByRole('button', { name: 'Sale History' }).isDisabled(); @@ -53,3 +51,29 @@ test('PUI - Pages - Part - Pricing', async ({ page }) => { await page.getByText('Wood Screw').click(); await page.waitForURL('**/part/98/pricing'); }); + +test('PUI - Pages - Part - Pricing (Supplier)', async ({ page }) => { + await doQuickLogin(page); + + // Part + await page.goto(`${baseUrl}/part/55/pricing`); + await page.getByText('Part: C_100nF_0603').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(); + await page.getByText('Last Updated').waitFor(); + await page.getByRole('button', { name: 'Purchase History' }).isEnabled(); + await page.getByRole('button', { name: 'Internal Pricing' }).isDisabled(); + await page.getByRole('button', { name: 'Supplier Pricing' }).isEnabled(); + + // Supplier Pricing + await page.getByRole('button', { name: 'Supplier Pricing' }).click(); + await page.waitForTimeout(500); + await page.getByRole('button', { name: 'SKU Not sorted' }).waitFor(); + + // Supplier Pricing - linkjumping + let target = page.getByText('ARR-26041-LPC').first(); + await target.waitFor(); + await target.click(); + await page.waitForURL('**/purchasing/supplier-part/697/'); +});