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

kie-issues#2549: Decision Service cannot be recognized in columns of decision table #2684

Merged
merged 2 commits into from
Oct 30, 2024

Conversation

danielzhe
Copy link
Contributor

Closes: #2549

It closes the ticket related to the colorize and autocomplete only.

ds-fix.mp4

@danielzhe danielzhe added pr: waiting-for-review Waiting for peer reviews area:dmn labels Oct 18, 2024
@danielzhe danielzhe requested a review from tiagobento as a code owner October 18, 2024 18:58
Copy link
Contributor

@jomarko jomarko left a comment

Choose a reason for hiding this comment

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

Thank you @danielzhe , during my manual check, I didn't find an issue. I put some comments to code inline. Please let me know what do you think about them.

import * as fs from "fs";
import * as path from "path";
import { getMarshaller } from "@kie-tools/dmn-marshaller";
//import {getMarshaller} from "@kie-tools/dmn-marshaller/d"
Copy link
Contributor

Choose a reason for hiding this comment

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

leftover probably?

Comment on lines +376 to +378
for (let i = 0; i < expected.length; i++) {
expect(semanticMonacoTokens?.data[i]).toEqual(expected[i]);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

can't we simplify?:

expect(semanticMonacoTokens?.data).toEqual(expected)

see: https://jestjs.io/docs/expect#toequalvalue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, their types are different and it fails if we do this way:

Error: expect(received).toEqual(expected) // deep equality

Expected: [0, 0, 20, 6, 0, 0, 21, 10, 5, 0, …]
Received: serializes to the same string
<Click to see difference>

@@ -377,3 +524,8 @@ function createModelMockForExpression(expression: string) {
getLinesContent: jest.fn().mockReturnValue(expression.split("\n")),
};
}

function getDmnModelFromFilePath(filePath: string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@danielzhe
Copy link
Contributor Author

@jomarko @tiagobento Changes applied! Ready for you.

Copy link
Contributor

@jomarko jomarko left a comment

Choose a reason for hiding this comment

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

Thank you @danielzhe

@tiagobento tiagobento merged commit c60e8c4 into apache:main Oct 30, 2024
14 checks passed
ricardozanini pushed a commit to ricardozanini/kogito-tooling that referenced this pull request Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dmn pr: waiting-for-review Waiting for peer reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decision Service cannot be recognized in columns of decision table
3 participants