Browse Source

mv test into tests, add test-utils, configure jest

Olivier Massot 4 years ago
parent
commit
bcc655e319

+ 8 - 8
.gitlab-ci.yml

@@ -35,8 +35,8 @@ chrome:
   artifacts:
     when: on_failure
     paths:
-      - test/cypress/videos/**/*.mp4
-      - test/cypress/screenshots/**/*.png
+      - tests/cypress/videos/**/*.mp4
+      - tests/cypress/screenshots/**/*.png
     expire_in: 3 day
 
 chrome-mobile:
@@ -48,8 +48,8 @@ chrome-mobile:
   artifacts:
     when: on_failure
     paths:
-      - test/cypress/videos/**/*.mp4
-      - test/cypress/screenshots/**/*.png
+      - tests/cypress/videos/**/*.mp4
+      - tests/cypress/screenshots/**/*.png
     expire_in: 3 day
 
 firefox:
@@ -61,8 +61,8 @@ firefox:
   artifacts:
     when: on_failure
     paths:
-      - test/cypress/videos/**/*.mp4
-      - test/cypress/screenshots/**/*.png
+      - tests/cypress/videos/**/*.mp4
+      - tests/cypress/screenshots/**/*.png
     expire_in: 3 day
 
 firefox-mobile:
@@ -74,6 +74,6 @@ firefox-mobile:
   artifacts:
     when: on_failure
     paths:
-      - test/cypress/videos/**/*.mp4
-      - test/cypress/screenshots/**/*.png
+      - tests/cypress/videos/**/*.mp4
+      - tests/cypress/screenshots/**/*.png
     expire_in: 3 day

+ 6 - 6
cypress.json

@@ -1,11 +1,11 @@
 {
   "baseUrl": "http://localhost:3004",
-  "fixturesFolder": "test/cypress/fixtures",
-  "integrationFolder": "test/cypress/integration",
-  "pluginsFile": "test/cypress/plugins/index.js",
-  "screenshotsFolder": "test/cypress/screenshots",
-  "supportFile": "test/cypress/support/index.js",
-  "videosFolder": "test/cypress/videos",
+  "fixturesFolder": "tests/cypress/fixtures",
+  "integrationFolder": "tests/cypress/integration",
+  "pluginsFile": "tests/cypress/plugins/index.js",
+  "screenshotsFolder": "tests/cypress/screenshots",
+  "supportFile": "tests/cypress/support/index.js",
+  "videosFolder": "tests/cypress/videos",
   "env": {
     "apiUrl": "http://nginx"
   },

+ 1 - 0
jest.config.js

@@ -22,5 +22,6 @@ module.exports = {
     '<rootDir>/pages/**/*.vue'
   ],
   testEnvironment: 'jsdom',
+  testMatch: ['**/tests/unit/**/*.spec.js'],
   setupFiles: ['<rootDir>/tests/unit/index.ts']
 }

+ 1 - 0
package.json

@@ -39,6 +39,7 @@
   },
   "devDependencies": {
     "@babel/eslint-parser": "^7.14.7",
+    "@nuxt/test-utils": "^0.2.2",
     "@nuxt/types": "^2.15.7",
     "@nuxt/typescript-build": "^2.1.0",
     "@nuxtjs/eslint-config-typescript": "^6.0.1",

+ 0 - 0
test/cypress/.eslintrc.json → tests/cypress/.eslintrc.json


+ 0 - 0
test/cypress/.gitignore → tests/cypress/.gitignore


+ 0 - 0
test/cypress/fixtures/structure-by-id.json → tests/cypress/fixtures/structure-by-id.json


+ 0 - 0
test/cypress/fixtures/structures.json → tests/cypress/fixtures/structures.json


+ 0 - 0
test/cypress/integration/structures/_id.spec.js → tests/cypress/integration/structures/_id.spec.js


+ 0 - 0
test/cypress/integration/structures/index.spec.js → tests/cypress/integration/structures/index.spec.js


+ 0 - 0
test/cypress/plugins/index.js → tests/cypress/plugins/index.js


+ 0 - 0
test/cypress/support/commands.js → tests/cypress/support/commands.js


+ 0 - 0
test/cypress/support/index.js → tests/cypress/support/index.js


+ 0 - 0
test/cypress/support/leaflet.js → tests/cypress/support/leaflet.js


+ 0 - 0
test/cypress/support/vuetify.js → tests/cypress/support/vuetify.js


+ 0 - 0
test/unit/component/Ui/Map/Structures.spec.js → tests/unit/component/Ui/Map/Structures.spec.js


+ 0 - 0
test/unit/component/Ui/Search/Address.spec.js → tests/unit/component/Ui/Search/Address.spec.js


+ 0 - 0
test/unit/index.ts → tests/unit/index.ts


+ 0 - 0
test/unit/pages/structures/index.spec.js → tests/unit/pages/structures/index.spec.js


File diff suppressed because it is too large
+ 471 - 338
yarn.lock


Some files were not shown because too many files changed in this diff