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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 5 deletions

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();
});

View File

@ -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' })

View File

@ -98,6 +98,7 @@ test('Login - Change Password', async ({ page }) => {
// Navigate to the 'change password' page
await navigate(page, 'settings/user/account', { waitUntil: 'networkidle' });
await page.waitForTimeout(1000);
await openDetailAction(page, 'account', 'change-password');
// First attempt with some errors