mirror of
https://github.com/inventree/InvenTree.git
synced 2026-02-14 10:17:07 +00:00
[bug] Fix table ordering (#11277)
* Additional filtering options for stock list * Fix ordering for stock table * Ordering fix for build order table * Ordering for supplier parts and manufacturer parts * SalesOrderLineItem: Order by IPN * ReturnOrderLineItem table: - Order by part name - Order by part IPN * Update API version to 451 Increment API version to 451 and update changelog. * Add playwright tests for column sorting * Add backend tests for API ordering --------- Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
@@ -167,3 +167,16 @@ export const deletePart = async (name: string) => {
|
||||
expect(res.status()).toBe(204);
|
||||
}
|
||||
};
|
||||
|
||||
// Click on the column sorting toggle
|
||||
export const toggleColumnSorting = async (page: Page, columnName: string) => {
|
||||
// Click on the column header to toggle sorting
|
||||
const regex = new RegExp(
|
||||
`^${columnName}\\s*(Not sorted|Sorted ascending|Sorted descending)$`,
|
||||
'i'
|
||||
);
|
||||
|
||||
await page.getByRole('button', { name: regex }).click();
|
||||
await page.waitForTimeout(50);
|
||||
await page.waitForLoadState('networkidle');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user