2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-02-25 16:17:58 +00:00

[UI] Suggested pricing (#10867)

* Refactor NumberField into separate component

* Add helper func to ensure a number is a number

* Use placeholder value for suggested sale price

* Fix for auto-fill

* Tweak price calculation

* Add UI testing for sales order price breaks

* Fix aria label name

* Annotate price breaks to supplier part

* Fetch price break data

* Support price breaks for purchase order pricing

* Fix required to prevent circular imports

* Add playwright tests for purchase order price breaks

* Bump API version

* Re-add output options for SupplierPriceBreakList

* Revert change

* Simplify unit test
This commit is contained in:
Oliver
2025-11-20 22:51:27 +11:00
committed by GitHub
parent 835c7784f9
commit a76ec0a7b8
16 changed files with 465 additions and 201 deletions

View File

@@ -514,10 +514,13 @@ test('Parts - Parameters', async ({ browser }) => {
// Submit with "false" value
await page.getByRole('button', { name: 'Submit' }).click();
const cell = await page.getByRole('cell', {
name: 'Is this part polarized?'
});
// Check for the expected values in the table
let row = await getRowFromCell(
await page.getByRole('cell', { name: 'Polarized', exact: true })
);
const row = await getRowFromCell(cell);
await row.getByRole('cell', { name: 'No', exact: true }).waitFor();
await row.getByRole('cell', { name: 'allaccess' }).waitFor();
await row.getByLabel(/row-action-menu-/i).click();
@@ -532,13 +535,6 @@ test('Parts - Parameters', async ({ browser }) => {
.click();
await page.getByRole('button', { name: 'Submit' }).click();
row = await getRowFromCell(
await page.getByRole('cell', { name: 'Polarized', exact: true })
);
await row.getByRole('cell', { name: 'Yes', exact: true }).waitFor();
await page.getByText('1 - 1 / 1').waitFor();
// Finally, delete the parameter
await row.getByLabel(/row-action-menu-/i).click();
await page.getByRole('menuitem', { name: 'Delete' }).click();