-
Notifications
You must be signed in to change notification settings - Fork 200
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
Fix broken tests #1111
Fix broken tests #1111
Conversation
Required because we don't display `input` for expression editor.
7ee9f54
to
faab365
Compare
@@ -78,7 +78,7 @@ describe('provider/bpmn - EscalationProps', function() { | |||
elementRegistry.get('EscalationIntermediateEvent_1') | |||
]; | |||
|
|||
escalationElements.forEach(async (element) => { | |||
for (const element of escalationElements) { |
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.
🤣
|
||
async function expectEdited(container, exists) { | ||
|
||
await wait(50); |
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.
Why would the waitFor
utility from testing-library not work here, and keeping the test?
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 don't know but it failed even after rewrite. I can try again today.
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.
So this is how it looks with waitFor
, but it fails on MacOS in chromeheadless: 9abdfdb
It works in .only
though.
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 checked how the test suite behaves with different test suites, and it is green when I run only provider
tests, but starts to fail when everything is included. Perhaps it's a slow clean up that jams on a local machine?
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.
My advice would be: Let's keep this test. If absolutely needed, ignore parts of it on MacOS.
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.
OK in that case I am adding a warning for the future ourselves: aeb3e65
309e8fc
to
9abdfdb
Compare
9abdfdb
to
b7d2df3
Compare
Proposed Changes
This fixes some tests which used to throw uncaught promise exceptions.
I propose also to stop testing for the edited dot existence. These assertions are super flaky and slow (
wait 50 ms
included), and a rewrite towaitFor
did not resolve flakiness on my machine. I don't think this is a crucial feature, and we tested for it only in some places in the code base.Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}