mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-27 18:18:46 +00:00
[UI] Table column filters (#12103)
* Expose properties for column based filtering * Adjust renderers * Hide filter if name does not match * Allow multiple filters on same column * Better formatting * Add filtering support for multiple tables * Revert yarn.lock changes * Fix date input props * Updated column * Add filter to PartTable * Add playwright tests for new column filters * Update CHANGELOG * Updated docs * Reduce padding * Update more table filters * More filter columns * Adjust playwright test * Simplify playwright test * Robustify playwright tests * Add some delay * Add some buffer time
This commit is contained in:
1 parent
a86e94c63d
commit
7f1f2dbad2
33 files changed
+407
-99
No files matched your search
@@ -9,6 +9,41 @@ import {
|
||||
} from './helpers.js';
|
||||
import { doCachedLogin } from './login.js';
|
||||
|
||||
// Test filtering by "quick filter" actions (against table columns)
|
||||
test('Tables - Quick Filters', async ({ browser }) => {
|
||||
const page = await doCachedLogin(browser, {
|
||||
url: 'part/category/index/parts/'
|
||||
});
|
||||
|
||||
await clearTableFilters(page);
|
||||
|
||||
await page
|
||||
.getByRole('button', { name: 'Part Not sorted' })
|
||||
.getByRole('button')
|
||||
.first()
|
||||
.click();
|
||||
await page.getByRole('combobox', { name: 'choice-filter-active' }).click();
|
||||
await page.getByRole('option', { name: 'Yes' }).click();
|
||||
|
||||
await page
|
||||
.getByRole('button', { name: 'Part Not sorted' })
|
||||
.getByRole('button')
|
||||
.first()
|
||||
.click();
|
||||
await page.getByRole('combobox', { name: 'choice-filter-locked' }).click();
|
||||
await page.getByRole('option', { name: 'No' }).click();
|
||||
|
||||
await page
|
||||
.getByRole('button', { name: 'IPN Not sorted' })
|
||||
.getByRole('button')
|
||||
.first()
|
||||
.click();
|
||||
await page.getByRole('combobox', { name: 'choice-filter-has_ipn' }).click();
|
||||
await page.getByRole('option', { name: 'Yes' }).click();
|
||||
|
||||
await page.getByRole('cell', { name: 'ENCAB' }).first().waitFor();
|
||||
});
|
||||
|
||||
test('Tables - Filters', async ({ browser }) => {
|
||||
// Head to the "build order list" page
|
||||
const page = await doCachedLogin(browser, { url: 'manufacturing/index/' });
|
||||
@@ -46,7 +81,10 @@ test('Tables - Filters', async ({ browser }) => {
|
||||
await page.getByRole('button', { name: 'Add Filter' }).click();
|
||||
await page.getByRole('combobox', { name: 'Filter' }).click();
|
||||
await page.getByRole('option', { name: 'Outstanding' }).click();
|
||||
await page.getByRole('combobox', { name: 'Value' }).click();
|
||||
|
||||
await page
|
||||
.getByRole('combobox', { name: 'choice-filter-outstanding' })
|
||||
.click();
|
||||
await page.getByRole('option', { name: 'Yes' }).click();
|
||||
|
||||
// Save the filter group
|
||||
|
||||
Reference in new issue
Block a user