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

[Flaky Test] Entering zoomed out mode zooms the canvas #66051

Closed
github-actions bot opened this issue Oct 11, 2024 · 3 comments · Fixed by #66212
Closed

[Flaky Test] Entering zoomed out mode zooms the canvas #66051

github-actions bot opened this issue Oct 11, 2024 · 3 comments · Fixed by #66212
Assignees
Labels
[Type] Flaky Test Auto-generated flaky test report issue

Comments

@github-actions
Copy link

github-actions bot commented Oct 11, 2024

Flaky test detected. This is an auto-generated issue by GitHub Actions. Please do NOT edit this manually.

Test title

Entering zoomed out mode zooms the canvas

Test path

/test/e2e/specs/site-editor/zoom-out.spec.js

Errors

[2024-10-11T09:32:47.098Z] Test passed after 1 failed attempt on trunk.
[2024-10-11T10:48:08.504Z] Test passed after 1 failed attempt on fix/device-type-browse-styles.
[2024-10-11T12:18:46.815Z] Test passed after 1 failed attempt on fix/posturl-ui-slug-peermalink.
[2024-10-11T13:40:23.186Z] Test passed after 2 failed attempts on update/grid-visualizer-to-be-hidden-in-zoom-out-mode.
[2024-10-11T15:10:49.158Z] Test passed after 1 failed attempt on trunk.
[2024-10-14T05:27:31.691Z] Test passed after 2 failed attempts on fix/e2e-storybook-config.
[2024-10-14T07:05:20.980Z] Test passed after 1 failed attempt on trunk.
[2024-10-14T08:54:34.294Z] Test passed after 1 failed attempt on fix/bootstrap-server-sources-earlier.
[2024-10-14T08:55:58.472Z] Test passed after 1 failed attempt on fix/posturl-ui-slug-peermalink.
[2024-10-14T20:54:38.670Z] Test passed after 1 failed attempt on docs/block-editor.
[2024-10-15T04:58:35.661Z] Test passed after 1 failed attempt on try/custom-presets-ignore-duplicate-slugs.
[2024-10-15T08:23:52.478Z] Test passed after 1 failed attempt on refactor-pattern-inserter.
[2024-10-15T09:33:37.654Z] Test passed after 1 failed attempt on trunk.
[2024-10-15T11:27:20.338Z] Test passed after 1 failed attempt on trunk.
[2024-10-15T13:50:09.759Z] Test passed after 1 failed attempt on fix/iframe-zoom-container.
[2024-10-15T14:38:27.885Z] Test passed after 1 failed attempt on trunk.
[2024-10-15T14:45:32.057Z] Test passed after 1 failed attempt on trunk.
[2024-10-15T15:22:42.097Z] Test passed after 1 failed attempt on trunk.
[2024-10-15T17:03:07.960Z] Test passed after 1 failed attempt on update/several-typos.
[2024-10-16T00:32:17.987Z] Test passed after 1 failed attempt on fix/toggle-group-control-focus.
[2024-10-16T06:08:32.239Z] Test passed after 2 failed attempts on trunk.
[2024-10-16T09:31:21.120Z] Test passed after 1 failed attempt on fix/use-get-entity-config-instead-of-get-post-types.
[2024-10-16T09:41:32.168Z] Test passed after 1 failed attempt on fix/update-changelog-fsn.
[2024-10-16T09:58:56.868Z] Test passed after 1 failed attempt on trunk.
[2024-10-16T10:12:47.166Z] Test passed after 1 failed attempt on fix/allow-label-override-in-bindings-registration.
[2024-10-16T10:49:27.670Z] Test passed after 1 failed attempt on trunk.
[2024-10-16T11:50:16.614Z] Test passed after 1 failed attempt on fix/use-get-entity-config-instead-of-get-post-types.
[2024-10-16T14:33:17.379Z] Test passed after 1 failed attempt on update/alphabetize-styles.
[2024-10-16T17:08:26.124Z] Test passed after 1 failed attempt on trunk.
[2024-10-16T17:56:48.315Z] Test passed after 1 failed attempt on managing-packages.
[2024-10-16T18:05:13.877Z] Test passed after 1 failed attempt on trunk.
[2024-10-16T18:40:38.728Z] Test passed after 1 failed attempt on add/storybook-elevation-tokens.
[2024-10-16T19:02:12.936Z] Test passed after 2 failed attempts on fix/html-scale-code-quality.
[2024-10-16T19:37:18.814Z] Test passed after 2 failed attempts on fix/iapi-deep-merge-undefined-objects-reactivity.
[2024-10-17T02:49:25.547Z] Test passed after 1 failed attempt on fix/type-use-select-param.
[2024-10-17T03:54:52.097Z] Test passed after 1 failed attempt on trunk.
[2024-10-17T09:21:39.639Z] Test passed after 1 failed attempt on color-palette/background-overflow.
[2024-10-17T10:05:08.544Z] Test passed after 1 failed attempt on update/scripts-check-licenses-extract-logic.
[2024-10-17T11:03:07.657Z] Test passed after 1 failed attempt on fix/tabs-rtl.
[2024-10-17T13:37:13.444Z] Test passed after 1 failed attempt on update/shuffle-patterns-to-update-design.
[2024-10-17T14:12:42.310Z] Test passed after 1 failed attempt on refactor/tablist-styled.
[2024-10-17T14:17:52.797Z] Test passed after 2 failed attempts on fix/tabs-tablist-tabindex.
[2024-10-17T14:41:59.550Z] Test passed after 1 failed attempt on storybook-nav-utilities.
[2024-10-17T15:46:30.294Z] Test passed after 1 failed attempt on trunk.
Error: expect(received).toBeGreaterThan(expected)

