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

Testing: Stub all oEmbed requests as empty string #10709

Closed
wants to merge 2 commits into from

Conversation

aduth
Copy link
Member

@aduth aduth commented Oct 17, 2018

Related: #10682

This pull request seeks to improve end-to-end tests to stub an empty HTML response for all oEmbeds.

Testing Instructions:

Ensure end-to-end tests pass:

npm run test-e2e

@aduth aduth added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Oct 17, 2018
@danielbachhuber danielbachhuber added this to the 4.1 - UI freeze milestone Oct 17, 2018
Copy link
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created #10710 as a follow-up task.

Copy link
Member

@notnownikki notnownikki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the demo test needs to be left as it is. The reason is that we check if the demo content marks the post as dirty, so we need to get back a response from Vimeo, removing the source from the iframe but preserving the dimensions, so that we can check that aspect ratio detection isn't going to make the demo page dirty when it loads. Other tests can stub out the response to an empty string, but the demo page needs to test that we're not going to make everyone's demo post dirty.

@danielbachhuber
Copy link
Member

I think the demo test needs to be left as it is. The reason is that we check if the demo content marks the post as dirty, so we need to get back a response from Vimeo, removing the source from the iframe but preserving the dimensions, so that we can check that aspect ratio detection isn't going to make the demo page dirty when it loads.

@notnownikki How do you suggest we handle the intermittent failure that's failing everyone's builds right now and blocking development?

@notnownikki
Copy link
Member

@danielbachhuber could we have the part which stubs out the iframe content respond with a mock if the actual vimeo embed request fails?

@notnownikki
Copy link
Member

Changing my review on this after discussing at https://wordpress.slack.com/archives/C02QB2JS7/p1539819998000100

I'll fix up the demo test to use a mock if vimeo is down, and the actual response if it isn't, in a future PR.

@aduth
Copy link
Member Author

aduth commented Oct 26, 2018

I don't know that this solution is viable. Closing with #11116 as parent issue for tracking.

@aduth aduth closed this Oct 26, 2018
@aduth aduth deleted the fix/stub-embeds-e2e branch October 26, 2018 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants