diff --git a/src/frontend/tests/modals.spec.ts b/src/frontend/tests/modals.spec.ts index a6cfc0c020..778d498d18 100644 --- a/src/frontend/tests/modals.spec.ts +++ b/src/frontend/tests/modals.spec.ts @@ -8,7 +8,7 @@ test('PUI - Modals as admin', async ({ page }) => { await page.getByRole('button', { name: 'Open spotlight' }).click(); await page .getByRole('button', { - name: 'Server Information About this Inventree instance' + name: 'About this Inventree instance' }) .click(); await page.getByRole('cell', { name: 'Instance Name' }).waitFor(); @@ -20,7 +20,7 @@ test('PUI - Modals as admin', async ({ page }) => { await page.getByRole('button', { name: 'Open spotlight' }).click(); await page .getByRole('button', { - name: 'License Information Licenses for dependencies of the service' + name: 'Licenses for dependencies of the service' }) .click(); await page.getByText('License Information').first().waitFor(); @@ -31,7 +31,7 @@ test('PUI - Modals as admin', async ({ page }) => { await page.getByRole('tab', { name: 'frontend Packages' }).click(); await page.getByRole('button', { name: '@sentry/utils MIT' }).click(); await page - .getByLabel('@sentry/utilsMIT7.109.0') + .getByLabel('@sentry/utilsMIT') .getByText('Copyright (c) 2019 Sentry (') .waitFor(); @@ -43,27 +43,17 @@ test('PUI - Modals as admin', async ({ page }) => { // use about await page.getByRole('button', { name: 'Open spotlight' }).click(); - await page - .getByRole('button', { name: 'About InvenTree About the InvenTree org' }) - .click(); + await page.getByRole('button', { name: 'About the InvenTree org' }).click(); await page.getByRole('cell', { name: 'InvenTree Version' }).click(); await page.goto('./platform/'); // qr code modal await page.getByRole('button', { name: 'Open QR code scanner' }).click(); - await page - .locator('div') - .filter({ hasText: /^Scan QR code$/ }) - .getByRole('button') - .click(); + await page.getByRole('banner').getByRole('button').click(); await page.getByRole('button', { name: 'Open QR code scanner' }).click(); await page.getByRole('button', { name: 'Close modal' }).click(); await page.getByRole('button', { name: 'Open QR code scanner' }).click(); await page.waitForTimeout(500); - await page - .locator('div') - .filter({ hasText: /^Scan QR code$/ }) - .getByRole('button') - .click(); + await page.getByRole('banner').getByRole('button').click(); }); diff --git a/src/frontend/tests/pages/pui_index.spec.ts b/src/frontend/tests/pages/pui_index.spec.ts index cddccd67c6..7edb6f4fd5 100644 --- a/src/frontend/tests/pages/pui_index.spec.ts +++ b/src/frontend/tests/pages/pui_index.spec.ts @@ -46,7 +46,7 @@ test('PUI - Pages - Index - Playground', async ({ page }) => { // EditCategory await page.getByRole('button', { name: 'Edit Category' }).click(); - await page.locator('.css-1xvbfjt-Input2').first().click(); + await page.locator('.css-fehojk-Input2').first().click(); await page.getByText('Category 0').click(); await page .getByLabel('Edit Category') @@ -61,7 +61,7 @@ test('PUI - Pages - Index - Playground', async ({ page }) => { // Create Part new Modal await page.getByRole('button', { name: 'Create Part new Modal' }).click(); - await page.locator('.css-1xvbfjt-Input2').first().click(); + await page.locator('.css-fehojk-Input2').first().click(); await page.getByText('Category 0').click(); await page .getByLabel('Create part')