Skip to content
Permalink
Browse files

Add MozFest homepage and primary page to Percy test (#3951)

  • Loading branch information
mmmavis committed Nov 27, 2019
1 parent abab375 commit 23d118915e1bd39bdb86980373f17b737f5865ea
Showing with 29 additions and 2 deletions.
  1. +3 −1 .travis.yml
  2. +4 −1 cypress.json
  3. +21 −0 cypress/integration/endpoint-tests.js
  4. +1 −0 network-api/networkapi/templates/reviewapp-help.html
@@ -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
@@ -1,4 +1,7 @@
{
"baseUrl": "http://localhost:8000",
"video": false
"video": false,
"env": {
"mozfest-baseurl": "http://mozfest.localhost:8000"
}
}
@@ -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();
});
});
@@ -23,6 +23,7 @@ <h1 class="h1-heading">Review app help page</h1>
<li><a href="/opportunity/multi-page/">Multi page opportunity</a></li>
<li><a href="/blog/initial-test-blog-post-with-fixed-title/">Blog post</a></li>
<li><a href="/privacynotincluded/">Privacy Not Included</a></li>
<li><a href="/mozilla-festival/">Mozilla Festival</a></li>
</ul>
</div>
</div>

0 comments on commit 23d1189

Please sign in to comment.
You can’t perform that action at this time.