ljmotta commented on code in PR #2477:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2477#discussion_r1693016666


##########
packages/boxed-expression-component/tests-e2e/boxedExpressions/some/someExpression.spec.ts:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { expect, test } from "../../__fixtures__/base";
+import { TestAnnotations } from "../../../../playwright-base/annotations";
+
+test.describe("Create Boxed Some", () => {
+  test.beforeEach(async ({ stories }) => {
+    await stories.openBoxedSome("base");
+  });
+  test("should keep IDs after resetting entries", async ({ bee, jsonModel, 
page }) => {

Review Comment:
   Not sure if understand the purpose of the test based on the name. The test 
should check if the ID was kept? I mean, the ID should be the same before and 
after the reset? Currently, the test is checking if the expression has an ID 
after the reset. The same applies for the other tests as well.



##########
packages/stunner-editors-dmn-loader/src/gwtToBee.ts:
##########


Review Comment:
   🤩 



##########
packages/boxed-expression-component/tests-e2e/boxedExpressions/some/someExpression.spec.ts:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { expect, test } from "../../__fixtures__/base";
+import { TestAnnotations } from "../../../../playwright-base/annotations";

Review Comment:
   The import should point to `@kie-tools/playright-base/annotations`. The same 
applies for the other files as well.



##########
packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx:
##########
@@ -81,6 +81,7 @@ import { useDmnEditorStore, useDmnEditorStoreApi } from 
"../store/StoreContext";
 import { getDefaultColumnWidth } from "./getDefaultColumnWidth";
 import { getDefaultBoxedExpression } from "./getDefaultBoxedExpression";
 import { Normalized } from "../normalization/normalize";
+import { getNewDmnIdRandomizer } from "../idRandomizer/dmnIdRandomizer";

Review Comment:
   leftover?



##########
packages/boxed-expression-component/tests-e2e/__fixtures__/stories.ts:
##########
@@ -65,4 +65,16 @@ export class Stories {
   public async openBoxedFilter(type: BoxedExpressionTypes | "rebooked-flights" 
= "base") {
     await 
this.page.goto(`${this.baseURL}/${this.getIframeURL(`boxed-expressions-filter--${type}`)}`
 ?? "");
   }
+
+  public async openBoxedEvery(type: BoxedExpressionTypes) {
+    await 
this.page.goto(`${this.baseURL}/${this.getIframeURL(`boxed-expressions-every--${type}`)}`
 ?? "");
+  }
+
+  public async openBoxedSome(type: BoxedExpressionTypes) {
+    await 
this.page.goto(`${this.baseURL}/${this.getIframeURL(`boxed-expressions-some--${type}`)}`
 ?? "");
+  }
+
+  public async openBoxedFor(type: BoxedExpressionTypes) {
+    await 
this.page.goto(`${this.baseURL}/${this.getIframeURL(`boxed-expressions-for--${type}`)}`
 ?? "");
+  }

Review Comment:
   Could you please add the `base` as the default `type`, following the other 
expressions?



##########
packages/dmn-editor/src/mutations/updateExpression.ts:
##########
@@ -64,4 +65,12 @@ export function updateExpression({
   } else {
     throw new Error("DMN MUTATION: Can't update expression for drgElement that 
is not a Decision or a BKM.");
   }
+
+  getNewDmnIdRandomizer()
+    .ack({
+      json: definitions.drgElement,
+      type: "DMN15__tDefinitions",
+      attr: "drgElement",
+    })
+    .randomize();

Review Comment:
   This will be removed?



##########
packages/boxed-expression-component/tests-e2e/__fixtures__/jsonModel.ts:
##########
@@ -18,6 +18,7 @@
  */
 
 import { Page } from "@playwright/test";
+import { BoxedContext, BoxedEvery, BoxedFilter, BoxedFor, BoxedSome, 
Normalized } from "../../src/api";

Review Comment:
   We mustn't couple the `src` code with the `test` code, as the test should 
know it. For this case, we duplicate the code to test folder. I'm not sure 
where we should put them, maybe with the new API? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to