mui-toolpad icon indicating copy to clipboard operation
mui-toolpad copied to clipboard

Editor integration tests

Open apedroferreira opened this issue 3 years ago • 5 comments

Closes https://github.com/mui/mui-toolpad/issues/758

apedroferreira avatar Aug 19 '22 17:08 apedroferreira

Your Render PR Server URL is https://toolpad-pr-831.onrender.com.

Follow its progress at https://dashboard.render.com/web/srv-cbvsek82i3moe6r0v3qg.

render[bot] avatar Aug 19 '22 17:08 render[bot]

Looks like we have to use the overlay element to capture clicks/drags, as it's the one that captures them. It doesn't work with other elements in the same position. Also I don't plan to add lots of test ids but I think that for these specific elements it was the best choice.

Let me know if you think anything should be different in terms of how i reorganized some files and their structure a bit too!

apedroferreira avatar Aug 22 '22 18:08 apedroferreira

Will add a couple of tests for prop controls in a separate PR now too.

apedroferreira avatar Aug 22 '22 18:08 apedroferreira

I'd move the compose file top-level, but other than that we can merge this 👍

edit 🤔 wait, the test doesn't pass?

yeah, the CI with the env var isn't working so something must be wrong there, and there's a separate issue with the Firefox tests that include drag & drop not passing

apedroferreira avatar Aug 30 '22 11:08 apedroferreira

Your Render PR Server URL is https://toolpad-pr-831.onrender.com.

Follow its progress at https://dashboard.render.com/web/srv-cc70trla4990k53vljq0.

render[bot] avatar Aug 30 '22 13:08 render[bot]

Your Render PR Server URL is https://toolpad-pr-831.onrender.com.

Follow its progress at https://dashboard.render.com/web/srv-ccb48pj19n0f92eba1r0.

render[bot] avatar Sep 05 '22 18:09 render[bot]

@Janpot CI passed 3 times in a row, maybe it's ok to merge this now? i had to dispatch events manually in Firefox, couldn't find a better way. If these tests start being flaky later though we can skip them temporarily and i can work on them a bit more - locally they always pass for me but CI seems a bit more unpredictable.

apedroferreira avatar Sep 08 '22 19:09 apedroferreira

Is there a ticket in the playwright repo that we can link to that describes the faulty behavior in firefox? If not, have you tried creating a minimal reproduction? Perhaps you can open a ticket and link to it?

I don't like to add hacks for bugs without adding documentation that can tell us more about the status of said bug. (example: https://github.com/mui/mui-toolpad/blob/4f71c00b28c8e57d9bad5ff99ede85f1d1aecc45/packages/toolpad-app/src/components/SplitPane.tsx#L58)

When there's a proper way forward towards solving the firefox issue in the future, then I'm fine merging this.

Janpot avatar Sep 09 '22 07:09 Janpot

Is there a ticket in the playwright repo that we can link to that describes the faulty behavior in firefox? If not, have you tried creating a minimal reproduction? Perhaps you can open a ticket and link to it?

I don't like to add hacks for bugs without adding documentation that can tell us more about the status of said bug. (example:

https://github.com/mui/mui-toolpad/blob/4f71c00b28c8e57d9bad5ff99ede85f1d1aecc45/packages/toolpad-app/src/components/SplitPane.tsx#L58

) When there's a proper way forward towards solving the firefox issue in the future, then I'm fine merging this.

i couldn't find a proper related issue in the Playwright repo, and yeah i thought about creating one myself, just takes a bit of work to create a reproduction. i'm working on it, there's probably no rush to merge this so we can wait

apedroferreira avatar Sep 09 '22 13:09 apedroferreira

Your Render PR Server URL is https://toolpad-pr-831.onrender.com.

Follow its progress at https://dashboard.render.com/web/srv-cck9b12rrk04c7mi4dd0.

render[bot] avatar Sep 19 '22 16:09 render[bot]

Is there a ticket in the playwright repo that we can link to that describes the faulty behavior in firefox? If not, have you tried creating a minimal reproduction? Perhaps you can open a ticket and link to it?

I don't like to add hacks for bugs without adding documentation that can tell us more about the status of said bug. (example:

https://github.com/mui/mui-toolpad/blob/4f71c00b28c8e57d9bad5ff99ede85f1d1aecc45/packages/toolpad-app/src/components/SplitPane.tsx#L58

) When there's a proper way forward towards solving the firefox issue in the future, then I'm fine merging this.

I've managed to reproduce the bug in a minimal reproduction: https://github.com/microsoft/playwright/issues/17441

So it's confirmed, seems like there's a specific issue with triggering HTML5 drag & drop events in iFrames, in Firefox only.

I've included a link to the issue I created now, so will merge this PR if the tests seem stable in CI.

apedroferreira avatar Sep 19 '22 16:09 apedroferreira

great 👌

Janpot avatar Sep 20 '22 03:09 Janpot

@apedroferreira Following up on the playwright issue, it seems that it's closed due to the closing of https://github.com/microsoft/playwright/issues/17153 (would have been nice of them to reference that issue). Does calling hover() twice fix the issue?

Janpot avatar Oct 04 '22 10:10 Janpot

@apedroferreira Following up on the playwright issue, it seems that it's closed due to the closing of microsoft/playwright#17153 (would have been nice of them to reference that issue). Does calling hover() twice fix the issue?

looks like they're supposed to have fixed it, i'll try removing the Firefox specific logic and see if things work now

apedroferreira avatar Oct 04 '22 11:10 apedroferreira

or i guess they might not have fixed it after all? i'll try things from that issue then, maybe using hover twice works

apedroferreira avatar Oct 04 '22 11:10 apedroferreira