Open jasmussen opened 4 years ago
Probably a good idea to look at moving this test to Playwright too while we're at it.
@ellatrix @noisysocks is this issue still relevant?
Not sure if the test has changed after the migration cc @Mamaduka
@ellatrix, very little. Primary changes made during migrates were to improve locators and make them more resilient.
From https://github.com/WordPress/gutenberg/pull/22213#discussion_r443408438
22213 changes the padding of the editing canvas to be smaller. This leaves more room for themes that don't add this padding themselves, i.e. 2020 which is being used for these tests.
The tests failing were:
Both were tested using
npm run test-e2e packages/e2e-tests/specs/edi tor/various/typewriter.test.js -- --puppeteer-interactive
. This revealed that the change in padding caused the typewrite test to fail, because suddenly there was enough room on the canvas for the blocks to fit there without invoking the scrollbar.It was fixed by adding more blocks in the tests.
But it does suggest that this particular test is very sensitive to things style properties like padding, margin, line-height and font size. For example if TwentyTwenty updates the editor style to add this padding back, or to change a block margin, this test will likely fail again.
We should look at a way to make this test more resilient to styles.