2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 03:26:45 +00:00
InvenTree/src/frontend/tests/modals.spec.ts
Matthias Mair dd83735710
Fix vulnerable dependencies (#8655)
* bump container reqs

* bump vul frontend dep

* fix tests
2024-12-12 08:38:11 +11:00

64 lines
2.1 KiB
TypeScript

import { test } from './baseFixtures.js';
import { doQuickLogin } from './login.js';
test('Modals as admin', async ({ page }) => {
await doQuickLogin(page, 'admin', 'inventree');
// use server info
await page.getByLabel('open-spotlight').click();
await page
.getByRole('button', {
name: 'Server Information About this InvenTree instance'
})
.click();
await page.getByRole('cell', { name: 'Instance Name' }).waitFor();
await page.getByRole('button', { name: 'Close' }).click();
await page.waitForURL('**/platform/home');
// use license info
await page.getByLabel('open-spotlight').click();
await page
.getByRole('button', {
name: 'License Information Licenses for dependencies of the service'
})
.click();
await page.getByText('License Information').first().waitFor();
await page.getByRole('tab', { name: 'backend Packages' }).click();
await page.getByRole('button', { name: 'Babel BSD License' }).click();
await page
.getByText('by the Babel Team, see AUTHORS for more information')
.waitFor();
await page.getByRole('tab', { name: 'frontend Packages' }).click();
await page.getByRole('button', { name: '@sentry/core MIT' }).click();
await page
.getByLabel('@sentry/coreMIT')
.getByText('Copyright (c) 2019')
.waitFor();
await page
.getByLabel('License Information')
.getByRole('button')
.first()
.click();
// use about
await page.getByLabel('open-spotlight').click();
await page
.getByRole('button', { name: 'About InvenTree About the InvenTree org' })
.click();
await page.getByRole('cell', { name: 'InvenTree Version' }).click();
await page.goto('./platform/');
// Barcode scanning window
await page.getByRole('button', { name: 'Open Barcode Scanner' }).click();
await page.getByRole('banner').getByRole('button').click();
await page.getByRole('button', { name: 'Open Barcode Scanner' }).click();
await page.getByRole('button', { name: 'Close modal' }).click();
await page.getByRole('button', { name: 'Open Barcode Scanner' }).click();
await page.waitForTimeout(500);
await page.getByRole('banner').getByRole('button').click();
});