Skip to content

✅ Add e2e test for form[custom-validation-reporting="as-you-go"]#34679

Closed
alanorozco wants to merge 0 commit intoampproject:mainfrom
alanorozco:main
Closed

✅ Add e2e test for form[custom-validation-reporting="as-you-go"]#34679
alanorozco wants to merge 0 commit intoampproject:mainfrom
alanorozco:main

Conversation

@alanorozco
Copy link
Copy Markdown
Member

Adds test case related to #34641, which should fail with a rollforward.

@amp-owners-bot amp-owners-bot bot requested a review from estherkim June 3, 2021 16:10
@amp-owners-bot
Copy link
Copy Markdown

amp-owners-bot bot commented Jun 3, 2021

Hey @estherkim! These files were changed:

build-system/tasks/e2e/e2e-types.js
build-system/tasks/e2e/selenium-webdriver-controller.js

'ArrowLeft': 'ArrowLeft',
'ArrowRight': 'ArrowRight',
'ArrowUp': 'ArrowUp',
'Backspace': 'Backspace',
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Necessary to trigger a backspace. I don't like this double mapping :(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Agreed :(

Copy link
Copy Markdown
Contributor

@micajuine-ho micajuine-ho left a comment

Choose a reason for hiding this comment

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

Thank you for adding this test Alan!!

await controller.click(submitButton);
await expect(
'https://example.com/subscribe?__amp_source_origin=http%3A%2F%2Flocalhost%3A8000'
).to.not.have.been.sent;
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.

Curious, this check for a request being sent is natively built into our testing framework?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Only on e2e tests.

extensions/amp-consent/0.1/test-e2e/test-amp-consent-client-side.js:
  102          'http://localhost:8000/amp4test/request-bank/e2e/deposit/tracking?consentState=sufficient'
  103:       ).to.have.been.sent;

extensions/amp-consent/0.1/test-e2e/test-amp-consent-server-side-expire-cache.js:
  47          'http://localhost:8000/amp4test/request-bank/e2e/deposit/tracking?consentState=insufficient'
  48:       ).to.have.been.sent;

  92          'http://localhost:8000/amp4test/request-bank/e2e/deposit/tracking?consentState=sufficient'
  93:       ).to.have.been.sent;

extensions/amp-consent/0.1/test-e2e/test-amp-consent-server-side.js:
  85          'http://localhost:8000/amp4test/request-bank/e2e/deposit/tracking?consentState=insufficient'
  86:       ).to.have.been.sent;

extensions/amp-form/0.1/test-e2e/test-validation-reporting-as-you-go.js:
  36          'https://example.com/subscribe?__amp_source_origin=http%3A%2F%2Flocalhost%3A8000'
  37:       ).to.not.have.been.sent;
  38      });

  48          'https://example.com/subscribe?__amp_source_origin=http%3A%2F%2Flocalhost%3A8000'
  49:       ).to.have.been.sent;

extensions/amp-video/0.1/test-e2e/test-amp-video-analytics.js:
  53          'http://localhost:8000/amp4test/request-bank/e2e/deposit/tracking&id=myVideo'
  54:       ).to.have.been.sent;

  64          'http://localhost:8000/amp4test/request-bank/e2e/deposit/tracking&id=myVideo2'
  65:       ).to.have.been.sent;

extensions/amp-video/0.1/test-e2e/test-amp-video-flexible-bitrate.js:
  228            'https://amp-dev.cdn.ampproject.org/mbv/s/amp.dev/static/samples/video/tokyo.mp4?amp_video_host_url=https%3A%2F%2Famp.dev%2F&__amp_source_origin=http%3A%2F%2Flocalhost%3A8000'
  229:         ).to.have.been.sent;

Copy link
Copy Markdown
Collaborator

@estherkim estherkim left a comment

Choose a reason for hiding this comment

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

e2e changes ✅

'ArrowLeft': 'ArrowLeft',
'ArrowRight': 'ArrowRight',
'ArrowUp': 'ArrowUp',
'Backspace': 'Backspace',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Agreed :(

@alanorozco alanorozco enabled auto-merge (squash) June 3, 2021 16:41
@alanorozco alanorozco closed this Jun 3, 2021
auto-merge was automatically disabled June 3, 2021 17:22

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants