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

[WIP] draft typeAttribution.spec.ts #25

Draft
wants to merge 6 commits into
base: kie-issues-946-part-3-main
Choose a base branch
from

Conversation

jomarko
Copy link
Collaborator

@jomarko jomarko commented Mar 14, 2024

No description provided.

@jomarko jomarko force-pushed the kie-issues-946-part-3-typeAttribution branch from b818c5c to af805a3 Compare March 14, 2024 11:24
Comment on lines 31 to 52
test.only("should change Input Data data type", async ({ page, palette, nodes }) => {
await palette.dragNewNode({ type: NodeType.INPUT_DATA, targetPosition: { x: 100, y: 100 } });

await nodes.hover({ name: DefaultNodeName.INPUT_DATA });
await nodes.get({ name: DefaultNodeName.INPUT_DATA }).getByLabel(DataType.Undefined).click();
await page.pause();
await nodes
.get({ name: DefaultNodeName.INPUT_DATA })
.getByRole("option")
.getByText(DataType.Number, { exact: true })
.click();

await page.pause();

await nodes.hover({ name: DefaultNodeName.INPUT_DATA });
await page.pause();
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am struggling to select the dropdown option, as we have dropdown implemented using ul and li instead of select and option, while playwright has a native support for the later one.

On the line 36 we stopped the debugger after click on the <Undefined>, so far so good, the dropdown was shown.
Screenshot 2024-03-14 121918

Then if we resume the test execution, and we check in the debug console where the next click was executed, it is in some inappropriate location, see the red circle:
Screenshot 2024-03-14 122330

@jomarko jomarko force-pushed the kie-issues-946-part-3-typeAttribution branch from af805a3 to b31d9db Compare March 15, 2024 13:19
@jomarko
Copy link
Collaborator Author

jomarko commented Mar 15, 2024

Currently, the tests in unstable on webkit, attaching the error and screenshot, I think it belongs to category, something went too fast. Unfortunately, I am not able to reproduce the issue in the debug mode or when video recording is turned on.

Error: Timed out 10000ms waiting for expect(received).toHaveValue(expected)

Expected string: "number"
Received string: "<Undefined>"
Call log:
  - expect.toHaveValue with timeout 10000ms
  - waiting for locator('div[data-nodelabel="New BKM"]').locator('input')
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"
  -   locator resolved to <input type="text" autocomplete="off" value="<Undefined…/>
  -   unexpected value "<Undefined>"


  64 |
  65 |     await nodes.select({ name: DefaultNodeName.BKM });
> 66 |     await expect(nodes.get({ name: DefaultNodeName.BKM }).locator("input")).toHaveValue(DataType.Number);
     |                                                                             ^
  67 |   });
  68 | });
  69 |

    at /home/jomarko/incubator-kie-tools/packages/dmn-editor/tests/e2e/drgElements/typeAttribution.spec.ts:66:77

17d22e0df40cc03c8f8faf177f263fd226931c98

@jomarko jomarko force-pushed the kie-issues-946-part-3-typeAttribution branch from b31d9db to ed3c4c0 Compare March 20, 2024 09:21
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.

1 participant