Skip to content

Add amp-form test for pre-existing redirection behavior#25515

Merged
caroqliu merged 3 commits intoampproject:masterfrom
caroqliu:form-redirect-test
Nov 11, 2019
Merged

Add amp-form test for pre-existing redirection behavior#25515
caroqliu merged 3 commits intoampproject:masterfrom
caroqliu:form-redirect-test

Conversation

@caroqliu
Copy link
Copy Markdown
Contributor

@caroqliu caroqliu commented Nov 8, 2019

Follow up to #25473 to prevent future breakage

Comment on lines +2430 to +2431
sandbox.stub(ampForm.xhr_, 'fetch').returns(
Promise.resolve({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's use .resolves here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Would prefer to keep as is since that is more self-consistent with other stubs in this file. WDYT?

Copy link
Copy Markdown
Contributor

@wassgha wassgha Nov 8, 2019

Choose a reason for hiding this comment

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

👍 we can switch them on a different PR since this is a large file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Follow up PR: #25539

@caroqliu caroqliu merged commit 96663e6 into ampproject:master Nov 11, 2019
@caroqliu caroqliu deleted the form-redirect-test branch November 11, 2019 14:49
micajuine-ho pushed a commit to micajuine-ho/amphtml that referenced this pull request Dec 27, 2019
…5515)

* Revert "🐛Expose amp-form response from SSR in `submit-success` and `submit-error` events. (ampproject#25242)"

This reverts commit 48d5ffd.

* Add test case for bad json
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.

3 participants