-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #160 from newfold-labs/fix-tests-workflow
PRESS4-393 | Cypress Test Workflow fix
- Loading branch information
Showing
12 changed files
with
4,568 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
const { defineConfig } = require('cypress') | ||
const cypressReplay = require("@replayio/cypress") | ||
const { phpVersion, core } = require('./.wp-env.json') | ||
const wpVersion = /[^/]*$/.exec(core)[0] | ||
|
||
module.exports = defineConfig({ | ||
env: { | ||
wpUsername: 'admin', | ||
wpPassword: 'password', | ||
wpVersion, | ||
phpVersion, | ||
}, | ||
downloadsFolder: 'tests/cypress/downloads', | ||
fixturesFolder: 'tests/cypress/fixtures', | ||
screenshotsFolder: 'tests/cypress/screenshots', | ||
video: true, | ||
videosFolder: 'tests/cypress/videos', | ||
videoUploadOnPasses: false, | ||
chromeWebSecurity: false, | ||
viewportWidth: 1024, | ||
viewportHeight: 768, | ||
blockHosts: [ | ||
'*doubleclick.net', | ||
'*jnn-pa.googleapis.com', | ||
'*youtube.com', | ||
], | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
const semver = require('semver'); | ||
|
||
// Setup Replay | ||
cypressReplay.default(on, config); | ||
|
||
// Ensure that the base URL is always properly set. | ||
if (config.env && config.env.baseUrl) { | ||
config.baseUrl = config.env.baseUrl; | ||
} | ||
return config; | ||
}, | ||
baseUrl: 'http://localhost:8882', | ||
specPattern: 'tests/cypress/integration/**/*.cy.{js,jsx,ts,tsx}', | ||
supportFile: 'tests/cypress/support/index.js', | ||
testIsolation: false, | ||
}, | ||
}) |
Oops, something went wrong.