mirror of
https://github.com/inventree/InvenTree.git
synced 2026-04-03 18:11:10 +00:00
add playwright test
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import type { Locator } from '@playwright/test';
|
||||||
import { expect, test } from './baseFixtures.js';
|
import { expect, test } from './baseFixtures.js';
|
||||||
import { adminuser } from './defaults.js';
|
import { adminuser } from './defaults.js';
|
||||||
import { activateTableView, loadTab } from './helpers.js';
|
import { activateTableView, loadTab } from './helpers.js';
|
||||||
@@ -117,6 +118,14 @@ test('Printing - Report Editing', async ({ browser }) => {
|
|||||||
.getByRole('cell', { name: 'InvenTree Stock Item Label (' })
|
.getByRole('cell', { name: 'InvenTree Stock Item Label (' })
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
|
// check that styles are applied correctly
|
||||||
|
await expect(page.getByText('{% block style %}')).toBeVisible();
|
||||||
|
const element: Locator = page.getByText('block').first();
|
||||||
|
const color = await element.evaluate((el) => {
|
||||||
|
return window.getComputedStyle(el).getPropertyValue('color');
|
||||||
|
});
|
||||||
|
expect(color).toBe('rgb(78, 201, 176)');
|
||||||
|
|
||||||
// Generate preview
|
// Generate preview
|
||||||
await page.getByLabel('split-button-preview-options-action').click();
|
await page.getByLabel('split-button-preview-options-action').click();
|
||||||
await page
|
await page
|
||||||
|
|||||||
Reference in New Issue
Block a user