Add playwright test
This commit is contained in:
parent
1e3ee637ad
commit
e44d441f14
|
|
@ -374,6 +374,7 @@ export default function NavigationTree({
|
|||
>
|
||||
<Stack gap='xs'>
|
||||
<TextInput
|
||||
aria-label='nav-tree-search'
|
||||
placeholder={t`Search...`}
|
||||
value={searchValue}
|
||||
onChange={(event) => setSearchValue(event.currentTarget.value)}
|
||||
|
|
|
|||
|
|
@ -70,6 +70,24 @@ test('Stock - Location Tree', async ({ browser }) => {
|
|||
await page.getByLabel('breadcrumb-1-factory').click();
|
||||
|
||||
await page.getByRole('cell', { name: 'Factory' }).first().waitFor();
|
||||
|
||||
// Load the tree again - from a deeply nested location
|
||||
// We expect it to auto-expand to the current location
|
||||
await navigate(page, 'stock/location/17/stock-items');
|
||||
await page.getByLabel('nav-breadcrumb-action').click();
|
||||
|
||||
for (let ii = 0; ii <= 5; ii++) {
|
||||
await page
|
||||
.locator('div')
|
||||
.filter({ hasText: `Location ${ii}` })
|
||||
.first()
|
||||
.waitFor();
|
||||
}
|
||||
|
||||
// Let's search for a particular location
|
||||
await page.getByRole('textbox', { name: 'nav-tree-search' }).fill('room');
|
||||
await page.getByText('Storage Room A').first().waitFor();
|
||||
await page.getByText('Storage Room B').first().waitFor();
|
||||
});
|
||||
|
||||
test('Stock - Location Delete', async ({ browser }) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue