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

Unskip amp-consent e2e test #27662

Merged
merged 9 commits into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
verifyElementsBuilt,
verifyPromptsHidden,
} from './common';
import sleep from 'sleep-promise';

describes.endtoend(
'amp-consent',
Expand All @@ -36,7 +37,7 @@ describes.endtoend(
controller = env.controller;
});

it.skip('should work with client side decision', async () => {
it('should work with client side decision', async () => {
resetAllElements();
const currentUrl = await controller.getCurrentUrl();

Expand Down Expand Up @@ -95,7 +96,9 @@ describes.endtoend(
'postPromptUi': false,
});

// Check the analytics request consentState
// Check the analytics request consentState. Wait for 1 second for the
// request to arrive to avoid flaky test.
await sleep(3000);
await expect(
'http://localhost:8000/amp4test/request-bank/e2e/deposit/tracking?consentState=sufficient'
).to.have.been.sent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
verifyElementsBuilt,
verifyPromptsHidden,
} from './common';
import sleep from 'sleep-promise';

describes.endtoend(
'amp-consent',
Expand All @@ -36,8 +37,7 @@ describes.endtoend(
controller = env.controller;
});

//TODO (micajuineho): Unskip flaky test
it.skip('should respect server side decision and persist it', async () => {
it('should respect server side decision and persist it', async () => {
resetAllElements();

const currentUrl = await controller.getCurrentUrl();
Expand Down Expand Up @@ -79,7 +79,9 @@ describes.endtoend(
'postPromptUi': false,
});

// Check the analytics request consentState
// Check the analytics request consentState. Wait for 1 second for the
// request to arrive to avoid flaky test.
await sleep(3000);
await expect(
'http://localhost:8000/amp4test/request-bank/e2e/deposit/tracking?consentState=insufficient'
).to.have.been.sent;
Expand Down