From 23d118915e1bd39bdb86980373f17b737f5865ea Mon Sep 17 00:00:00 2001 From: Mavis Ou Date: Tue, 26 Nov 2019 19:16:30 -0800 Subject: [PATCH] Add MozFest homepage and primary page to Percy test (#3951) --- .travis.yml | 4 +++- cypress.json | 5 ++++- cypress/integration/endpoint-tests.js | 21 +++++++++++++++++++ .../networkapi/templates/reviewapp-help.html | 1 + 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index cc84f0301..a3fa90e92 100755 --- a/.travis.yml +++ b/.travis.yml @@ -10,10 +10,12 @@ python: addons: postgresql: "9.6" + hosts: + - mozfest.localhost env: global: - - ALLOWED_HOSTS=localhost + - ALLOWED_HOSTS=localhost,mozfest.localhost - CONTENT_TYPE_NO_SNIFF=True - CORS_WHITELIST="*" - DATABASE_URL=postgres://postgres@localhost:5432/network diff --git a/cypress.json b/cypress.json index a7c41e007..1ff0b61b6 100644 --- a/cypress.json +++ b/cypress.json @@ -1,4 +1,7 @@ { "baseUrl": "http://localhost:8000", - "video": false + "video": false, + "env": { + "mozfest-baseurl": "http://mozfest.localhost:8000" + } } diff --git a/cypress/integration/endpoint-tests.js b/cypress/integration/endpoint-tests.js index 171186142..ea536c871 100644 --- a/cypress/integration/endpoint-tests.js +++ b/cypress/integration/endpoint-tests.js @@ -1,4 +1,5 @@ const FIXED_DATE = new Date(2019, 1, 1).getTime(); +const MOZFEST_BASE_URL = Cypress.env("mozfest-baseurl"); describe(`Visual regression testing for foundation.mozilla.org`, () => { beforeEach(function() { @@ -156,4 +157,24 @@ describe(`Visual regression testing for foundation.mozilla.org`, () => { cy.wait(1000); cy.percySnapshot(); }); + + // Pages specific to MozFest + + it(`MozFest homepage`, function() { + cy.visit(`${MOZFEST_BASE_URL}`); + cy.window() + .its(`main-js:react:finished`) + .should(`equal`, true); + cy.wait(500); + cy.percySnapshot(); + }); + + it(`MozFest primary page`, function() { + cy.visit(`${MOZFEST_BASE_URL}/spaces`); + cy.window() + .its(`main-js:react:finished`) + .should(`equal`, true); + cy.wait(500); + cy.percySnapshot(); + }); }); diff --git a/network-api/networkapi/templates/reviewapp-help.html b/network-api/networkapi/templates/reviewapp-help.html index d27e1a3e9..ddf3bae08 100644 --- a/network-api/networkapi/templates/reviewapp-help.html +++ b/network-api/networkapi/templates/reviewapp-help.html @@ -23,6 +23,7 @@
  • Multi page opportunity
  • Blog post
  • Privacy Not Included
  • +
  • Mozilla Festival