Robustify playwright tests (#12331)

* Robustify playwright tests

* More test tweaks
This commit is contained in:
Oliver
2026-07-08 20:31:34 +10:00
committed by GitHub
parent b63d829891
commit 75f6960782
3 changed files with 8 additions and 5 deletions
+3 -5
View File
@@ -81,14 +81,12 @@ test('Company - Supplier Parts', async ({ browser }) => {
await loadTab(page, 'Supplier Parts');
await clearTableFilters(page);
await page.getByText(/1 \- 25 \/ 77\d/).waitFor();
await page.getByText(/1 \- 25 \/ 7\d\d/).waitFor();
await setTableChoiceFilter(page, 'Primary', 'Yes');
await page.getByText(/1 \- 25 \/ 31\d/).waitFor();
await page.getByText(/1 \- 25 \/ 3\d\d/).waitFor();
await clearTableFilters(page);
await setTableChoiceFilter(page, 'Primary', 'No');
await page.getByText(/1 \- 25 \/ 45\d/).waitFor();
await page.getByText(/1 \- 25 \/ 4\d\d/).waitFor();
});
@@ -503,6 +503,7 @@ test('Parts - Details - Upload image modal accepts pasted clipboard image', asyn
await page
.getByRole('tabpanel', { name: 'Part Details' })
.locator('img')
.first()
.hover();
const uploadButton = page
@@ -550,10 +551,13 @@ test('Parts - Details - Upload image modal accepts pasted clipboard image', asyn
await page.getByRole('button', { name: 'Submit' }).click();
await page.getByText('Image uploaded').waitFor();
await page.reload();
// Now remove the associated image
await page
.getByRole('tabpanel', { name: 'Part Details' })
.locator('img')
.first()
.hover();
await page
.getByRole('button', { name: 'action-button-delete-image' })