-
Notifications
You must be signed in to change notification settings - Fork 25
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 unnecessary awaits for updateComplete #3771
Conversation
eventObj.keyCode = 27; | ||
|
||
setTimeout(() => document.dispatchEvent(eventObj)); | ||
setTimeout(() => sendKeys('press', 'Escape')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a little fixy-fixy while I was in here...
Thanks for the PR! 🎉 We've deployed an automatic preview for this PR - you can see your changes here:
|
@@ -6,15 +6,6 @@ import '../list-item-content.js'; | |||
import { expect, fixture, focusElem, html, oneEvent, sendKeysElem, waitUntil } from '@brightspace-ui/testing'; | |||
import { runConstructor } from '../../../tools/constructor-test-helper.js'; | |||
|
|||
const awaitListElementUpdates = async(rootElement, queries) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super gross. 🤮 Nice to see this gone!
@@ -123,7 +123,6 @@ describe('d2l-selection-input', () => { | |||
<d2l-selection-input key="key3" label="label3" disabled></d2l-selection-input> | |||
</d2l-test-selection> | |||
`); | |||
await el.updateComplete; | |||
await nextFrame(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this nextFrame()
is still needed? I'm imagining you already tried to remove it...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a lot of these in here so I didn't want to mess with too much that I wasn't completely confident would be covered by the new fixture
.
🎉 This PR is included in version 2.131.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Now that everything is using the new
fixture
that automaticallyawait
s nested Lit components'updateComplete
s, all of our tests that were doing that manually can... not do that.