Skip to content
Permalink
Browse files

Add Percy tests for blog category (#4039)

* add percy tests for blog category

* update cypress test

* Update endpoint-tests.js

* Update package.json

* remove old comment

* skip 'non-existent category' percy test for now due to a Cypress issue

* Update package.json
  • Loading branch information
mmmavis committed Dec 11, 2019
1 parent 46650f1 commit cdc87cde53baab8306a27a9a96bb68e6748c84d7
Showing with 17 additions and 1 deletion.
  1. +16 −0 cypress/integration/endpoint-tests.js
  2. +1 −1 package.json
@@ -62,6 +62,22 @@ describe(`Visual regression testing for foundation.mozilla.org`, () => {
cy.percySnapshot();
});

it(`Blog index filtered on category`, function() {
cy.visit(`/en/blog/category/mozilla-festival`);
cy.window()
.its(`main-js:react:finished`)
.should(`equal`, true);
cy.wait(500);
cy.percySnapshot();
});

// Skipping as currently there's a bug related to Cypress about
// it not being able to visit a url that redirects
// GitHub ticket: https://github.com/mozilla/foundation.mozilla.org/issues/4042
it.skip(`Blog index with non-existent category`, function() {
cy.visit(`/en/blog/category/randomnonsensecateogrythatdoesntexist`);
});

it(`Fixed blog post page`, function() {
cy.visit(`/en/blog/initial-test-blog-post-with-fixed-title`);
cy.window()
@@ -13,7 +13,7 @@
"build": "npm run build:common && npm run build:js",
"build-uncompressed": "npm run build:common && npm run build:js-uncompressed",
"cypress": "run-p --race server cypress:test",
"cypress:install": "npm install --no-save cypress@^3.1.5 @percy/cypress@^2.0.0",
"cypress:install": "npm install --no-save cypress@^3.7.0 @percy/cypress@^2.0.0",
"cypress:test": "wait-on tcp:8000 && cypress run",
"heroku-postbuild": "npm run build",
"migrate": "pipenv run python network-api/manage.py migrate",

0 comments on commit cdc87cd

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