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

remove retries #3769

Merged
merged 1 commit into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
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
18 changes: 2 additions & 16 deletions components/list/test/list-item-drag-handle.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,7 @@ describe('ListItemDragHandle', () => {
it(`Dispatch drag handle action event for "${testCase.result}" when "${testCase.keyPress}" is pressed.`, async() => {
const actionArea = element.shadowRoot.querySelector('d2l-button-move').shadowRoot.querySelector('button');
setTimeout(() => dispatchKeyEvent(actionArea, testCase.keyPress));
let e = await oneEvent(element, 'd2l-list-item-drag-handle-action');
// Firefox will trigger loss of focus randomly, so retry
if (e.detail.action === dragActions.save) {
element.activateKeyboardMode();
await element.updateComplete;
setTimeout(() => dispatchKeyEvent(actionArea, testCase.keyPress));
e = await oneEvent(element, 'd2l-list-item-drag-handle-action');
}
const e = await oneEvent(element, 'd2l-list-item-drag-handle-action');
expect(e.detail.action).to.equal(testCase.result);
});
});
Expand All @@ -77,14 +70,7 @@ describe('ListItemDragHandle', () => {
it(`Dispatch drag handle action event for "${testCase.result}" when "${testCase.keyPress}" is pressed.`, async() => {
const actionArea = element.shadowRoot.querySelector('d2l-button-move');
setTimeout(() => dispatchKeyEvent(actionArea, testCase.keyPress, !!testCase.shift));
let e = await oneEvent(element, 'd2l-list-item-drag-handle-action');
// Firefox will trigger loss of focus randomly, so retry
if (e.detail.action !== testCase.result && e.detail.action === dragActions.save) {
element.activateKeyboardMode();
await element.updateComplete;
setTimeout(() => dispatchKeyEvent(actionArea, testCase.keyPress, !!testCase.shift));
e = await oneEvent(element, 'd2l-list-item-drag-handle-action');
}
const e = await oneEvent(element, 'd2l-list-item-drag-handle-action');
expect(e.detail.action).to.equal(testCase.result);
});
});
Expand Down
Loading