Skip to content

Commit e5ff6aa

Browse files
committed
test(e2e): dossier et fichiers renommés pour mieux correspondre à la fonctionnalité des interactions de base
1 parent 6c4265f commit e5ff6aa

5 files changed

Lines changed: 42 additions & 43 deletions

File tree

features/conversation/click_on_choice_options_buttons.feature renamed to features/basic_interactions/click_on_choice_options_buttons.feature

File renamed without changes.

features/conversation/control_the_typewriter_effect.feature renamed to features/basic_interactions/type_enter_to_stop_the_typewriter_effect.feature

File renamed without changes.

features/conversation/ask_questions_in_natural_language.feature renamed to features/basic_interactions/use_input_to_ask_a_question_to_the_chatbot.feature

File renamed without changes.

tests/e2e/step_definitions/conversation.js renamed to tests/e2e/step_definitions/basic_interactions.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,45 @@ Then(
5050
}
5151
},
5252
);
53+
54+
When(
55+
"Je clique sur un bouton d'option de choix après le message initial",
56+
() => {
57+
I.pressKey("Enter");
58+
I.waitForElement(".messageOptions li:first-child a", 0.5);
59+
I.click(".messageOptions li:first-child a");
60+
},
61+
);
62+
63+
Then("Le chatbot répond en fonction de l'option choisie", () => {
64+
I.pressKey("Enter");
65+
I.waitForText("On peut imaginer de nombreux usages", 10);
66+
});
67+
68+
When("Je clique sur une suite d'options de choix", () => {
69+
I.pressKey("Enter");
70+
I.waitForElement(".message .messageOptions li:first-child a", 3);
71+
I.click(".message .messageOptions li:first-child a");
72+
I.pressKey("Enter");
73+
74+
I.waitForElement(
75+
".message:nth-of-type(3) .messageOptions li:nth-child(2) a",
76+
3,
77+
);
78+
I.click(".message:nth-of-type(3) .messageOptions li:nth-child(2) a");
79+
I.pressKey("Enter");
80+
81+
I.waitForElement(
82+
".message:nth-of-type(5) .messageOptions li:nth-child(3) a",
83+
3,
84+
);
85+
I.click(".message:nth-of-type(5) .messageOptions li:nth-child(3) a");
86+
I.pressKey("Enter");
87+
});
88+
89+
Then("Le chatbot répond en fonction de la suite d'options choisies", () => {
90+
I.waitForText(
91+
"Dans la conclusion, le but est simplement de retracer le cheminement parcouru.",
92+
10,
93+
);
94+
});

tests/e2e/step_definitions/clicks.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)