Skip to content

Commit 6e727e8

Browse files
[Scout] Failing test tags a11y checks (elastic#270244)
This PR resolves [Failing test: Tags management — accessibility - tags management page a11y](elastic#267280) issue.
1 parent 2ff8fca commit 6e727e8

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

x-pack/platform/plugins/shared/saved_objects_tagging/test/scout/ui/fixtures/page_objects/tags_table.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,8 @@ export class TagsTable {
100100
return this.bulkActionsButton.isVisible();
101101
}
102102

103-
// assign/delete live in the EUI portal after the `...` menu is opened; edit
104-
// (isPrimary) is always inline on the row.
105-
async clickRowAction(tagName: string, action: string, location: 'portal' | 'inline') {
103+
// portal: action rendered in EUI portal (collapsed menu); inline: rendered on the row.
104+
async clickRowAction(tagName: string, action: string, location: 'portal' | 'inline' = 'inline') {
106105
const testSubj = `tagsTableAction-${action}`;
107106
const actionLocator =
108107
location === 'portal'
@@ -113,9 +112,6 @@ export class TagsTable {
113112
await actionLocator.click();
114113
}
115114

116-
// The `...` button appears slightly after the table-is-ready signal fires
117-
// (the edit/assign/delete actions are non-primary and collapse when >2 exist),
118-
// so waitFor is used instead of an instant isVisible check.
119115
async clickCollapsedRowAction(tagName: string, action: string) {
120116
const row = this.rowByName(tagName);
121117
const collapseBtn = row.locator('[data-test-subj="euiCollapsedItemActionsButton"]');

x-pack/platform/plugins/shared/saved_objects_tagging/test/scout/ui/tests/tags_a11y.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ test.describe('Tags management — accessibility', { tag: tags.stateful.classic
5656
});
5757

5858
await test.step('edit tag panel', async () => {
59-
await tagsTable.clickRowAction('a11yTag', 'edit', 'inline');
59+
await tagsTable.clickRowAction('a11yTag', 'edit');
6060
await tagModal.form.waitFor({ state: 'visible' });
6161
const { violations } = await page.checkA11y({ include: A11Y_SELECTORS });
6262
expect(violations).toStrictEqual([]);

0 commit comments

Comments
 (0)