mirror of
https://github.com/inventree/InvenTree.git
synced 2026-05-06 09:43:38 +00:00
[UI] BOM pricing fix (#11860)
* Ensure BOM pricing is fetched * Enable IPN sorting for "used-in" table * Update playwright tests
This commit is contained in:
@@ -186,6 +186,7 @@ export default function BomPricingPanel({
|
||||
params: {
|
||||
part: part?.pk,
|
||||
sub_part_detail: true,
|
||||
pricing: true,
|
||||
has_pricing: true
|
||||
},
|
||||
enableSelection: false,
|
||||
|
||||
@@ -718,6 +718,7 @@ export function BomTable({
|
||||
params: {
|
||||
...params,
|
||||
part: partId,
|
||||
pricing: true,
|
||||
substitutes: true,
|
||||
part_detail: true,
|
||||
sub_part_detail: true,
|
||||
|
||||
@@ -42,7 +42,7 @@ export function UsedInTable({
|
||||
part: 'part_detail'
|
||||
}),
|
||||
IPNColumn({
|
||||
sortable: false
|
||||
sortable: true
|
||||
}),
|
||||
{
|
||||
accessor: 'part_detail.revision',
|
||||
|
||||
@@ -168,6 +168,12 @@ test('Parts - BOM', async ({ browser }) => {
|
||||
await navigate(page, 'part/87/bom');
|
||||
await loadTab(page, 'Bill of Materials');
|
||||
|
||||
// Check for pricing data to be displayed in the table
|
||||
await page
|
||||
.getByRole('cell', { name: /\$\d+\.\d+ - \$\d+\.\d+/ })
|
||||
.first()
|
||||
.waitFor();
|
||||
|
||||
// Mouse-hover to display BOM validation info for this assembly
|
||||
await page.getByRole('button', { name: 'bom-validation-info' }).hover();
|
||||
await page
|
||||
@@ -552,7 +558,14 @@ test('Parts - Pricing (Nothing, BOM)', async ({ browser }) => {
|
||||
await page.getByRole('button', { name: 'Quantity Not sorted' }).waitFor();
|
||||
await page.getByRole('button', { name: 'Unit Price Not sorted' }).waitFor();
|
||||
|
||||
// BOM Pricing - linkjumping
|
||||
// We expect some pricing data to be displayed
|
||||
await page
|
||||
.getByLabel('BOM Pricing')
|
||||
.getByRole('cell', { name: /\$0\.\d+ - \$0\.\d+/ })
|
||||
.first()
|
||||
.waitFor();
|
||||
|
||||
// BOM Pricing - link-jumping
|
||||
await page
|
||||
.getByLabel('BOM Pricing')
|
||||
.getByRole('table')
|
||||
@@ -577,7 +590,7 @@ test('Parts - Pricing (Supplier)', async ({ browser }) => {
|
||||
await page.getByRole('button', { name: 'Supplier Pricing' }).click();
|
||||
await page.getByRole('button', { name: 'SKU Not sorted' }).waitFor();
|
||||
|
||||
// Supplier Pricing - linkjumping
|
||||
// Supplier Pricing - link-jumping
|
||||
const target = page.getByText('ARR-26041-LPC').first();
|
||||
await target.waitFor();
|
||||
await target.click();
|
||||
@@ -599,7 +612,7 @@ test('Parts - Pricing (Variant)', async ({ browser }) => {
|
||||
// Variant Pricing
|
||||
await page.getByRole('button', { name: 'Variant Pricing' }).click();
|
||||
|
||||
// Variant Pricing - linkjumping
|
||||
// Variant Pricing - link-jumping
|
||||
const target = page.getByText('Green Chair').first();
|
||||
await target.waitFor();
|
||||
await target.click();
|
||||
|
||||
Reference in New Issue
Block a user