-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SBVT-1379: include freezepageResults on the response & update qa tests (
#83) * SBVT-1379: return the freezePageResults on the object\ add all the tests * SBVT-1379: update gitIgnore cypress config file now reports at the end of a run for the npm test * SBVT-1379: make the mocawesome logs quiet * SBVT-1379: move getDescribeTitle.js to a function * SBVT-1379: move flattendom to a function and remove unused * SBVT-1379: syntax fix * SBVT-1379: describe title changes * SBVT-1379: refactor bin -> utils folder --------- Co-authored-by: trevor.nelms <[email protected]>
- Loading branch information
Showing
16 changed files
with
4,542 additions
and
1,568 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,51 @@ | ||
const { defineConfig } = require("cypress"); | ||
const {defineConfig} = require("cypress"); | ||
const chalk = require("chalk"); | ||
const deletePastReports = require("./utils/deletePastReports") | ||
const generateReports = require("./utils/generateReports") | ||
|
||
|
||
module.exports = defineConfig({ | ||
// viewportWidth: 1920, | ||
// viewportHeight: 1080, | ||
video: false, | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
// viewportWidth: 1920, | ||
// viewportHeight: 1080, | ||
reporterOptions: { | ||
overwrite: false, | ||
html: false, | ||
json: true, | ||
timestamp: "mm/dd/yyyy_HH|MM|ss", | ||
quiet: true | ||
}, | ||
bail: true, | ||
video: false, | ||
e2e: { | ||
setupNodeEvents(on) { | ||
|
||
on('before:run', (results) => { | ||
if (results.config.reporter === "mochawesome") { | ||
deletePastReports() | ||
} | ||
}) | ||
on('after:run', (results) => { | ||
//todo fix the sbvt after test report being overwritten | ||
|
||
if (results.config.reporter === "mochawesome") { | ||
generateReports() | ||
printResults(results) | ||
} | ||
}) | ||
}, | ||
}, | ||
}, | ||
}); | ||
|
||
require('@smartbear/visualtest-cypress')(module) | ||
require('@smartbear/visualtest-cypress')(module) | ||
|
||
const printResults = (results) => { | ||
if (results.totalFailed) { | ||
process.stdout.write(`\t`); | ||
process.stdout.write(chalk.bgRedBright(`there was ${results.totalFailed} ${results.totalFailed === 1 ? 'failure' : 'failures'}`)); | ||
} | ||
if (results.totalPassed) { | ||
process.stdout.write(`\t`); | ||
process.stdout.write(chalk.green(`there was ${results.totalPassed} passed ${results.totalPassed === 1 ? 'test' : 'tests'}`)); | ||
} | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.