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

E2E Tests: Intermittent failure in Links tests #22171

Closed
aduth opened this issue May 7, 2020 · 5 comments
Closed

E2E Tests: Intermittent failure in Links tests #22171

aduth opened this issue May 7, 2020 · 5 comments
Labels
[Package] E2E Tests /packages/e2e-tests [Type] Bug An existing feature does not function as intended

Comments

@aduth
Copy link
Member

aduth commented May 7, 2020

Examples:

Error:

  ● RichText › should handle Home and End keys
    expect(received).toMatchSnapshot()
    Snapshot name: `RichText should handle Home and End keys 1`
    - Snapshot  - 1
    + Received  + 1
      <!-- wp:paragraph -->
    - <p>-<strong>12</strong>+</p>
    + <p>-12+</p>
      <!-- /wp:paragraph -->
      266 | 		await page.keyboard.type( '+' );
      267 | 
    > 268 | 		expect( await getEditedPostContent() ).toMatchSnapshot();
          | 		                                       ^
      269 | 	} );
      270 | 
      271 | 	it( 'should update internal selection after fresh focus', async () => {
      at Object.<anonymous> (specs/editor/various/rich-text.test.js:268:42)
          at runMicrotasks (<anonymous>)

cc @ellatrix

@aduth aduth added [Type] Bug An existing feature does not function as intended [Package] E2E Tests /packages/e2e-tests labels May 7, 2020
@ellatrix
Copy link
Member

ellatrix commented May 7, 2020

I've seen it too, but I'm not sure what the problem is. Seems to have been introduced by #22108. Unsure how this is relevant to the bold shortcut though.

@ellatrix
Copy link
Member

ellatrix commented May 7, 2020

I'm starting to think we should revert that PR for the stability of the e2e tests. It shouldn't matter, but it seems like the block toolbar not rendering instantly also triggering some intermittent failures for other navigation tests. Still not sure how this could affect the bold shortcut though. This shortcut is available even without the block toolbar rendered.

@aduth
Copy link
Member Author

aduth commented May 7, 2020

I'm not sure how much we were expecting to benefit from #22108 to know if it makes sense to revert, or how we'd plan to "properly" work around this. I think as we start to make more things asynchronous for the sake of performance, we'll continue to run into issues with end-to-end test stability, where we assume things can run nicely in sequence, biased by our powerful computers. I know in the past @youknowriad has resisted ideas to turn off asynchronous behaviors in testing in order to more accurate emulate how the user feels. I do sort of agree with this, at least from the perspective of: If things fail in tests because they're run "too fast", inevitably someone could encounter this in the real-world as well.

But it feels like a problem we're going to continue to run into over time, and it really degrades the confidence in our tests, and probably in the actual quality of the application 😕

@sainthkh
Copy link
Contributor

sainthkh commented May 8, 2020

I fixed it in #22202. I thought there was a racing condition. I solved it by waiting for loading the rich text editor.

@aduth
Copy link
Member Author

aduth commented May 8, 2020

Fixed by #22202.

@aduth aduth closed this as completed May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] E2E Tests /packages/e2e-tests [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants