Skip to content

Commit

Permalink
fix(candidate): missing stub query activeFeaturesForConnectedUser in …
Browse files Browse the repository at this point in the history
…e2e tests
  • Loading branch information
ThomasDos committed Dec 6, 2024
1 parent a626520 commit 7975479
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { stubMutation, stubQuery } from "../../utils/graphql";

context("Accompagnement autonome - Dossier de faisabilité", () => {
beforeEach(() => {
cy.intercept("POST", "/api/graphql", (req) => {
stubQuery(req, "activeFeaturesForConnectedUser", "features.json");
});
});

it("should show an active and editable feasibility element in the timeline when the type_accompagnement is autonome and the candidacy status is 'PROJECT'", function () {
cy.fixture("candidate1-certification-titre-2-selected.json").then(
(candidate) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { stubMutation, stubQuery } from "../../utils/graphql";

context("Accompagnement autonome - Dossier de validation", () => {
beforeEach(() => {
cy.intercept("POST", "/api/graphql", (req) => {
stubQuery(req, "activeFeaturesForConnectedUser", "features.json");
});
});

context("Inactive dossier de validation", () => {
it("should show an inactive dossier de validation element in the timeline when the type_accompagnement is autonome and the candidacy status is 'PROJECT'", function () {
cy.fixture("candidate1-certification-titre-2-selected.json").then(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { stubMutation, stubQuery } from "../../utils/graphql";

context("Type accompagnement", () => {
beforeEach(() => {
cy.intercept("POST", "/api/graphql", (req) => {
stubQuery(req, "activeFeaturesForConnectedUser", "features.json");
});
});

it("should show the type accompagnement in the timeline when the type_accompagnement is accompagne and the feature is active", function () {
cy.intercept("POST", "/api/graphql", (req) => {
stubMutation(req, "candidate_login", "candidate_login.json");
Expand Down

0 comments on commit 7975479

Please sign in to comment.