Compare commits
9 Commits
telemetry-
...
eslint-pla
Author | SHA1 | Date | |
---|---|---|---|
49cf23b7e9 | |||
37a2b05612 | |||
3c89236da2 | |||
827ec5690f | |||
5c8355c7f8 | |||
0f1d80c6b6 | |||
1e8bb5fd8b | |||
e1fffaf39a | |||
6d47b5bc14 |
@ -2,13 +2,16 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
extends: ['plugin:playwright/playwright-test'],
|
extends: ['plugin:playwright/playwright-test'],
|
||||||
rules: {
|
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: [
|
overrides: [
|
||||||
{
|
{
|
||||||
files: ['tests/visual/*.spec.js'],
|
files: ['tests/visual-a11y/*.spec.js'],
|
||||||
rules: {
|
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();
|
await page.getByRole('button', { name: 'Create' }).click();
|
||||||
|
|
||||||
// Click the object specified by 'type'
|
// 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'
|
// Modify the name input field of the domain object to accept 'name'
|
||||||
const nameInput = page.locator('form[name="mctForm"] .first input[type="text"]');
|
await page.getByLabel('Title', { exact: true }).fill(name);
|
||||||
await nameInput.fill('');
|
|
||||||
await nameInput.fill(name);
|
|
||||||
|
|
||||||
if (page.testNotes) {
|
if (page.testNotes) {
|
||||||
// Fill the "Notes" section with information about the
|
// Fill the "Notes" section with information about the
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { test, expect } = require('./pluginFixtures');
|
const { test, expect } = require('../pluginFixtures');
|
||||||
const AxeBuilder = require('@axe-core/playwright').default;
|
const AxeBuilder = require('@axe-core/playwright').default;
|
||||||
|
|
||||||
// Constants for repeated values
|
// 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
|
outputFolder: '../html-test-results' //Must be in different location due to https://github.com/microsoft/playwright/issues/12840
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
['junit', { outputFile: '../test-results/results.xml' }],
|
['junit', { outputFile: '../test-results/results.xml' }]
|
||||||
['@deploysentinel/playwright']
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
const { test, expect } = require('../../pluginFixtures.js');
|
const { test, expect } = require('../../fixtures/pluginFixtures');
|
||||||
const {
|
const {
|
||||||
createDomainObjectWithDefaults,
|
createDomainObjectWithDefaults,
|
||||||
createNotification,
|
createNotification,
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
This test suite is dedicated to tests which verify branding related components.
|
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.describe('Branding tests', () => {
|
||||||
test('About Modal launches with basic branding properties', async ({ page }) => {
|
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.
|
Make no assumptions about the order that elements appear in the DOM.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { test, expect } = require('../../pluginFixtures');
|
const { test, expect } = require('../../../pluginFixtures');
|
||||||
const { createDomainObjectWithDefaults, expandEntireTree } = require('../../appActions');
|
const { createDomainObjectWithDefaults, expandEntireTree } = require('../../../appActions');
|
||||||
|
|
||||||
test.describe('Verify tooltips', () => {
|
test.describe('Verify tooltips', () => {
|
||||||
let folder1;
|
let folder1;
|
@ -20,8 +20,8 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
const { createDomainObjectWithDefaults, waitForPlotsToRender } = require('../../appActions');
|
const { createDomainObjectWithDefaults, waitForPlotsToRender } = require('../../../appActions');
|
||||||
const { test, expect } = require('../../pluginFixtures');
|
const { test, expect } = require('../../../pluginFixtures');
|
||||||
|
|
||||||
test.describe('Tabs View', () => {
|
test.describe('Tabs View', () => {
|
||||||
test('Renders tabbed elements nicely', async ({ page }) => {
|
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.
|
clockOptions plugin fixture.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { VISUAL_URL, MISSION_TIME } = require('../../constants');
|
const { VISUAL_URL, MISSION_TIME } = require('../../../constants');
|
||||||
const { test, expect } = require('../../pluginFixtures');
|
const { test, expect } = require('../../../pluginFixtures');
|
||||||
const percySnapshot = require('@percy/playwright');
|
const percySnapshot = require('@percy/playwright');
|
||||||
|
|
||||||
test.describe('Visual - Controlled Clock', () => {
|
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' });
|
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,
|
page,
|
||||||
theme
|
theme
|
||||||
}) => {
|
}) => {
|
||||||
// Create a clock domain object
|
// Create a clock domain object
|
||||||
await createDomainObjectWithDefaults(page, {
|
await createDomainObjectWithDefaults(page, {
|
||||||
type: 'Clock',
|
type: 'Condition Widget',
|
||||||
name: 'Default Clock'
|
name: 'Visual Condition Widget'
|
||||||
});
|
});
|
||||||
// Click on the div with role="alert" that has "Save successful" text
|
// Click on the div with role="alert" that has "Save successful" text
|
||||||
await page.locator('div[role="alert"]:has-text("Save successful")').click();
|
await page.locator('div[role="alert"]:has-text("Save successful")').click();
|
@ -32,7 +32,7 @@
|
|||||||
"eslint-config-prettier": "9.0.0",
|
"eslint-config-prettier": "9.0.0",
|
||||||
"eslint-plugin-compat": "4.2.0",
|
"eslint-plugin-compat": "4.2.0",
|
||||||
"eslint-plugin-no-unsanitized": "4.0.2",
|
"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-prettier": "4.2.1",
|
||||||
"eslint-plugin-simple-import-sort": "10.0.0",
|
"eslint-plugin-simple-import-sort": "10.0.0",
|
||||||
"eslint-plugin-unicorn": "49.0.0",
|
"eslint-plugin-unicorn": "49.0.0",
|
||||||
|
@ -32,10 +32,11 @@
|
|||||||
<div
|
<div
|
||||||
v-for="section in formSections"
|
v-for="section in formSections"
|
||||||
:key="section.id"
|
:key="section.id"
|
||||||
|
:aria-labelledby="'sectionTitle'"
|
||||||
class="c-form__section"
|
class="c-form__section"
|
||||||
:class="section.cssClass"
|
: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 }}
|
{{ section.name }}
|
||||||
</h2>
|
</h2>
|
||||||
<FormRow
|
<FormRow
|
||||||
|