Expected: > 60
Received:   -2416.2985
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/zoom-out.spec.js:44:37
@github-actions github-actions bot added the [Type] Flaky Test Auto-generated flaky test report issue label Oct 11, 2024
github-actions bot referenced this issue Oct 11, 2024
* Update preact packages

* Update package-lock

* Fix some EffectFn types

* Remove outdated ts-expect-error

* Add changelog

Co-authored-by: sirreal <[email protected]>
Co-authored-by: gziolo <[email protected]>
Co-authored-by: cbravobernal <[email protected]>
@MaggieCabrera
Copy link
Contributor

MaggieCabrera commented Oct 11, 2024

@talldan it didn't make it long...

EDIT: I'm thinking, let's not check for the specific transform values, just make sure that the width and height of the canvas are smaller than the iframe. I'm not sure if that's enough to stabilize it

@talldan
Copy link
Contributor

talldan commented Oct 11, 2024

I don't think it's the transform one that's failing, this is the error I'm seeing:

  1) [chromium] › site-editor/zoom-out.spec.js:20:2 › Zoom Out › Entering zoomed out mode zooms the canvas 
    Error: expect(received).toBeGreaterThan(expected)

    Expected: > 60
    Received:   -2417.2985

      42 | 			return parseFloat( paddingValue );
      43 | 		} );
    > 44 | 		expect( htmlRect.y + paddingTop ).toBeGreaterThan( iframeRect.y );
         | 		                                  ^
      45 | 		expect( htmlRect.x ).toBeGreaterThan( iframeRect.x );
      46 | 	} );
      47 | } );

        at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/zoom-out.spec.js:44:37

I wonder how it ended up with -2417.2985!

@talldan
Copy link
Contributor

talldan commented Oct 11, 2024

Ah, here's an image of the test failure - maybe it's related to the scroll position of the canvas being at the bottom:
Image

github-actions bot referenced this issue Oct 14, 2024
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: andrewserong <[email protected]>
Co-authored-by: kevin940726 <[email protected]>
github-actions bot referenced this issue Oct 15, 2024
* Remove bindings bootstrap functions

* Remove bootstrap calls

* Remove old filter

* Adapt unit tests

* Add compat filter in Gutenberg

* Only run script if not already registered

* Remove extra label in test

* Remove unit test

* Add backport changelog

* Return warning if any client-only prop is defined

Co-authored-by: SantosGuillamot <[email protected]>
Co-authored-by: cbravobernal <[email protected]>
Co-authored-by: gziolo <[email protected]>
Co-authored-by: ryanwelcher <[email protected]>
github-actions bot referenced this issue Oct 15, 2024
Co-authored-by: akasunil <[email protected]>
Co-authored-by: aaronrobertshaw <[email protected]>
github-actions bot referenced this issue Oct 15, 2024
* Positions the iframed HTML canvas via translateX rather than margin-left on the iframe in order to have the scrollbar for the iframe available instead of hidden off canvas. This also fixes issues with the vertical toolbar and inserters not rerendering to their new positions.

* Renames prevContainerWidthRef to initialContainerWidth so it's clearer that this is the point when zoom out was initialized, then renames the CSS vars prev-container-width to outer-container-width, using the larger value of containerWidth or initialContainerWidth so it can be more consistently named.

* Force largest available window size to scale from
If you started with a sidebar open, then entered zoom out, then closed the sidebar, your scaled canvas would be too large. It should match the same size as if you start with no sidebars open, then enter zoom out. This also fixes an issue where scaling could be larger than 1.

* Only animate scaling on entry and exit of zoom out mode to improve animations when opening and closing sidebars.

* Known divergence: When starting from a smaller canvas (sidebars open), entering zoom out, then closing sidebars, there will be reflow on the canvas. 

---------

Co-authored-by: jeryj <[email protected]>
Co-authored-by: ajlende <[email protected]>
Co-authored-by: stokesman <[email protected]>
Co-authored-by: ciampo <[email protected]>
Co-authored-by: MaggieCabrera <[email protected]>
Co-authored-by: draganescu <[email protected]>
Co-authored-by: getdave <[email protected]>
Co-authored-by: dhruvang21 <[email protected]>
Co-authored-by: AhmarZaidi <[email protected]>
Co-authored-by: kevin940726 <[email protected]>
github-actions bot referenced this issue Oct 15, 2024
Co-authored-by: ajlende <[email protected]>
Co-authored-by: jeryj <[email protected]>
Co-authored-by: mrfoxtalbot <[email protected]>
Co-authored-by: jordesign <[email protected]>
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: iamtakashi <[email protected]>
Co-authored-by: annezazu <[email protected]>
Co-authored-by: henriqueiamarino <[email protected]>
github-actions bot referenced this issue Oct 15, 2024
- Add missing `post.slug` dependency to `useMemo`

Co-authored-by: SantosGuillamot <[email protected]>
Co-authored-by: youknowriad <[email protected]>
github-actions bot referenced this issue Oct 16, 2024
Co-authored-by: michalczaplinski <[email protected]>
Co-authored-by: cbravobernal <[email protected]>
github-actions bot referenced this issue Oct 16, 2024
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: kevin940726 <[email protected]>
github-actions bot referenced this issue Oct 16, 2024
github-actions bot referenced this issue Oct 17, 2024
Co-authored-by: renatho <[email protected]>
Co-authored-by: kevin940726 <[email protected]>
Co-authored-by: aaronrobertshaw <[email protected]>
Co-authored-by: getdave <[email protected]>
Co-authored-by: andrewserong <[email protected]>
@MaggieCabrera MaggieCabrera self-assigned this Oct 17, 2024
github-actions bot referenced this issue Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Flaky Test Auto-generated flaky test report issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants