test(visual): add unclipped activity names visual tests + a11y fixes (#7454)

* test: add unclipped activity names visual tests + a11y fixes

* lint: add additional dictionaries
This commit is contained in:
Jesse Mazzella 2024-02-02 11:47:52 -08:00 committed by GitHub
parent 3cbaa7bf07
commit ee5081f807
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 44 additions and 2 deletions

View File

@ -498,7 +498,7 @@
"specced",
"countup"
],
"dictionaries": ["npm", "softwareTerms", "node", "html", "css", "bash", "en_US"],
"dictionaries": ["npm", "softwareTerms", "node", "html", "css", "bash", "en_US", "en-gb", "misc"],
"ignorePaths": [
"package.json",
"dist/**",

View File

@ -75,7 +75,25 @@ test.describe('Visual - Planning', () => {
parent: ganttChart.uuid
});
await setBoundsToSpanAllActivities(page, examplePlanSmall, ganttChart.url);
await percySnapshot(page, `Gantt Chart View (theme: ${theme})`, {
await percySnapshot(page, `Gantt Chart View (theme: ${theme}) - Clipped Activity Names`, {
scope: snapshotScope
});
// Expand the inspect pane and uncheck the 'Clip Activity Names' option
await page.getByRole('button', { name: 'Expand Inspect Pane' }).click();
await page.getByRole('tab', { name: 'Config' }).click();
await page.getByLabel('Edit Object').click();
await page.getByLabel('Clip Activity Names').click();
// Close the inspect pane and save the changes
await page.getByRole('button', { name: 'Collapse Inspect Pane' }).click();
await page.getByLabel('Save').click();
await page.getByRole('listitem', { name: 'Save and Finish Editing' }).click();
// Dismiss the notification
await page.getByLabel('Dismiss').click();
await percySnapshot(page, `Gantt Chart View (theme: ${theme}) - Unclipped Activity Names`, {
scope: snapshotScope
});
});
@ -98,6 +116,28 @@ test.describe('Visual - Planning', () => {
await percySnapshot(page, `Gantt Chart View w/ draft status (theme: ${theme})`, {
scope: snapshotScope
});
// Expand the inspect pane and uncheck the 'Clip Activity Names' option
await page.getByRole('button', { name: 'Expand Inspect Pane' }).click();
await page.getByRole('tab', { name: 'Config' }).click();
await page.getByLabel('Edit Object').click();
await page.getByLabel('Clip Activity Names').click();
// Close the inspect pane and save the changes
await page.getByRole('button', { name: 'Collapse Inspect Pane' }).click();
await page.getByLabel('Save').click();
await page.getByRole('listitem', { name: 'Save and Finish Editing' }).click();
// Dismiss the notification
await page.getByLabel('Dismiss').click();
await percySnapshot(
page,
`Gantt Chart View w/ draft status (theme: ${theme}) - Unclipped Activity Names`,
{
scope: snapshotScope
}
);
});
// Skipping for https://github.com/nasa/openmct/issues/7421
// test.afterEach(async ({ page }, testInfo) => {

View File

@ -29,6 +29,7 @@
v-if="isCollapsable"
class="l-pane__collapse-button c-icon-button"
:name="collapseTitle"
:aria-label="collapseTitle"
:title="collapseTitle"
@click="toggleCollapse"
></button>
@ -36,6 +37,7 @@
<button
class="l-pane__expand-button"
:name="expandTitle"
:aria-label="expandTitle"
:title="expandTitle"
@click="toggleCollapse"
>