Skip to content

🐛 [Story interactives] Fix interactive tests after some regression#37994

Merged
mszylkowski merged 22 commits intoampproject:mainfrom
mszylkowski:fixInteractiveTests
Apr 1, 2022
Merged

🐛 [Story interactives] Fix interactive tests after some regression#37994
mszylkowski merged 22 commits intoampproject:mainfrom
mszylkowski:fixInteractiveTests

Conversation

@mszylkowski
Copy link
Copy Markdown
Contributor

@mszylkowski mszylkowski commented Mar 31, 2022

The tests broke silently (eg: https://app.circleci.com/pipelines/github/ampproject/amphtml/24364/workflows/9107a8e2-f77d-425c-90f8-61c3b943442a/jobs/496752) maybe after a Chrome version upgrade or similar (note that innerText got banned at some point in the repo and we were still using it in the tests).

Updated the tests to use textContent and when failingg due to flaky newline chatacters inserted, replaced them before checking (the regex / \n/g matches spaces and newlines so we can ignore them).

@mszylkowski mszylkowski self-assigned this Mar 31, 2022
@amp-owners-bot
Copy link
Copy Markdown

amp-owners-bot bot commented Mar 31, 2022

Hey @gmajoulet! These files were changed:

extensions/amp-story-interactive/0.1/test/test-amp-story-interactive-binary-poll.js
extensions/amp-story-interactive/0.1/test/test-amp-story-interactive-img-poll.js
extensions/amp-story-interactive/0.1/test/test-amp-story-interactive-img-quiz.js
extensions/amp-story-interactive/0.1/test/test-amp-story-interactive-poll.js
extensions/amp-story-interactive/0.1/test/test-amp-story-interactive-quiz.js

@mszylkowski mszylkowski merged commit 492c460 into ampproject:main Apr 1, 2022
@mszylkowski mszylkowski deleted the fixInteractiveTests branch April 1, 2022 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants