thiagoelg commented on code in PR #3559:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3559#discussion_r3343726133


##########
packages/online-editor/tests-e2e/createFiles/newFile.spec.ts:
##########
@@ -48,11 +48,13 @@ test.describe("New file", () => {
       await expect(page).toHaveScreenshot("new-file-dmn.png");
     });
 
-    test("should create a new PMML file", async ({ page, kieSandbox }) => {
+    test("should create a new PMML file", async ({ page, kieSandbox, 
browserName }) => {
       await page.getByRole("button", { name: "New Scorecard" }).click();
       await expect(page.getByRole("button", { name: "Scorecard Untitled" 
})).toBeAttached();
       await expect(page.getByRole("button", { name: "Scorecard Untitled" 
})).toContainText("Untitled");
-      await expect(kieSandbox.getEditor().getByRole("button", { name: "Set 
Data Dictionary" })).toBeAttached();
+      await expect(kieSandbox.getEditor().getByRole("button", { name: "Set 
Data Dictionary" })).toBeAttached({
+        timeout: 90000,
+      });

Review Comment:
   Is this timeout really needed? Our playwright-base config already defines a 
global timeout.



##########
packages/pmml-editor/src/editor/PMMLEditor.tsx:
##########
@@ -121,7 +122,10 @@ export class PMMLEditor extends React.Component<Props, 
State> {
   }
 
   public componentDidMount(): void {
-    this.props.ready();
+    // Use flushSync to ensure the editor is fully mounted before signaling 
ready
+    flushSync(() => {
+      this.props.ready();
+    });

Review Comment:
   Is this flushSync necessary?



##########
packages/playwright-base/env/index.js:
##########
@@ -51,7 +51,7 @@ module.exports = 
composeEnv([require("@kie-tools/root-env/env")], {
         "The threshold of the maximum pixel difference on screenshot 
comparisons (percentage in decimal form)",
     },
     PLAYWRIGHT_BASE__retries: {
-      default: "0",
+      default: "2",

Review Comment:
   Should we revert to 0? Given the number of flaky tests we have, I would 
leave it a 2, but what do you think?



-- 
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