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: Ignore Chrome SameSite cookies warning #18753

Merged
merged 1 commit into from Nov 26, 2019
Merged

Conversation

@aduth
Copy link
Member

aduth commented Nov 26, 2019

See: https://core.trac.wordpress.org/ticket/37000
See: https://www.chromestatus.com/feature/5088147346030592
See: https://www.chromestatus.com/feature/5633521622188032

This pull request seeks to add an exception to our E2E console log monitoring for Chrome's new console warning about SameSite cookies. This should resolve some instances of intermittent failures in the end-to-end tests.

  ● Embedding content › should switch to the WordPress block correctly
    expect(jest.fn()).not.toHaveWarned(expected)
    Expected mock function not to be called but it was called with:
    ["A cookie associated with a cross-site resource at http://localhost/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032."]
      at Object.expect (../jest-console/build/@wordpress/jest-console/src/index.js:34:4)
          at runMicrotasks (<anonymous>)

Testing Instructions:

It would be difficult to test, since the failure only occurs occasionally, and usually during the Travis build. Instead, you could check that adding a console.warn anywhere in the editor code run by the end-to-end tests still yields a failure as expected.

@gziolo
gziolo approved these changes Nov 26, 2019
Copy link
Member

gziolo left a comment

So this is going to be addressed in Core, nice. It makes sense to skip it for the time being 👍

@ellatrix

This comment has been minimized.

Copy link
Member

ellatrix commented Nov 26, 2019

Thank you!

@aduth aduth force-pushed the fix/e2e-cookie-warning branch from a16d4eb to d8a1a2b Nov 26, 2019
@aduth aduth mentioned this pull request Nov 26, 2019
0 of 6 tasks complete
@aduth aduth merged commit 598211e into master Nov 26, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@aduth aduth deleted the fix/e2e-cookie-warning branch Nov 26, 2019
@youknowriad youknowriad added this to the Gutenberg 7.1 milestone Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.