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

fix: remove import of non-existing API #581

Merged
merged 8 commits into from
Feb 10, 2022
Merged

fix: remove import of non-existing API #581

merged 8 commits into from
Feb 10, 2022

Conversation

barmac
Copy link
Member

@barmac barmac commented Feb 8, 2022

Closes #580

@barmac barmac requested a review from nikku February 8, 2022 17:11
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Feb 8, 2022
@nikku
Copy link
Member

nikku commented Feb 8, 2022

Looks good.

What about backporting the utility to bpmn-js@8?

And another one: What about adding a test case that verifies we still run O.K. against bpmn-js@8. We've run into enough issues to justify that.

@barmac
Copy link
Member Author

barmac commented Feb 8, 2022

What about backporting the utility to bpmn-js@8?

That would be cool but we'd still depend on the most recent minor from 8.x series in that case.

And another one: What about adding a test case that verifies we still run O.K. against bpmn-js@8. We've run into enough issues to justify that.

I'll think about it tomorrow.

@barmac barmac force-pushed the barmac-patch-1 branch 8 times, most recently from 47bdc01 to 9de938e Compare February 9, 2022 09:57
@barmac
Copy link
Member Author

barmac commented Feb 9, 2022

I've added integration test via 9de938e
It seems we have yet another problem to solve: https://github.com/bpmn-io/bpmn-js-properties-panel/runs/5123108688?check_suite_focus=true#step:7:173

@barmac
Copy link
Member Author

barmac commented Feb 9, 2022

@marstamm and I just had a call to discuss the breaking tests on bpmn-js@8. I will adjust the tests in this PR and add a skip for the bpmn-js@9 special case of subprocess as the root element.

@barmac barmac force-pushed the barmac-patch-1 branch 2 times, most recently from e6df897 to 725908c Compare February 9, 2022 12:56
@barmac barmac requested a review from marstamm February 9, 2022 13:06
@barmac
Copy link
Member Author

barmac commented Feb 9, 2022

@nikku @marstamm This is ready for review. Apart from fixing the problem, it includes now a CI change which makes us run the whole test suite with bpmn-js@8 and diagram-js@7. We skip one test which can work only in the upcoming release of bpmn-js. As soon as bpmn-js@9 is out, we should adjust the version at

- diagram-js@8.x bpmn-js@9.0.0-alpha.2
to use the latest version.

.github/workflows/CI.yml Outdated Show resolved Hide resolved
.github/workflows/CI.yml Outdated Show resolved Hide resolved
@barmac
Copy link
Member Author

barmac commented Feb 9, 2022

I've added 3a650e7 to make sure we don't upload coverage twice.

.github/workflows/CI.yml Outdated Show resolved Hide resolved
@@ -367,24 +368,28 @@ describe('provider/camunda-platform - ProcessVariableProps', function() {
}));


it('should display items for plane', inject(async function(elementRegistry, selection, canvas) {
testForBpmnJsVersion('>=9')('should display items for plane',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm personally a fan of CHECK && it('...', ...) to not hide what we're doing.

So to adopt to your example here:

bpmnJsVersion(`>=9`) && it('should display items for plane', ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, if this is a core use-case, simplify it:

import {
  bpmnJs9
} from '...'


bpmnJs9() && it('test what works on nine only')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All just personal preference. Happy to adopt what works for you.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm but in that case we hide information that the test case was skipped. WDYT?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You got a point on the skip.

Then, to be less verbose why not include a simple it9 helper?

import {
  it9
} from 'test-helper'


it9('do what works with bpmn-js nine+ only');

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conversely, consider it10, it15.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I shortened this to withBpmnJs. it9 sounds super cryptic to me.

Co-authored-by: Martin Stamm <martin.stamm@camunda.com>
@barmac
Copy link
Member Author

barmac commented Feb 9, 2022

3a650e7 doesn't work in action because COVERAGE=false is truthy 😅

@barmac
Copy link
Member Author

barmac commented Feb 10, 2022

@nikku @marstamm Ready for another round.

Copy link
Contributor

@marstamm marstamm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@fake-join fake-join bot merged commit dd69eb8 into master Feb 10, 2022
@fake-join fake-join bot deleted the barmac-patch-1 branch February 10, 2022 10:17
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatible with bpmn-js@8 due to ModelUtil#isAny is not defined
3 participants