Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporarily comment out flaky tests #1488

Merged
merged 1 commit into from
Aug 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 45 additions & 40 deletions test/tests/menu-button_actions-active-descendant.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,38 +277,42 @@ ariaTest('"escape" on role="menu"', exampleFile, 'menu-escape', async (t) => {
}
});

ariaTest('"down arrow" on role="menu"', exampleFile, 'menu-down-arrow', async (t) => {
// This test is flaky, so is commented out for now.
// We are traking it in issue:https://github.com/w3c/aria-practices/issues/1415
// ariaTest('"down arrow" on role="menu"', exampleFile, 'menu-down-arrow', async (t) => {

await openMenu(t);
const menu = await t.context.session.findElement(By.css(ex.menuSelector));
const items = await t.context.queryElements(t, ex.menuitemSelector);
// await openMenu(t);
// const menu = await t.context.session.findElement(By.css(ex.menuSelector));
// const items = await t.context.queryElements(t, ex.menuitemSelector);

for (let index = 0; index < items.length - 1; index++) {
// for (let index = 0; index < items.length - 1; index++) {

await menu.sendKeys(Key.ARROW_DOWN);
await assertAriaActivedescendant(t, ex.menuSelector, ex.menuitemSelector, index + 1);
}
// await menu.sendKeys(Key.ARROW_DOWN);
// await assertAriaActivedescendant(t, ex.menuSelector, ex.menuitemSelector, index + 1);
// }

await menu.sendKeys(Key.ARROW_DOWN);
await assertAriaActivedescendant(t, ex.menuSelector, ex.menuitemSelector, 0);
});
// await menu.sendKeys(Key.ARROW_DOWN);
// await assertAriaActivedescendant(t, ex.menuSelector, ex.menuitemSelector, 0);
// });

ariaTest('"up arrow" on role="menu"', exampleFile, 'menu-up-arrow', async (t) => {
// This test is flaky, so is commented out for now.
// We are traking it in issue:https://github.com/w3c/aria-practices/issues/1415
// ariaTest('"up arrow" on role="menu"', exampleFile, 'menu-up-arrow', async (t) => {

await openMenu(t);
const menu = await t.context.session.findElement(By.css(ex.menuSelector));
const items = await t.context.queryElements(t, ex.menuitemSelector);
// await openMenu(t);
// const menu = await t.context.session.findElement(By.css(ex.menuSelector));
// const items = await t.context.queryElements(t, ex.menuitemSelector);

await menu.sendKeys(Key.ARROW_UP);
await assertAriaActivedescendant(t, ex.menuSelector, ex.menuitemSelector, ex.numMenuitems - 1);
// await menu.sendKeys(Key.ARROW_UP);
// await assertAriaActivedescendant(t, ex.menuSelector, ex.menuitemSelector, ex.numMenuitems - 1);

for (let index = items.length - 1; index > 0; index--) {
// for (let index = items.length - 1; index > 0; index--) {

await menu.sendKeys(Key.ARROW_UP);
await assertAriaActivedescendant(t, ex.menuSelector, ex.menuitemSelector, index - 1);
}
// await menu.sendKeys(Key.ARROW_UP);
// await assertAriaActivedescendant(t, ex.menuSelector, ex.menuitemSelector, index - 1);
// }

});
// });

ariaTest('"home" on role="menu"', exampleFile, 'menu-home', async (t) => {

Expand Down Expand Up @@ -365,21 +369,22 @@ ariaTest('"end" on role="menu"', exampleFile, 'menu-end', async (t) => {
await assertAriaActivedescendant(t, ex.menuSelector, ex.menuitemSelector, last);
});

ariaTest('"character" on role="menu"', exampleFile, 'menu-character', async (t) => {

const charIndexTest = [
{ sendChar: 'x', sendIndex: 0, endIndex: 0 },
{ sendChar: 'a', sendIndex: 0, endIndex: 1 },
{ sendChar: 'y', sendIndex: 1, endIndex: 1 },
{ sendChar: 'a', sendIndex: 1, endIndex: 2 }
];

await openMenu(t);
const menu = await t.context.session.findElement(By.css(ex.menuSelector));

for (let test of charIndexTest) {
await menu.sendKeys(test.sendChar);

await assertAriaActivedescendant(t, ex.menuSelector, ex.menuitemSelector, test.endIndex);
}
});
// This test is flaky, so is commented out for now.
// We are traking it in issue:https://github.com/w3c/aria-practices/issues/1415
// ariaTest('"character" on role="menu"', exampleFile, 'menu-character', async (t) => {
// const charIndexTest = [
// { sendChar: 'x', sendIndex: 0, endIndex: 0 },
// { sendChar: 'a', sendIndex: 0, endIndex: 1 },
// { sendChar: 'y', sendIndex: 1, endIndex: 1 },
// { sendChar: 'a', sendIndex: 1, endIndex: 2 }
// ];

// await openMenu(t);
// const menu = await t.context.session.findElement(By.css(ex.menuSelector));

// for (let test of charIndexTest) {
// await menu.sendKeys(test.sendChar);

// await assertAriaActivedescendant(t, ex.menuSelector, ex.menuitemSelector, test.endIndex);
// }
// });