Merge pull request #512 from Human-Connection/test-out-cypress-plugin-retries

[WIP] Rerun moderation/report tests on failure
This commit is contained in:
Robert Schäfer 2019-05-07 12:44:26 +02:00 committed by GitHub
commit 473a7ec95a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 63 deletions

View File

@ -28,7 +28,7 @@ script:
- docker-compose exec webapp yarn run lint
- docker-compose exec webapp yarn run test --ci --verbose=false
- docker-compose exec -d backend yarn run test:before:seeder
- yarn run cypress:run
- CYPRESS_RETRIES=1 yarn run cypress:run
after_success:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh

View File

@ -1,17 +0,0 @@
// ***********************************************************
// 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
}

View File

@ -1,25 +0,0 @@
// ***********************************************
// 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) => { ... })

View File

@ -1,20 +0,0 @@
// ***********************************************************
// 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')

View File

@ -14,8 +14,13 @@
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands'
import './factories'
// intermittent failing tests
import 'cypress-plugin-retries'
// Alternatively you can use CommonJS syntax:
// require('./commands')

View File

@ -23,6 +23,7 @@
"cross-env": "^5.2.0",
"cypress": "^3.2.0",
"cypress-cucumber-preprocessor": "^1.11.0",
"cypress-plugin-retries": "^1.2.0",
"dotenv": "^8.0.0",
"faker": "^4.1.0",
"graphql-request": "^1.8.2",

View File

@ -1810,6 +1810,11 @@ cypress-cucumber-preprocessor@^1.11.0:
glob "^7.1.2"
through "^2.3.8"
cypress-plugin-retries@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/cypress-plugin-retries/-/cypress-plugin-retries-1.2.0.tgz#a4e120c1bc417d1be525632e7d38e52a87bc0578"
integrity sha512-seQFI/0j5WCqX7IVN2k0tbd3FLdhbPuSCWdDtdzDmU9oJfUkRUlluV47TYD+qQ/l+fJYkQkpw8csLg8/LohfRg==
cypress@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-3.2.0.tgz#c2d5befd5077dab6fb52ad70721e0868ac057001"