-
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.
feat: ✨ add dummy identification for lever rifle and semi-automatic o…
…r automatic long gun
- Loading branch information
Showing
12 changed files
with
147 additions
and
19 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
describe("Shotgun identification", () => { | ||
it("should identificate real shotgun", () => { | ||
cy.IdentificationShotgun("Cartouches"); | ||
cy.url().should("contain", "/guide-identification/resultat-final"); | ||
cy.getByDataTestid("arm-category").should("contain", "Catégorie B ou C"); | ||
cy.getByDataTestid("return-to-home-end").click(); | ||
cy.url().should("contain", "/accueil"); | ||
}); | ||
|
||
it("should identificate dummy shotgun", () => { | ||
cy.IdentificationShotgun("Billes"); | ||
cy.url().should("contain", "/guide-identification/resultat-final"); | ||
cy.getByDataTestid("arm-category").should( | ||
"contain", | ||
"Catégorie Non Classée", | ||
); | ||
cy.getByDataTestid("return-to-home-end").click(); | ||
cy.url().should("contain", "/accueil"); | ||
}); | ||
}); |
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,27 @@ | ||
describe("Shotgun securing", () => { | ||
it("should secure and identificate real shotgun", () => { | ||
cy.miseEnSecurite(); | ||
cy.getByDataTestid("select-file").as("fileInput"); | ||
cy.intercept("POST", "/api/upload").as("upload"); | ||
cy.get("@fileInput").selectFile("./cypress/images/fusil-a-pompe.jpg", { | ||
force: true, | ||
}); | ||
cy.wait("@upload").then(({ response }) => { | ||
expect(response.statusCode).to.eq(200); | ||
}); | ||
cy.url().should("contain", "/mise-en-securite-tutoriel"); | ||
cy.getVideo(); | ||
cy.contains("h1", "Mettre en sécurité mon arme"); | ||
cy.contains("li", "Si la pompe est bloquée"); | ||
cy.getByDataTestid("button-next").click(); | ||
cy.contains("h1", "Fin de la mise en sécurité"); | ||
cy.getByDataTestid("go-to-identification").click(); | ||
cy.url().should("contain", "/carte-manquante"); | ||
cy.getByDataTestid("button-next").click(); | ||
cy.IdentificationRealShotgun(); | ||
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"); | ||
}); | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Binary file added
BIN
+25.9 KB
...ts/guide-identification/photos/epaule_a_pompe/epaule_a_pompe_chargeur_bille.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.7 KB
...ide-identification/photos/epaule_a_pompe/epaule_a_pompe_chargeur_cartouche.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
14 changes: 14 additions & 0 deletions
14
frontend/src/utils/firearms-utils/epaule-semi-auto-militaire-milieu-20e.ts
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,9 +1,23 @@ | ||
import semiAutoMilitaireCartridges from "@/assets/guide-identification/photos/semi_auto_militaire_autre/semi_automatique_militaire_autre_chargeur_cartouche.jpg"; | ||
import semiAutoMilitaireBalls from "@/assets/guide-identification/photos/semi_auto_militaire_autre/semi_automatique_militaire_autre_chargeur_billes.jpg"; | ||
/* | ||
Armes d’épaule semi-automatiques ou automatiques type militaire milieu 20e | ||
*/ | ||
export const epaule_semi_auto_style_militaire_milieu_20e = { | ||
displayLabel: "Arme d’épaule semi-automatique ou automatique", | ||
getCategory: () => "A ou B", | ||
dummyOptions: [ | ||
{ | ||
label: "Cartouches", | ||
value: "cartouches", | ||
img_ammo: semiAutoMilitaireCartridges, | ||
}, | ||
{ | ||
label: "Billes", | ||
value: "billes", | ||
img_ammo: semiAutoMilitaireBalls, | ||
}, | ||
], | ||
getDisclaimer: () => | ||
"<strong>Catégorie A</strong> si à l'origine l’arme était à <strong>répétition automatique</strong> puis a été <strong>transformée</strong> en arme <strong>semi automatique</strong>, ou si l’arme possède <strong>une crosse rétractable / pliable</strong> et qu’en configuration la plus courte elle <strong>mesure moins de 60 cm</strong>.", | ||
} as const; |
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
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