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
Better A4A/FIE testing, add FIE services regression test #19943
Better A4A/FIE testing, add FIE services regression test #19943
Conversation
ce8de1a
to
c88e4c6
Compare
816bf65
to
764e37d
Compare
/to @lannka Still need to fix a few integration test failures likely due to |
I think the problem right now is that test code doesn't wait for extensions to "be ready". E.g. a "click" event can happen before amp-analytics has a chance to setup the "click" trigger. |
f63b4a5
to
b795254
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem right now is that test code doesn't wait for extensions to "be ready". E.g. a "click" event can happen before amp-analytics has a chance to setup the "click" trigger.
Did your waitForReady function help?
I like your refactoring, good work!
Yup, that was the idea. Thanks! |
…19943) * Refactor amp4test to use compose helper. * Add support for cdn mode, fix bugs. * Add amp-bind in a4a integration test. * Uncomment other test. * Support amp-ad-metdata script. * Runtime char offsets should include runtime script itself. * Some comments. * Fix lint. * Add waitForElementLayout() and fix broken tests. * Poll readyState instead and decrease analytics timeout to 5s. * amp-pixel doesn't layout so wait for build instead. * Tweak timeout message for waitForElementBuild().
amp4test.js
to be configurable. Eg. it can now testamp4email
spec, A4A FIE with arbitrary content, etc.BrowserController.waitForElementReady()
to wait for custom elements to finish initializing (layout) before taking action.You can now pass
spec: 'amp'|'amp4ads'|'amp4email'
todescribes.integration
and it will generate a correctly formatted AMP document according to the chosen spec.Test an A4A/FIE with arbitrary markup
Test an AMP4EMAIL doc