Compare commits
9 Commits
master
...
eslint-pla
Author | SHA1 | Date | |
---|---|---|---|
49cf23b7e9 | |||
37a2b05612 | |||
3c89236da2 | |||
827ec5690f | |||
5c8355c7f8 | |||
0f1d80c6b6 | |||
1e8bb5fd8b | |||
e1fffaf39a | |||
6d47b5bc14 |
@ -2,13 +2,16 @@
|
||||
module.exports = {
|
||||
extends: ['plugin:playwright/playwright-test'],
|
||||
rules: {
|
||||
'playwright/max-nested-describe': ['error', { max: 1 }]
|
||||
'playwright/max-nested-describe': ['error', { max: 1 }],
|
||||
'playwright/no-nth-methods': 'error',
|
||||
'playwright/no-raw-locators': 'error'
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['tests/visual/*.spec.js'],
|
||||
files: ['tests/visual-a11y/*.spec.js'],
|
||||
rules: {
|
||||
'playwright/no-wait-for-timeout': 'off'
|
||||
'playwright/no-wait-for-timeout': 'off',
|
||||
'playwright/expect-expect': 'off'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -84,12 +84,10 @@ async function createDomainObjectWithDefaults(
|
||||
await page.getByRole('button', { name: 'Create' }).click();
|
||||
|
||||
// Click the object specified by 'type'
|
||||
await page.click(`li[role='menuitem']:text("${type}")`);
|
||||
await page.getByRole('menuitem', { name: new RegExp(`${type}`) }).click();
|
||||
|
||||
// Modify the name input field of the domain object to accept 'name'
|
||||
const nameInput = page.locator('form[name="mctForm"] .first input[type="text"]');
|
||||
await nameInput.fill('');
|
||||
await nameInput.fill(name);
|
||||
await page.getByLabel('Title', { exact: true }).fill(name);
|
||||
|
||||
if (page.testNotes) {
|
||||
// Fill the "Notes" section with information about the
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { test, expect } = require('./pluginFixtures');
|
||||
const { test, expect } = require('../pluginFixtures');
|
||||
const AxeBuilder = require('@axe-core/playwright').default;
|
||||
|
||||
// Constants for repeated values
|
@ -76,8 +76,7 @@ const config = {
|
||||
outputFolder: '../html-test-results' //Must be in different location due to https://github.com/microsoft/playwright/issues/12840
|
||||
}
|
||||
],
|
||||
['junit', { outputFile: '../test-results/results.xml' }],
|
||||
['@deploysentinel/playwright']
|
||||
['junit', { outputFile: '../test-results/results.xml' }]
|
||||
]
|
||||
};
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
const { test, expect } = require('../../pluginFixtures.js');
|
||||
const { test, expect } = require('../../fixtures/pluginFixtures');
|
||||
const {
|
||||
createDomainObjectWithDefaults,
|
||||
createNotification,
|
||||
|
@ -24,7 +24,7 @@
|
||||
This test suite is dedicated to tests which verify branding related components.
|
||||
*/
|
||||
|
||||
const { test, expect } = require('../../baseFixtures.js');
|
||||
const { test, expect } = require('../../../baseFixtures.js');
|
||||
|
||||
test.describe('Branding tests', () => {
|
||||
test('About Modal launches with basic branding properties', async ({ page }) => {
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@ -33,8 +33,8 @@ comfortable running this test during a live mission?" Avoid creating or deleting
|
||||
Make no assumptions about the order that elements appear in the DOM.
|
||||
*/
|
||||
|
||||
const { test, expect } = require('../../pluginFixtures');
|
||||
const { createDomainObjectWithDefaults, expandEntireTree } = require('../../appActions');
|
||||
const { test, expect } = require('../../../pluginFixtures');
|
||||
const { createDomainObjectWithDefaults, expandEntireTree } = require('../../../appActions');
|
||||
|
||||
test.describe('Verify tooltips', () => {
|
||||
let folder1;
|
@ -20,8 +20,8 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
const { createDomainObjectWithDefaults, waitForPlotsToRender } = require('../../appActions');
|
||||
const { test, expect } = require('../../pluginFixtures');
|
||||
const { createDomainObjectWithDefaults, waitForPlotsToRender } = require('../../../appActions');
|
||||
const { test, expect } = require('../../../pluginFixtures');
|
||||
|
||||
test.describe('Tabs View', () => {
|
||||
test('Renders tabbed elements nicely', async ({ page }) => {
|
@ -25,8 +25,8 @@ Collection of Visual Tests set to run with browser clock manipulate made possibl
|
||||
clockOptions plugin fixture.
|
||||
*/
|
||||
|
||||
const { VISUAL_URL, MISSION_TIME } = require('../../constants');
|
||||
const { test, expect } = require('../../pluginFixtures');
|
||||
const { VISUAL_URL, MISSION_TIME } = require('../../../constants');
|
||||
const { test, expect } = require('../../../pluginFixtures');
|
||||
const percySnapshot = require('@percy/playwright');
|
||||
|
||||
test.describe('Visual - Controlled Clock', () => {
|
@ -34,14 +34,14 @@ test.describe("Visual - Check Notification Info Banner of 'Save successful' @a11
|
||||
await page.goto(VISUAL_URL, { waitUntil: 'domcontentloaded' });
|
||||
});
|
||||
|
||||
test("Create a clock, click on 'Save successful' banner and dismiss it", async ({
|
||||
test("Create a folder, click on 'Save successful' banner and dismiss it", async ({
|
||||
page,
|
||||
theme
|
||||
}) => {
|
||||
// Create a clock domain object
|
||||
await createDomainObjectWithDefaults(page, {
|
||||
type: 'Clock',
|
||||
name: 'Default Clock'
|
||||
type: 'Condition Widget',
|
||||
name: 'Visual Condition Widget'
|
||||
});
|
||||
// Click on the div with role="alert" that has "Save successful" text
|
||||
await page.locator('div[role="alert"]:has-text("Save successful")').click();
|
@ -32,7 +32,7 @@
|
||||
"eslint-config-prettier": "9.0.0",
|
||||
"eslint-plugin-compat": "4.2.0",
|
||||
"eslint-plugin-no-unsanitized": "4.0.2",
|
||||
"eslint-plugin-playwright": "0.12.0",
|
||||
"eslint-plugin-playwright": "0.20.0",
|
||||
"eslint-plugin-prettier": "4.2.1",
|
||||
"eslint-plugin-simple-import-sort": "10.0.0",
|
||||
"eslint-plugin-unicorn": "49.0.0",
|
||||
|
@ -32,10 +32,11 @@
|
||||
<div
|
||||
v-for="section in formSections"
|
||||
:key="section.id"
|
||||
:aria-labelledby="'sectionTitle'"
|
||||
class="c-form__section"
|
||||
:class="section.cssClass"
|
||||
>
|
||||
<h2 v-if="section.name" class="c-form__section-header">
|
||||
<h2 v-if="section.name" :id="'sectionTitle' + section.id" class="c-form__section-header">
|
||||
{{ section.name }}
|
||||
</h2>
|
||||
<FormRow
|
||||
|