Skip to content

Commit

Permalink
Fix breadcrumb for <BuildOrderDetail /> (#8305)
Browse files Browse the repository at this point in the history
* Fix breadcrumb for <BuildOrderDetail />

* Add delay for playwright tests
  • Loading branch information
SchrodingersGat authored Oct 18, 2024
1 parent 17bf7bb commit 5f905aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/frontend/src/pages/build/BuildDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { ApiEndpoints } from '../../enums/ApiEndpoints';
import { ModelType } from '../../enums/ModelType';
import { UserRoles } from '../../enums/Roles';
import { useBuildOrderFields } from '../../forms/BuildForms';
import { getDetailUrl } from '../../functions/urls';
import {
useCreateApiFormModal,
useEditApiFormModal
Expand Down Expand Up @@ -523,7 +524,10 @@ export default function BuildDetail() {
imageUrl={build.part_detail?.image ?? build.part_detail?.thumbnail}
breadcrumbs={[
{ name: t`Manufacturing`, url: '/manufacturing' },
{ name: build.reference, url: `/build/${build.pk}` }
{
name: build.reference,
url: getDetailUrl(ModelType.build, build.pk)
}
]}
actions={buildActions}
/>
Expand Down
3 changes: 3 additions & 0 deletions src/frontend/tests/pages/pui_stock.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ test('Stock - Serial Numbers', async ({ page }) => {
await page.getByLabel('open-search').click();

await page.getByLabel('global-search-input').clear();

await page.waitForTimeout(250);
await page.getByLabel('global-search-input').fill('widget green');
await page.waitForTimeout(250);

// Remove the "stock item" results group
await page.getByLabel('remove-search-group-stockitem').click();
Expand Down

0 comments on commit 5f905aa

Please sign in to comment.