-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a49c05d
commit 31f3490
Showing
84 changed files
with
2,465 additions
and
2,202 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,54 @@ | ||
/* eslint-env node */ | ||
require('@rushstack/eslint-patch/modern-module-resolution') | ||
require("@rushstack/eslint-patch/modern-module-resolution"); | ||
|
||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'eslint:recommended', | ||
"eslint:recommended", | ||
// 'standard-with-typescript', // À décommenter quand le code sera typé | ||
'standard', | ||
'@vue/eslint-config-typescript', | ||
'plugin:vue/vue3-recommended', | ||
'./.eslintrc-auto-import.json', | ||
"prettier" | ||
], | ||
plugins: [ | ||
'vue', | ||
"standard", | ||
"@vue/eslint-config-typescript", | ||
"plugin:vue/vue3-recommended", | ||
"./.eslintrc-auto-import.json", | ||
"prettier", | ||
], | ||
plugins: ["vue"], | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
parser: '@typescript-eslint/parser', | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
parser: "@typescript-eslint/parser", | ||
tsconfigRootDir: __dirname, | ||
project: ['./tsconfig.app.json'], | ||
project: ["./tsconfig.app.json"], | ||
}, | ||
env: { | ||
'vue/setup-compiler-macros': true, | ||
"vue/setup-compiler-macros": true, | ||
browser: true, | ||
es2021: true, | ||
}, | ||
rules: { | ||
'comma-dangle': [2, 'always-multiline'], | ||
'@typescript-eslint/comma-dangle': [2, 'always-multiline'], | ||
'vue/no-v-html': 0, | ||
'no-irregular-whitespace': 0, | ||
"comma-dangle": [2, "always-multiline"], | ||
"@typescript-eslint/comma-dangle": [2, "always-multiline"], | ||
"vue/no-v-html": 0, | ||
"no-irregular-whitespace": 0, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/__tests__/*.{j,t}s?(x)', '**/src/**/*.spec.{j,t}s?(x)'], | ||
files: ["**/__tests__/*.{j,t}s?(x)", "**/src/**/*.spec.{j,t}s?(x)"], | ||
env: { | ||
jest: true, | ||
}, | ||
}, | ||
{ | ||
files: ['src/utils/**/*.{j,t}s?(x)'], | ||
files: ["src/utils/**/*.{j,t}s?(x)"], | ||
rules: { | ||
camelcase: 'off', | ||
camelcase: "off", | ||
}, | ||
}, | ||
{ | ||
files: ['**/src/**/*.e2e.js*', '**/src/**/*.cy.js'], | ||
files: ["**/src/**/*.e2e.js*", "**/src/**/*.cy.js"], | ||
globals: { | ||
cy: true, | ||
}, | ||
}, | ||
], | ||
} | ||
}; |
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,3 +1,3 @@ | ||
This folder is only useful if your network imposes you to use custom certs. | ||
|
||
You can ignore it otherwise. | ||
This folder is only useful if your network imposes you to use custom certs. | ||
|
||
You can ignore it otherwise. |
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,16 +1,16 @@ | ||
const { defineConfig } = require('cypress') | ||
const { defineConfig } = require("cypress"); | ||
|
||
const frontendHost = process.env.FRONTEND_HOST || 'localhost' | ||
const frontendPort = process.env.FRONTEND_PORT || '3000' | ||
const frontendHost = process.env.FRONTEND_HOST || "localhost"; | ||
const frontendPort = process.env.FRONTEND_PORT || "3000"; | ||
|
||
module.exports = defineConfig({ | ||
e2e: { | ||
specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,ts}', | ||
specPattern: "cypress/e2e/**/*.{cy,spec}.{js,ts}", | ||
baseUrl: `http://${frontendHost}:${frontendPort}`, | ||
// NEO - Crosscall X4 - Résolution : 18:9 | ||
// Iphone XR | ||
viewportWidth: 414, | ||
viewportHeight: 896, | ||
video: false, | ||
}, | ||
}) | ||
}); |
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,12 +1,10 @@ | ||
module.exports = { | ||
plugins: [ | ||
'cypress', | ||
], | ||
plugins: ["cypress"], | ||
env: { | ||
mocha: true, | ||
'cypress/globals': true, | ||
"cypress/globals": true, | ||
}, | ||
rules: { | ||
strict: 'off', | ||
strict: "off", | ||
}, | ||
} | ||
}; |
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,51 +1,57 @@ | ||
describe('Firearm Fiability', () => { | ||
it('should identificate firearm with high fiability', () => { | ||
cy.Identification() | ||
describe("Firearm Fiability", () => { | ||
it("should identificate firearm with high fiability", () => { | ||
cy.Identification(); | ||
|
||
cy.getByDataTestid('select-file').as('fileInput') | ||
cy.intercept('POST', '/api/upload').as('upload') | ||
cy.get('@fileInput').selectFile('./cypress/images/pistolet-semi-auto.jpg', { force: true }) | ||
cy.wait('@upload').then(({ response }) => { | ||
expect(response.statusCode).to.eq(200) | ||
}) | ||
cy.getByDataTestid('next-step').click() | ||
cy.IdentificationPistoletSemiAuto() | ||
cy.url().should('contain', '/guide-identification/resultat-final') | ||
cy.getByDataTestid('arm-category').should('contain', 'Catégorie B') | ||
cy.getByDataTestid('arm-category').should(() => { | ||
expect(localStorage.getItem('confidenceLevel')).to.eq('"high"') | ||
}) | ||
}) | ||
cy.getByDataTestid("select-file").as("fileInput"); | ||
cy.intercept("POST", "/api/upload").as("upload"); | ||
cy.get("@fileInput").selectFile("./cypress/images/pistolet-semi-auto.jpg", { | ||
force: true, | ||
}); | ||
cy.wait("@upload").then(({ response }) => { | ||
expect(response.statusCode).to.eq(200); | ||
}); | ||
cy.getByDataTestid("next-step").click(); | ||
cy.IdentificationPistoletSemiAuto(); | ||
cy.url().should("contain", "/guide-identification/resultat-final"); | ||
cy.getByDataTestid("arm-category").should("contain", "Catégorie B"); | ||
cy.getByDataTestid("arm-category").should(() => { | ||
expect(localStorage.getItem("confidenceLevel")).to.eq('"high"'); | ||
}); | ||
}); | ||
|
||
it('should identificate firearm with medium fiability', () => { | ||
cy.Identification() | ||
it("should identificate firearm with medium fiability", () => { | ||
cy.Identification(); | ||
|
||
cy.getByDataTestid('select-file').as('fileInput') | ||
cy.intercept('POST', '/api/upload').as('upload') | ||
cy.get('@fileInput').selectFile('./cypress/images/arme-medium.png', { force: true }) | ||
cy.wait('@upload').then(({ response }) => { | ||
expect(response.statusCode).to.eq(200) | ||
}) | ||
cy.url().should('contain', '/guide-identification/resultat-typologie') | ||
cy.contains('h3', 'Catégorie A, B ou D') | ||
cy.get('h2').should(() => { | ||
expect(localStorage.getItem('confidenceLevel')).to.eq('"medium"') | ||
}) | ||
}) | ||
cy.getByDataTestid("select-file").as("fileInput"); | ||
cy.intercept("POST", "/api/upload").as("upload"); | ||
cy.get("@fileInput").selectFile("./cypress/images/arme-medium.png", { | ||
force: true, | ||
}); | ||
cy.wait("@upload").then(({ response }) => { | ||
expect(response.statusCode).to.eq(200); | ||
}); | ||
cy.url().should("contain", "/guide-identification/resultat-typologie"); | ||
cy.contains("h3", "Catégorie A, B ou D"); | ||
cy.get("h2").should(() => { | ||
expect(localStorage.getItem("confidenceLevel")).to.eq('"medium"'); | ||
}); | ||
}); | ||
|
||
it('should identificate firearm with low fiability', () => { | ||
cy.Identification() | ||
it("should identificate firearm with low fiability", () => { | ||
cy.Identification(); | ||
|
||
cy.getByDataTestid('select-file').as('fileInput') | ||
cy.intercept('POST', '/api/upload').as('upload') | ||
cy.get('@fileInput').selectFile('./cypress/images/arme-low.png', { force: true }) | ||
cy.wait('@upload').then(({ response }) => { | ||
expect(response.statusCode).to.eq(200) | ||
}) | ||
cy.url().should('contain', '/guide-identification/resultat-typologie') | ||
cy.contains('h2', 'Catégorie non déterminée') | ||
cy.get('h2').should(() => { | ||
expect(localStorage.getItem('confidenceLevel')).to.eq('"low"') | ||
}) | ||
}) | ||
}) | ||
cy.getByDataTestid("select-file").as("fileInput"); | ||
cy.intercept("POST", "/api/upload").as("upload"); | ||
cy.get("@fileInput").selectFile("./cypress/images/arme-low.png", { | ||
force: true, | ||
}); | ||
cy.wait("@upload").then(({ response }) => { | ||
expect(response.statusCode).to.eq(200); | ||
}); | ||
cy.url().should("contain", "/guide-identification/resultat-typologie"); | ||
cy.contains("h2", "Catégorie non déterminée"); | ||
cy.get("h2").should(() => { | ||
expect(localStorage.getItem("confidenceLevel")).to.eq('"low"'); | ||
}); | ||
}); | ||
}); |
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,31 +1,35 @@ | ||
describe('Firearm Identification', () => { | ||
it('should identificate real firearm', () => { | ||
cy.Identification() | ||
cy.getByDataTestid('select-file').as('fileInput') | ||
cy.intercept('POST', '/api/upload').as('upload') | ||
cy.get('@fileInput').selectFile('./cypress/images/pistolet-semi-auto.jpg', { force: true }) | ||
cy.wait('@upload').then(({ response }) => { | ||
expect(response.statusCode).to.eq(200) | ||
}) | ||
cy.getByDataTestid('next-step').click() | ||
cy.IdentificationPistoletSemiAuto() | ||
cy.url().should('contain', '/guide-identification/resultat-final') | ||
cy.getByDataTestid('arm-category').should('contain', 'Catégorie B') | ||
cy.getByDataTestid('return-to-home-end').click() | ||
cy.url().should('contain', '/accueil') | ||
}) | ||
describe("Firearm Identification", () => { | ||
it("should identificate real firearm", () => { | ||
cy.Identification(); | ||
cy.getByDataTestid("select-file").as("fileInput"); | ||
cy.intercept("POST", "/api/upload").as("upload"); | ||
cy.get("@fileInput").selectFile("./cypress/images/pistolet-semi-auto.jpg", { | ||
force: true, | ||
}); | ||
cy.wait("@upload").then(({ response }) => { | ||
expect(response.statusCode).to.eq(200); | ||
}); | ||
cy.getByDataTestid("next-step").click(); | ||
cy.IdentificationPistoletSemiAuto(); | ||
cy.url().should("contain", "/guide-identification/resultat-final"); | ||
cy.getByDataTestid("arm-category").should("contain", "Catégorie B"); | ||
cy.getByDataTestid("return-to-home-end").click(); | ||
cy.url().should("contain", "/accueil"); | ||
}); | ||
|
||
it('should identificate dummy firearm', () => { | ||
cy.Identification() | ||
cy.getByDataTestid('select-file').as('fileInput') | ||
cy.intercept('POST', '/api/upload').as('upload') | ||
cy.get('@fileInput').selectFile('./cypress/images/pistolet-semi-auto.jpg', { force: true }) | ||
cy.wait('@upload').then(({ response }) => { | ||
expect(response.statusCode).to.eq(200) | ||
}) | ||
cy.getByDataTestid('next-step').click() | ||
cy.IdentificationDummyPistolet() | ||
cy.getByDataTestid('return-to-home-end').click() | ||
cy.url().should('contain', '/accueil') | ||
}) | ||
}) | ||
it("should identificate dummy firearm", () => { | ||
cy.Identification(); | ||
cy.getByDataTestid("select-file").as("fileInput"); | ||
cy.intercept("POST", "/api/upload").as("upload"); | ||
cy.get("@fileInput").selectFile("./cypress/images/pistolet-semi-auto.jpg", { | ||
force: true, | ||
}); | ||
cy.wait("@upload").then(({ response }) => { | ||
expect(response.statusCode).to.eq(200); | ||
}); | ||
cy.getByDataTestid("next-step").click(); | ||
cy.IdentificationDummyPistolet(); | ||
cy.getByDataTestid("return-to-home-end").click(); | ||
cy.url().should("contain", "/accueil"); | ||
}); | ||
}); |
Oops, something went wrong.