-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PP-4294 Cypress.io initial directories and files PP-4294 Add base Cypress.io test for non payment flow homepage
- Loading branch information
1 parent
c7f5bd7
commit 4044c64
Showing
18 changed files
with
4,205 additions
and
3,200 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env node | ||
let pact = require('@pact-foundation/pact-node') | ||
let opts = { | ||
pactFilesOrDirs: [`${__dirname}/../pacts/`], | ||
pactBroker: process.env.PACT_BROKER_URL, | ||
consumerVersion: process.env.PACT_CONSUMER_VERSION, | ||
pactBrokerUsername: process.env.PACT_BROKER_USERNAME, | ||
pactBrokerPassword: process.env.PACT_BROKER_PASSWORD, | ||
tags: process.env.PACT_CONSUMER_TAG | ||
} | ||
|
||
pact.publishPacts(opts).then(function () { | ||
console.log('>> Pact files have been published') | ||
}) |
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,14 @@ | ||
{ | ||
"baseUrl": "http://localhost:3000", | ||
"viewportHeight": 800, | ||
"viewportWidth": 1280, | ||
"env": { | ||
"TEST_SESSION_ENCRYPTION_KEY": "naskjwefvwei72rjkwfmjwfi72rfkjwefmjwefiuwefjkbwfiu24fmjbwfk" | ||
}, | ||
"fileServerFolder": "./test/cypress", | ||
"integrationFolder": "./test/cypress/integration", | ||
"pluginsFile": "./test/cypress/plugins", | ||
"screenshotsFolder": "./test/cypress/screenshots", | ||
"supportFile": false, | ||
"videosFolder": "./test/cypress/videos" | ||
} |
Empty file.
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,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "[email protected]", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
Empty file.
Empty file.
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,17 @@ | ||
// *********************************************************** | ||
// This example plugins/index.js can be used to load plugins | ||
// | ||
// You can change the location of this file or turn off loading | ||
// the plugins file with the 'pluginsFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/plugins-guide | ||
// *********************************************************** | ||
|
||
// This function is called when a project is opened or re-opened (e.g. due to | ||
// the project's config changing) | ||
|
||
module.exports = (on, config) => { | ||
// `on` is used to hook into various events Cypress emits | ||
// `config` is the resolved Cypress config | ||
} |
Empty file.
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,25 @@ | ||
// *********************************************** | ||
// This example commands.js shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add("login", (email, password) => { ... }) | ||
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is will overwrite an existing command -- | ||
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) |
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,20 @@ | ||
// *********************************************************** | ||
// This example support/index.js is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
import './commands' | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
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,8 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
rm -rf node_modules &&\ | ||
ln -s /tmp/node_modules /app/node_modules &&\ | ||
set -ueo pipefail | ||
rm -rf node_modules | ||
cp -R /tmp/node_modules /app/node_modules | ||
npm run compile &&\ | ||
npm run lint &&\ | ||
npm test -- --forbid-only --forbid-pending &&\ | ||
rm -rf node_modules | ||
npm run lint | ||
npm test -- --forbid-only --forbid-pending | ||
findpacts=$(ls -1 ./pacts | wc -l) | ||
if [ $findpacts -gt 0 ] | ||
then | ||
echo "Got pact files" | ||
# prevent publish of any pacts with 'to-be' in their name | ||
for i in ./pacts/*-to-be-*.json; do mv "$i" "${i%.json}.ignore"; done | ||
npm run publish-pacts | ||
else | ||
echo "No pact files found" | ||
fi |
Oops, something went wrong.