-
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
Changes from all commits
310b497
c0aef63
faab365
b7d2df3
aeb3e65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import TestContainer from 'mocha-test-container-support'; | ||
|
||
import { | ||
act | ||
act, | ||
waitFor | ||
} from '@testing-library/preact'; | ||
|
||
import { | ||
|
@@ -119,6 +120,8 @@ describe('provider/zeebe - BusinessRuleImplementationProps', function() { | |
})); | ||
|
||
|
||
// TODO(@barmac): this test is fails as false-positive when run locally on MacOS as part of the full test suite, | ||
// cf. https://github.com/bpmn-io/bpmn-js-properties-panel/pull/1111#pullrequestreview-2635770727 | ||
it('should display dmn', inject(async function(elementRegistry, selection) { | ||
|
||
// given | ||
|
@@ -138,6 +141,8 @@ describe('provider/zeebe - BusinessRuleImplementationProps', function() { | |
})); | ||
|
||
|
||
// TODO(@barmac): this test is fails as false-positive when run locally on MacOS as part of the full test suite, | ||
// cf. https://github.com/bpmn-io/bpmn-js-properties-panel/pull/1111#pullrequestreview-2635770727 | ||
it('should display jobWorker', inject(async function(elementRegistry, selection) { | ||
|
||
// given | ||
|
@@ -367,19 +372,14 @@ function getTaskHeaders(element) { | |
return getExtensionElementsList(businessObject, 'zeebe:TaskHeaders')[ 0 ]; | ||
} | ||
|
||
async function expectEdited(container, exists) { | ||
function expectEdited(container, exists) { | ||
return waitFor(() => { | ||
const indicator = domQuery(`${GROUP_SELECTOR} .bio-properties-panel-dot`, container); | ||
|
||
await wait(50); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why would the There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. So this is how it looks with There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 |
||
|
||
const indicator = domQuery(`${GROUP_SELECTOR} .bio-properties-panel-dot`, container); | ||
|
||
if (exists) { | ||
expect(indicator).to.exist; | ||
} else { | ||
expect(indicator).not.to.exist; | ||
} | ||
if (exists) { | ||
expect(indicator).to.exist; | ||
} else { | ||
expect(indicator).not.to.exist; | ||
} | ||
}); | ||
} | ||
|
||
function wait(ms) { | ||
return new Promise(resolve => setTimeout(resolve, ms)); | ||
} |
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.
🤣