2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-07 12:22:11 +00:00
This commit is contained in:
Matthias Mair
2024-05-01 17:38:43 +02:00
parent 75bf3378e6
commit c5a27e63d2
2 changed files with 8 additions and 18 deletions

View File

@@ -8,7 +8,7 @@ test('PUI - Modals as admin', async ({ page }) => {
await page.getByRole('button', { name: 'Open spotlight' }).click(); await page.getByRole('button', { name: 'Open spotlight' }).click();
await page await page
.getByRole('button', { .getByRole('button', {
name: 'Server Information About this Inventree instance' name: 'About this Inventree instance'
}) })
.click(); .click();
await page.getByRole('cell', { name: 'Instance Name' }).waitFor(); 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: 'Open spotlight' }).click();
await page await page
.getByRole('button', { .getByRole('button', {
name: 'License Information Licenses for dependencies of the service' name: 'Licenses for dependencies of the service'
}) })
.click(); .click();
await page.getByText('License Information').first().waitFor(); 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('tab', { name: 'frontend Packages' }).click();
await page.getByRole('button', { name: '@sentry/utils MIT' }).click(); await page.getByRole('button', { name: '@sentry/utils MIT' }).click();
await page await page
.getByLabel('@sentry/utilsMIT7.109.0') .getByLabel('@sentry/utilsMIT')
.getByText('Copyright (c) 2019 Sentry (') .getByText('Copyright (c) 2019 Sentry (')
.waitFor(); .waitFor();
@@ -43,27 +43,17 @@ test('PUI - Modals as admin', async ({ page }) => {
// use about // use about
await page.getByRole('button', { name: 'Open spotlight' }).click(); await page.getByRole('button', { name: 'Open spotlight' }).click();
await page await page.getByRole('button', { name: 'About the InvenTree org' }).click();
.getByRole('button', { name: 'About InvenTree About the InvenTree org' })
.click();
await page.getByRole('cell', { name: 'InvenTree Version' }).click(); await page.getByRole('cell', { name: 'InvenTree Version' }).click();
await page.goto('./platform/'); await page.goto('./platform/');
// qr code modal // qr code modal
await page.getByRole('button', { name: 'Open QR code scanner' }).click(); await page.getByRole('button', { name: 'Open QR code scanner' }).click();
await page await page.getByRole('banner').getByRole('button').click();
.locator('div')
.filter({ hasText: /^Scan QR code$/ })
.getByRole('button')
.click();
await page.getByRole('button', { name: 'Open QR code scanner' }).click(); await page.getByRole('button', { name: 'Open QR code scanner' }).click();
await page.getByRole('button', { name: 'Close modal' }).click(); await page.getByRole('button', { name: 'Close modal' }).click();
await page.getByRole('button', { name: 'Open QR code scanner' }).click(); await page.getByRole('button', { name: 'Open QR code scanner' }).click();
await page.waitForTimeout(500); await page.waitForTimeout(500);
await page await page.getByRole('banner').getByRole('button').click();
.locator('div')
.filter({ hasText: /^Scan QR code$/ })
.getByRole('button')
.click();
}); });

View File

@@ -46,7 +46,7 @@ test('PUI - Pages - Index - Playground', async ({ page }) => {
// EditCategory // EditCategory
await page.getByRole('button', { name: 'Edit Category' }).click(); 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.getByText('Category 0').click();
await page await page
.getByLabel('Edit Category') .getByLabel('Edit Category')
@@ -61,7 +61,7 @@ test('PUI - Pages - Index - Playground', async ({ page }) => {
// Create Part new Modal // Create Part new Modal
await page.getByRole('button', { name: 'Create Part new Modal' }).click(); 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.getByText('Category 0').click();
await page await page
.getByLabel('Create part') .getByLabel('Create part')