Compare commits

...

9 Commits

Author SHA1 Message Date
49cf23b7e9 form no work 2023-12-28 21:47:51 -08:00
37a2b05612 chore: first fixes 2023-12-28 21:47:43 -08:00
3c89236da2 fix import 2023-12-27 21:53:16 -08:00
827ec5690f use stable object 2023-12-27 21:53:07 -08:00
5c8355c7f8 remove deploysentinel 2023-12-27 21:52:48 -08:00
0f1d80c6b6 Merge branch 'master' of https://github.com/nasa/openmct into eslint-playwright-changes 2023-12-27 21:48:57 -08:00
1e8bb5fd8b chore: add new rules and fix overrides 2023-12-27 20:56:23 -08:00
e1fffaf39a chore:bump eslint playwright 2023-12-27 20:56:06 -08:00
6d47b5bc14 chore: folder changes 2023-12-27 20:55:49 -08:00
68 changed files with 24 additions and 23 deletions

View File

@ -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'
}
}
]

View File

@ -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

View File

@ -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

View File

@ -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' }]
]
};

View File

@ -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,

View File

@ -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 }) => {

View File

@ -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;

View File

@ -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 }) => {

View File

@ -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', () => {

View File

@ -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();

View File

@ -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",

View File

@ -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