Skip to content

Commit

Permalink
Update Cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wpscholar committed Dec 1, 2024
1 parent 51aa072 commit 0c20bbe
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cypress.config.js → cypress.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {defineConfig} = require('cypress')
const { defineConfig } = require('cypress');

module.exports = defineConfig({
env: {
Expand All @@ -21,6 +21,7 @@ module.exports = defineConfig({
return config;
},
baseUrl: 'http://localhost:8888',
experimentalRunAllSpecs: true,
specPattern: 'tests/cypress/integration/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'tests/cypress/support/index.js',
testIsolation: false
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"url": "git+https://github.com/wpscholar-wp-plugins/mpress-hide-from-search.git"
},
"author": "Micah Wood <[email protected]> (https://wpscholar.com)",
"license": "GPL-3.0",
"license": "GPL-2.0",
"bugs": {
"url": "https://github.com/wpscholar-wp-plugins/mpress-hide-from-search/issues"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/integration/test.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ context(
});
}

before(() => {
beforeEach(() => {
loadPage();
})

Expand Down
7 changes: 6 additions & 1 deletion tests/cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@

import './commands';

before(() => {
Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here prevents Cypress from failing the test
return false;
});

beforeEach(() => {
cy.login(Cypress.env('wpUsername'), Cypress.env('wpPassword'));
});

0 comments on commit 0c20bbe

Please sign in to comment.