Skip to content

Commit

Permalink
test(e2e): add campaign-features fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelB committed Oct 7, 2024
1 parent c556833 commit 01f3d3b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
14 changes: 14 additions & 0 deletions high-level-tests/e2e/cypress/fixtures/campaign-features.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"id": 1,
"campaignId": 1,
"featureId": 1,
"params": { "label": "Surnom", "type": "STRING" }
},
{
"id": 2,
"campaignId": 4,
"featureId": 1,
"params": { "label": "Surnom", "type": "STRING" }
}
]
6 changes: 2 additions & 4 deletions high-level-tests/e2e/cypress/fixtures/campaigns.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"organizationId": 1,
"creatorId": 1,
"ownerId": 1,
"targetProfileId": 1,
"idPixLabel": "Surnom"
"targetProfileId": 1
},
{
"id": 2,
Expand Down Expand Up @@ -37,8 +36,7 @@
"type": "PROFILES_COLLECTION",
"organizationId": 1,
"creatorId": 1,
"ownerId": 1,
"idPixLabel": "Surnom"
"ownerId": 1
},
{
"id": 5,
Expand Down
7 changes: 7 additions & 0 deletions high-level-tests/e2e/cypress/fixtures/features.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"id": 1,
"key": "EXTERNAL_ID",
"description": "Permet d'activer la saisie d'un identifiant externe lors de la participation à une campagne"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Given("les données de test sont chargées", () => {
cy.task("db:fixture", "target-profile-trainings");
cy.task("db:fixture", "training-triggers");
cy.task("db:fixture", "training-trigger-tubes");
cy.task("db:fixture", "features");
cy.task("db:fixture", "campaign-features");
});

Given("tous les comptes sont créés", () => {
Expand Down Expand Up @@ -98,8 +100,7 @@ Then(`je vois {string} comme {string}`, (value, label) => {
.within(() => cy.contains(value));
});

Then('la page devrait être accessible', function() {
Then("la page devrait être accessible", function () {
cy.injectAxe();
cy.checkA11yAndShowViolations({});
});

0 comments on commit 01f3d3b

Please sign in to comment.