Skip to content

Commit

Permalink
Merge pull request #454 from CedricProfessionnel/problemCypressResolve
Browse files Browse the repository at this point in the history
Fix cypress bug
  • Loading branch information
seveibar authored Feb 8, 2021
2 parents 95595a8 + bf37b34 commit c9ac47e
Show file tree
Hide file tree
Showing 26 changed files with 1,660 additions and 120 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.cache
build/*
dist/*
lib/*
Expand Down
1 change: 1 addition & 0 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"testFiles": ["**/*.spec.js"],
"projectId": "w62sqq",
"pageLoadTimeout": 60000,
"defaultCommandTimeout": 4000,
Expand Down
10 changes: 5 additions & 5 deletions cypress/integration/aws-test.spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import enterCredentialsCognitoS3 from "../utils/credentials-test/enter-credentials-cognito-s3.spec"
import enterCredentialsUser from "../utils/credentials-test/enter-credentials-user.spec"
import setLanguage from "../utils/set-language.spec"
import goToImportPage from "../utils/go-to-import-page.spec"
import removeAWSFile from "../utils/remove-cypress-file-in-aws.spec"
import enterCredentialsCognitoS3 from "./utils/credentials-test/enter-credentials-cognito-s3"
import enterCredentialsUser from "./utils/credentials-test/enter-credentials-user"
import setLanguage from "./utils/set-language"
import goToImportPage from "./utils/go-to-import-page"
import removeAWSFile from "./utils/remove-cypress-file-in-aws"
import "regenerator-runtime/runtime"
if (Cypress.env().AWS_IDENTITY_POOL_ID)
describe("aws test", () => {
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/collaborative-session.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import clickOn100SamplesInACollaborativeSession from "../utils/interface-test/click-on-100-samples-in-a-collaborative-session.spec"
import createAndVisitCollaborativeSession from "../utils/interface-test/create-and-visit-collaborative-session.spec"
import clickOn100SamplesInACollaborativeSession from "./utils/interface-test/click-on-100-samples-in-a-collaborative-session"
import createAndVisitCollaborativeSession from "./utils/interface-test/create-and-visit-collaborative-session"
Cypress.config("defaultCommandTimeout", 3000)
describe("Create and Visit Collaborative Session", () => {
beforeEach("Prepare test", () => {
Expand Down
4 changes: 0 additions & 4 deletions cypress/integration/function-verification.spec.js

This file was deleted.

18 changes: 9 additions & 9 deletions cypress/integration/udt-test.spec.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import createNewFile from "../utils/interface-test/create-new-file.spec"
import imageClassification from "../utils/interface-test/image-classification.spec"
import imageSegmentation from "../utils/interface-test/image-segmentation.spec"
import keyboardShortcuts from "../utils/interface-test/keyboard-shortcuts.spec"
import labelHelp from "../utils/interface-test/label-help.spec"
import namedEntityRecognition from "../utils/interface-test/named-entity-recognition.spec"
import pasteImageUrlsWithCSV from "../utils/interface-test/paste-image-urls-with-csv.spec"
import pasteImageUrls from "../utils/interface-test/paste-image-urls.spec"
import textEntityClassification from "../utils/interface-test/text-entity-classification.spec"
import createNewFile from "./utils/interface-test/create-new-file"
import imageClassification from "./utils/interface-test/image-classification"
import imageSegmentation from "./utils/interface-test/image-segmentation"
import keyboardShortcuts from "./utils/interface-test/keyboard-shortcuts"
import labelHelp from "./utils/interface-test/label-help"
import namedEntityRecognition from "./utils/interface-test/named-entity-recognition"
import pasteImageUrlsWithCSV from "./utils/interface-test/paste-image-urls-with-csv"
import pasteImageUrls from "./utils/interface-test/paste-image-urls"
import textEntityClassification from "./utils/interface-test/text-entity-classification"

Cypress.config("defaultCommandTimeout", 3000)
describe("Udt test", () => {
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@ const { addMatchImageSnapshotPlugin } = require("cypress-image-snapshot/plugin")
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
addMatchImageSnapshotPlugin(on, config)
addMatchImageSnapshotPlugin(on, config),
require("@cypress/react/plugins/react-scripts")(on, config)
return config
}
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"build:babel": "cross-env NODE_ENV=production babel ./src --out-dir=./lib --copy-files && cp ./package.json ./lib/package.json && cp ./README.md ./lib/README.md && node ./lib/lib/fix-deps.js",
"build:vanilla": "parcel build -d ./lib -o vanilla.js ./src/vanilla/index.js",
"build:vanilla:dev": "parcel ./src/vanilla/index.js",
"build:watch": "babel --watch src --out-dir dist",
"build:web": "rimraf build && react-scripts build && cp -r build ./build-copy && mv build-copy build/app",
"build:desktop": "cross-env REACT_APP_DESKTOP=true PUBLIC_URL=./ react-scripts build && electron-builder build && cp ./desktop/entitlements.mac.plist ./build/entitlements.mac.plist",
"postinstall:desktop": "electron-builder install-app-deps",
Expand All @@ -32,7 +31,7 @@
"test:lint": "eslint src --max-warnings=0",
"test:integration:dev": "./node_modules/cypress/bin/cypress open",
"test:integration": "./node_modules/cypress/bin/cypress run --env failOnSnapshotDiff=false",
"test:devBrowser": "concurrently \"dotenv -- cross-env BABEL_ENV=development NODE_ENV=development yarn run cypress open\" \"yarn run build:watch\""
"test:devBrowser": "dotenv yarn run cypress open"
},
"eslintConfig": {
"extends": "react-app"
Expand All @@ -52,7 +51,7 @@
"devDependencies": {
"@babel/cli": "^7.5.0",
"@babel/core": "^7.5.4",
"@babel/plugin-proposal-optional-chaining": "^7.10.1",
"@cypress/react": "^4.16.4",
"@material-ui/core": "^4.9.5",
"@material-ui/icons": "^4.9.1",
"@storybook/addon-actions": "^5.3.19",
Expand All @@ -64,7 +63,7 @@
"chroma-js": "^2.0.4",
"concurrently": "^5.2.0",
"cross-env": "^7.0.0",
"cypress": "^6.3.0",
"cypress": "^6.4.0",
"cypress-file-upload": "^4.0.6",
"cypress-image-snapshot": "^3.1.1",
"electron": "^8.0.0",
Expand Down
Loading

0 comments on commit c9ac47e

Please sign in to comment.