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

added donate landing and help page to percy tests #11595

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/visual-regression-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ jobs:
ALLOWED_HOSTS: 127.0.0.1,localhost,mozfest.localhost,default-site.com,secondary-site.com
CONTENT_TYPE_NO_SNIFF: True
CORS_ALLOWED_ORIGINS: "*"
CSP_CHILD_SRC: " 'self' https://www.youtube.com https://www.youtube-nocookie.com "
CSP_CONNECT_SRC: " * "
CSP_DEFAULT_SRC: " 'none' "
CSP_FONT_SRC: " 'self' data: https://fonts.gstatic.com https://fonts.googleapis.com https://code.cdn.mozilla.net https://static.fundraiseup.com/fonts/ https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/fonts/"
CSP_FRAME_ANCESTORS: " 'none' "
CSP_FRAME_SRC: " 'self' https://www.youtube.com https://comments.mozillafoundation.org/ https://airtable.com https://docs.google.com/ https://platform.twitter.com https://public.zenkit.com https://calendar.google.com https://www.youtube-nocookie.com https://form.typeform.com https://js.tito.io https://datawrapper.dwcdn.net https://www.google.com/recaptcha/"
CSP_IMG_SRC: " * data: "
CSP_MEDIA_SRC: " 'self' data: https://s3.amazonaws.com/mofo-assets/foundation/video/ "
CSP_SCRIPT_SRC: " 'self' 'unsafe-inline' https://www.google-analytics.com/analytics.js http://*.shpg.org/ https://comments.mozillafoundation.org/ https://airtable.com https://platform.twitter.com https://cdn.syndication.twimg.com https://embed.typeform.com https://js.tito.io https://js-plugins.tito.io/gtm.js https://tagmanager.google.com *.googletagmanager.com https://*.fundraiseup.com https://mozillafoundation.tfaforms.net https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/ 'unsafe-eval'"
CSP_STYLE_SRC: " 'self' 'unsafe-inline' https://code.cdn.mozilla.net https://fonts.googleapis.com https://platform.twitter.com https://js.tito.io https://tagmanager.google.com https://mozillafoundation.tfaforms.net https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
CSP_INCLUDE_NONCE_IN: "script-src"
DATABASE_URL: postgres://postgres:postgres@localhost:5432/network
DEBUG: True
DJANGO_SECRET_KEY: secret
Expand Down
2 changes: 2 additions & 0 deletions tests/foundation-urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ module.exports = {
"/publication-page-with-chapter-pages/fixed-title-chapter-page",
"Article page":
"/publication-page-with-chapter-pages/fixed-title-chapter-page/fixed-title-article-page",
Donate: "/donate",
"Donate Help": "/donate/help",
PNI: "/privacynotincluded",
"PNI (filtered for category)": "/privacynotincluded/categories/toys-games",
"PNI general product page": "/privacynotincluded/general-percy-product",
Expand Down
10 changes: 10 additions & 0 deletions tests/visual.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ function testURL(baseUrl, path) {
await page.waitForTimeout(2000);
}

// For the Donate Help page, we need to scroll the reCAPTCHA box into view so it can be rendered in the screenshot
if (path == "/donate/help") {
// Wait for the reCAPTCHA iframe to be visible
const iframeHandle = await page.waitForSelector(
'iframe[title="reCAPTCHA"]',
{ visible: true }
);
await iframeHandle.scrollIntoViewIfNeeded();
}

// we don't want to screenshot before images are done.
await waitForImagesToLoad(page);

Expand Down