Skip to content

Commit

Permalink
test(visual): add unclipped activity names visual tests + a11y fixes (#…
Browse files Browse the repository at this point in the history
…7454)

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

* lint: add additional dictionaries
  • Loading branch information
ozyx authored Feb 2, 2024
1 parent 3cbaa7b commit ee5081f
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/**",
Expand Down
42 changes: 41 additions & 1 deletion e2e/tests/visual-a11y/planning.visual.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
});
Expand All @@ -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) => {
Expand Down
2 changes: 2 additions & 0 deletions src/ui/layout/PaneContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@
v-if="isCollapsable"
class="l-pane__collapse-button c-icon-button"
:name="collapseTitle"
:aria-label="collapseTitle"
:title="collapseTitle"
@click="toggleCollapse"
></button>
</div>
<button
class="l-pane__expand-button"
:name="expandTitle"
:aria-label="expandTitle"
:title="expandTitle"
@click="toggleCollapse"
>
Expand Down

0 comments on commit ee5081f

Please sign in to comment.