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

✅ Deflakes SwG E2E Test #25065

Merged
merged 4 commits into from Oct 17, 2019
Merged

Conversation

ChrisAntaki
Copy link
Contributor

@ChrisAntaki ChrisAntaki commented Oct 15, 2019

This PR deflakes the SwG E2E test by waiting for the SwG button to render before triggering a click.

@ChrisAntaki ChrisAntaki marked this pull request as ready for review October 15, 2019 22:10
Copy link
Contributor

@jridgewell jridgewell left a comment

Choose a reason for hiding this comment

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

LGTM, but need @chenshay's review.

@chenshay chenshay merged commit 74977ea into ampproject:master Oct 17, 2019
@rsimha
Copy link
Contributor

rsimha commented Oct 17, 2019

@ChrisAntaki Thanks for fixing our tests! Looks like it failed on master again? https://travis-ci.org/ampproject/amphtml/jobs/599341253#L575

@ChrisAntaki
Copy link
Contributor Author

ChrisAntaki commented Oct 18, 2019

It doesn't repro often locally, but when it does here's what I see:

error.js:195 Service  subscriptions was requested to be provided through amp-subscriptions , but amp-subscriptions is not loaded in the current page. To fix this problem load the JavaScript file for amp-subscriptions in this page.
nf @ error.js:195
(anonymous) @ error.js:128
f.assert @ log.js:428
ja @ log.js:988
(anonymous) @ element-service.js:186
log.js:422 Uncaught (in promise) Error: Service subscriptions was requested to be provided through amp-subscriptions, but amp-subscriptions is not loaded in the current page. To fix this problem load the JavaScript file for amp-subscriptions in this page.​​​
    at Wa.f.assert (log.js:422)
    at ja (log.js:988)
    at element-service.js:186
f.assert @ log.js:422
ja @ log.js:988
(anonymous) @ element-service.js:186

@ChrisAntaki
Copy link
Contributor Author

Here are the complete logs from a failed run. Interestingly, the amp-subscriptions plugin does seem to kick off a request (which is expected to fail) later, so it does load eventually. Perhaps there's a race condition with the loading of extensions?

amp.js:157 Powered by AMP ⚡ HTML – Version 1910172338580 http://localhost:8000/test/fixtures/e2e/amp-subscriptions-google/swg.amp.html
error.js:195 Service  subscriptions was requested to be provided through amp-subscriptions , but amp-subscriptions is not loaded in the current page. To fix this problem load the JavaScript file for amp-subscriptions in this page.
nf @ error.js:195
(anonymous) @ error.js:128
f.assert @ log.js:428
ja @ log.js:988
(anonymous) @ element-service.js:186
log.js:422 Uncaught (in promise) Error: Service subscriptions was requested to be provided through amp-subscriptions, but amp-subscriptions is not loaded in the current page. To fix this problem load the JavaScript file for amp-subscriptions in this page.​​​
    at Wa.f.assert (log.js:422)
    at ja (log.js:988)
    at element-service.js:186
f.assert @ log.js:422
ja @ log.js:988
(anonymous) @ element-service.js:186
:8000/examples/sample-pub/amp-entitlements?pubid=com.appspot.scenic-2017&meter=1&__amp_source_origin=http%3A%2F%2Flocalhost%3A8000:1 Failed to load resource: the server responded with a status of 404 (Not Found)
log.js:244 [amp-subscriptions] Local platform has failed to resolve,  using fallback entitlement.
Ya @ log.js:244
f.warn @ log.js:285
push.f.h.reportPlatformFailureAndFallback @ platform-store.js:598
(anonymous) @ amp-subscriptions.js:304
error.js:202 fetch entitlements failed for local: HTTP error 404​​​
nf @ error.js:202
(anonymous) @ error.js:294
log.js:707 Uncaught (in promise) Error: fetch entitlements failed for local: HTTP error 404​​​
    at $a (log.js:707)
    at Wa.f.createError (log.js:345)
    at xhr-utils.js:385
    at new Promise (<anonymous>)
    at ig (xhr-utils.js:379)
    at xhr-impl.js:158
$a @ log.js:707
f.createError @ log.js:345
(anonymous) @ xhr-utils.js:385
ig @ xhr-utils.js:379
(anonymous) @ xhr-impl.js:158
cdn.ampproject.org/rtv/011910172338580/v0/amp-auto-lightbox-0.1.js:1 Failed to load resource: the server responded with a status of 404 ()
:8000/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)

@ChrisAntaki
Copy link
Contributor Author

@jpettitt has the real fix in #25145

joshuarrrr pushed a commit to Parsely/amphtml that referenced this pull request Oct 22, 2019
* Adds failinge expectation

* Fixes expectation

* Verify size of btn

* Fixes comment
micajuine-ho pushed a commit to micajuine-ho/amphtml that referenced this pull request Dec 27, 2019
* Adds failinge expectation

* Fixes expectation

* Verify size of btn

* Fixes comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants