diff --git a/src/CoreBundle/Resources/views/Chat/chat.html.twig b/src/CoreBundle/Resources/views/Chat/chat.html.twig index 866cd7cabc1..6548dcccb1e 100644 --- a/src/CoreBundle/Resources/views/Chat/chat.html.twig +++ b/src/CoreBundle/Resources/views/Chat/chat.html.twig @@ -283,6 +283,9 @@ const isMe = (user.id === myUserId); const dotCls = user.isConnected ? 'bg-emerald-500' : 'bg-gray-300'; const btnTitle = user.isConnected ? T.startChat : T.leaveMessage; + // Build a safe id from the complete_name + const rawName = user.complete_name || ''; + const nameNormalized = rawName.replace(/\s+/g, '_') return `
${user.username ? escapeHTML(user.username) : ' '}
${!isMe ? ` - ` : ''} diff --git a/tests/behat/features/adminFillCourses.feature b/tests/behat/features/adminFillCourses.feature new file mode 100644 index 00000000000..509e6238758 --- /dev/null +++ b/tests/behat/features/adminFillCourses.feature @@ -0,0 +1,15 @@ +Feature: Admin fill courses and subscribe users + + Background: + Given I am logged as "admin" + + Scenario: Admin fills courses then subscribes a user to a course with long waits + Given I am on "/main/admin/filler.php?fill=courses" + When wait very long for the page to be loaded + When I am on "/main/admin/subscribe_user2course.php" + And wait very long for the page to be loaded + And I select "ywarnier" from "UserList[]" + And I select "(SOLARSYSTEM) Our solar system" from "CourseList[]" + When I click the "button.btn--primary" element + When wait very long for the page to be loaded + Then I should see "The selected users are subscribed to the selected course" diff --git a/tests/behat/features/toolChat.feature b/tests/behat/features/toolChat.feature new file mode 100644 index 00000000000..fecb238fce2 --- /dev/null +++ b/tests/behat/features/toolChat.feature @@ -0,0 +1,43 @@ +Feature: Chat tool + In order to communicate with other users + Teachers and students should be able to send public and private chat messages + + + Scenario: Admin sends public and private messages, Andrea checks them + Given I am a platform administrator + And I am on course "TEMP" homepage + And I wait for the page to be loaded + And I zoom out to maximum + Then I follow "Chat" + And wait for the page to be loaded + # Send a public message as admin + Then I fill in the following: + | chat-writer | I am USER1 | + Then I click the "button#chat-send-message" element + And wait for the page to be loaded + + + # Open private chat with Andrea and send a private message + Then I click the "button#andrea_costea_chat" element + And wait for the page to be loaded + Then I fill in the following: + | chat-writer | HelloAndrea | + Then I click the "button#chat-send-message" element + And wait for the page to be loaded + + + Scenario: Now switch to Andrea (student) and verify messages + Given I am a student + And I am on course "TEMP" homepage + And I wait for the page to be loaded + And I zoom out to maximum + Then I follow "Chat" + And wait for the page to be loaded + Then I should see "USER1" + Then I should not see "Hello" + + + # Click on another user (john_doe) and assert a message + Then I click the "button#john_doe_chat" element + And wait for the page to be loaded + Then I should see "Hello" diff --git a/tests/behat/features/toolCoursedescription.feature b/tests/behat/features/toolCoursedescription.feature new file mode 100644 index 00000000000..49494e1f59b --- /dev/null +++ b/tests/behat/features/toolCoursedescription.feature @@ -0,0 +1,34 @@ +@common @tools +Feature: Course description tool + In order to manage the course description + As a course administrator and student + I want to edit and view the course description + + + Background: + Given I am a platform administrator + And I wait for the page to be loaded + + + Scenario: Admin edits the course description and sees the content + Given I am on course "TEMP" homepage + And I wait for the page to be loaded + And I zoom out to maximum + And I follow "Course description" + And I wait for the page to be loaded + And I click the "i.mdi-image-text" element + And I fill in "course_description_title" with "General" + And I fill in editor field "content" with "The surface web, also known as the visible web or indexed web, is the portion of the World Wide Web that is readily accessible to the general public through standard search engines such as Google and Bing, using conventional web browsers like Chrome or Firefox without requiring special software, authentication, or configuration.[1][2] It encompasses publicly available content that is crawled and indexed by search engine algorithms, allowing users to discover and navigate websites via simple URLs and keyword queries." + And I press "course_description_submit" + And I wait for the page to be loaded + Then I should see "surface web" + + + Scenario: Student views the course description + Given I am a student + And I wait for the page to be loaded + Given I am on course "TEMP" homepage + And I wait for the page to be loaded + And I follow "Course description" + And I wait for the page to be loaded + Then I should see "surface web" diff --git a/tests/behat/features/toolDropbox.feature b/tests/behat/features/toolDropbox.feature new file mode 100644 index 00000000000..5b272516b70 --- /dev/null +++ b/tests/behat/features/toolDropbox.feature @@ -0,0 +1,24 @@ +@common @tools +Feature: Dropbox tool + In order to manage files in the course + As a course administrator + I want to open the Dropbox tool and access the upload dialog + + + Background: + Given I am a platform administrator + And I wait for the page to be loaded + + + Scenario: Admin opens Dropbox and sees the upload action + Given I am on course "TEMP" homepage + And I wait for the page to be loaded + And I zoom out to maximum + And I follow "Dropbox" + And I wait for the page to be loaded + Then I should see "Share a new file" + And I click the "i.mdi-upload" element + And I wait for the page to be loaded + Then I should see "Upload" + + diff --git a/tests/behat/features/toolExerciceteatcher.feature b/tests/behat/features/toolExerciceteatcher.feature new file mode 100644 index 00000000000..a735a2b7bb3 --- /dev/null +++ b/tests/behat/features/toolExerciceteatcher.feature @@ -0,0 +1,507 @@ +Feature: Exercise tool + In order to use the exercise tool + The teachers should be able to create exercises + + Background: + Given I am logged as "ywarnier" + And wait very long for the page to be loaded + + + Scenario: Create a question category + Given I am on "/main/exercise/tests_category.php?action=addcategory&cid=1" + And wait very long for the page to be loaded + When I fill in the following: + | category_name | Category 1 | + And I fill in editor field "category_description" with "Category 1 description" + And I press "SubmitNote" + And wait very long for the page to be loaded + Then I should see "Category added" + + Scenario: Create a second question category + Given I am on "/main/exercise/tests_category.php?action=addcategory&cid=1" + And wait very long for the page to be loaded + When I fill in the following: + | category_name | Category 2 | + And I fill in editor field "category_description" with "Category 2 description" + And I press "SubmitNote" + And wait very long for the page to be loaded + Then I should see "Category added" + + Scenario: Create an exercise + Given I am on "/main/exercise/exercise_admin.php?cid=1" + And wait very long for the page to be loaded + And I press advanced settings + When I fill in the following: + | exercise_title | Exercise 1 | + And I press "submitExercise" + And wait very long for the page to be loaded + Then I should see "0 questions" + + Scenario: Edit an exercise + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I wait for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I click the "i.mdi-cog" element + And wait very long for the page to be loaded + And I press "submitExercise" + And wait very long for the page to be loaded + Then I should see "0 questions" + And I should not see an error + + Scenario: Add question "Multiple choice" to exercise created "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Multiple choice" + And wait very long for the page to be loaded + When I fill in the following: + | questionName | Multiple choice | + | weighting[ 1]| 10 | + Then I fill in editor field "answer1" with "Answer true" + Then I fill in editor field "answer2" with "Answer false" + Then I fill in editor field "answer3" with "Answer false" + Then I fill in editor field "answer4" with "Answer false" + + Then I fill in editor field "comment1" with "Comment true" + Then I fill in editor field "comment2" with "Comment false" + Then I fill in editor field "comment3" with "Comment false" + Then I fill in editor field "comment4" with "Comment false" + And I press "submit-question" + And wait very long for the page to be loaded + And I should not see an error + + Scenario: Add question "Multiple answer" to exercise created "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Multiple answer" + And wait very long for the page to be loaded + When I fill in the following: + | questionName | Multiple answers | + | weighting[1] | 10 | + Then I check the "correct[1]" radio button + Then I fill in editor field "answer1" with "Answer true" + Then I fill in editor field "answer2" with "Answer false" + Then I fill in editor field "answer3" with "Answer false" + Then I fill in editor field "answer4" with "Answer false" + + Then I fill in editor field "comment1" with "Comment true" + Then I fill in editor field "comment2" with "Comment false" + Then I fill in editor field "comment3" with "Comment false" + Then I fill in editor field "comment4" with "Comment false" + And I press "submit-question" + And wait very long for the page to be loaded + And I should not see an error + + Scenario: Add question "Fill in blanks" to "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Fill blanks or form" + And wait very long for the page to be loaded + When I fill in the following: + | questionName | Fill blanks | + Then I fill in editor field "answer" with "Romeo and [Juliet] [Hätten||Haetten] [möchte||moechte] [wäre||waere] [können||koennen] [Könnten||Koennten] [Ärger] [voilà] [müssen] [l'été] [cherchent à] [Übung] [Ärger|Möglichkeit]" + And I press "submitQuestion" + And wait very long for the page to be loaded + And I should not see an error + + Scenario: Add question "Matching" to exercise created "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Matching" + And wait very long for the page to be loaded + When I fill in the following: + | questionName | Matching | + And I fill in editor field "answer1" with "Answer A" + And I fill in editor field "answer2" with "Answer B" + And I fill in editor field "option1" with "Option A" + And I fill in editor field "option2" with "Option B" + And I fill in select bootstrap static input "#matches_2" select "2" + And I press "submitQuestion" + And wait very long for the page to be loaded + And I should not see an error + + Scenario: Add question "Open" to exercise created "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Open" + And wait very long for the page to be loaded + When I fill in the following: + | questionName | Open question | + | weighting | 10 | + And I press "submitQuestion" + And wait for the page to be loaded + Then I should see "Item added" + + Scenario: Add question "Oral expression" to exercise created "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Oral expression" + And wait very long for the page to be loaded + When I fill in the following: + | questionName | Oral expression question | + | weighting | 10 | + And I press "submitQuestion" + Then I should not see an error + + Scenario: Add question "Exact answers combination" to exercise created "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Exact Selection" + And wait very long for the page to be loaded + When I fill in the following: + | questionName | Exact answers combination | + Then I check the "correct[1]" radio button + Then I fill in editor field "answer1" with "Answer true" + Then I fill in editor field "answer2" with "Answer false" + Then I fill in editor field "comment1" with "Comment true" + Then I fill in editor field "comment2" with "Comment false" + And I press "submitQuestion" + And wait very long for the page to be loaded + And I should not see an error + + Scenario: Add question "Unique answer with unknown" to exercise created "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Unique answer with unknown" + And wait very long for the page to be loaded + When I fill in the following: + | questionName | Unique answer with unknown | + | weighting[1] | 10 | + Then I check the "correct" radio button + Then I fill in editor field "answer1" with "Answer true" + Then I fill in editor field "answer2" with "Answer false" + Then I fill in editor field "answer3" with "Answer false" + + Then I fill in editor field "comment1" with "Comment true" + Then I fill in editor field "comment2" with "Comment false" + Then I fill in editor field "comment3" with "Comment false" + And I press "submitQuestion" + And wait very long for the page to be loaded + And I should not see an error + + Scenario: Add question "Multiple answer true/false/don't know" to exercise created "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Multiple answer true/false/don't know" + And wait very long for the page to be loaded + When I fill in the following: + | questionName | Multiple answer true - false - dont know | + # radio buttonproblem + Then I check the "correct[1]" radio button + Then I check the "correct[2]" radio button + Then I check the "correct[3]" radio button + Then I check the "correct[4]" radio button + + Then I fill in editor field "answer1" with "Answer true" + Then I fill in editor field "answer2" with "Answer true" + Then I fill in editor field "answer3" with "Answer true" + Then I fill in editor field "answer4" with "Answer true" + + Then I fill in editor field "comment1" with "Comment true" + Then I fill in editor field "comment2" with "Comment true" + Then I fill in editor field "comment3" with "Comment true" + Then I fill in editor field "comment4" with "Comment true" + And I press "submitQuestion" + And wait very long for the page to be loaded + And I should not see an error + + Scenario: Add question "Combination true/false/don't-know" to exercise created "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Combination true/false/don't-know" + And wait very long for the page to be loaded + When I fill in the following: + | questionName | Combination true - false - don't-know | + + Then I check the "correct[1]" radio button + + Then I fill in editor field "answer1" with "Answer true" + Then I fill in editor field "answer2" with "Answer false" + + Then I fill in editor field "comment1" with "Comment true" + Then I fill in editor field "comment2" with "Comment false" + And I press "submitQuestion" + And wait for the page to be loaded + Then I should see "Item added" + + Scenario: Add question "Global multiple answer" to exercise created "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Global multiple answer" + And wait very long for the page to be loaded + When I fill in the following: + | questionName | Global multiple answer | + | weighting[1] | 10 | + + Then I check the "correct[1]" radio button + + Then I fill in editor field "answer1" with "Answer true" + Then I fill in editor field "answer2" with "Answer false" + Then I fill in editor field "answer3" with "Answer false" + Then I fill in editor field "answer4" with "Answer false" + + Then I fill in editor field "comment1" with "Comment true" + Then I fill in editor field "comment2" with "Comment false" + Then I fill in editor field "comment3" with "Comment false" + Then I fill in editor field "comment4" with "Comment false" + + And I press "submitQuestion" + And wait for the page to be loaded + Then I should see "Item added" + + Scenario: Duplicate exercise + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I click the "i.mdi-disc" element + And I confirm the popup + And wait very long for the page to be loaded + Then I should see "copied" + And wait very long for the page to be loaded + And I should see "Exercise 1 - Copy" + + Scenario: Import exercise to test questions categories + Given I am on "/main/exercise/upload_exercise.php?cid=1" + And wait very long for the page to be loaded + And I should see "Import quiz from Excel" + And I attach the file "/tests/fixtures/exercise.xls" to "upload_user_upload_quiz" + When I press "Upload" + And wait for the page to be loaded + Then I should see "Exercise for Behat test" +# + Scenario: Import exercise from excel + Given I am on "/main/exercise/upload_exercise.php?cid=1" + And wait very long for the page to be loaded + Then I should see "Import quiz from Excel" + Then I attach the file "/public/main/exercise/quiz_template.xls" to "upload_user_upload_quiz" + And I press "Upload" + And wait for the page to be loaded + Then I should see "Definition of oligarchy" + + Scenario: Try exercise "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I follow "Start test" + And wait very long for the page to be loaded + # Question 1 + Then I should see "Multiple choice" + And I check the "Answer true" radio button + Then I press "Next question" + And wait for the page to be loaded + # Question 2 + And I check the "Answer true" radio button + Then I press "Next question" + And wait for the page to be loaded + # Question 3 + Then I fill in the following: + | choice_id_3_0 | Juliet | + | choice_id_3_1 | Hätten | + | choice_id_3_2 | möchte | + | choice_id_3_3 | wäre | + | choice_id_3_4 | können | + | choice_id_3_5 | Könnten | + | choice_id_3_6 | Ärger | + | choice_id_3_7 | voilà | + | choice_id_3_8 | müssen | + | choice_id_3_9 | l'été | + | choice_id_3_10 | cherchent à | + | choice_id_3_11 | Übung | + #Then I fill in select bootstrap static by text "#choice_id_3_12" select "Ärger" + Then I select "Ärger" from "choice_id_3_12" + Then I press "Next question" + And wait for the page to be loaded + # Question 4 - Matching + Then I select "A" from "choice_id_4_1" + Then I select "B" from "choice_id_4_2" + Then I press "Next question" + And wait for the page to be loaded + # Question 5 - Open question + Then wait for the page to be loaded + Then I fill the only ckeditor in the page with "Hello you" + Then I press "Next question" + And wait for the page to be loaded + # Question 6 - Oral question + Then I press "Next question" + And wait for the page to be loaded + # Question 7 - Exact answers combination + Then I check "Answer true" + Then I press "Next question" + And wait for the page to be loaded + # Question 8 - Unique answer with unknown + And I check the "Answer true" radio button + Then I press "Next question" + And wait for the page to be loaded + # Question 9 - Multiple answer true - false - dont know + #@todo + Then I press "Next question" + And wait for the page to be loaded + # Question 10 - Combination true - false - don't-know + #@todo + Then I press "Next question" + And wait for the page to be loaded + # Question 11 - Global multiple answer + Then I check "Answer true" + Then I press "End test" + And wait for the page to be loaded + Then I should see "Hello you" + Then I should see "Score for the test: 83 / 117" + + Scenario: Check exercise result + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Results and feedback" + Then I should see "Learner score" + And wait very long for the page to be loaded + And I check the "semantics" radio button + And I press "Next question" + And wait very long for the page to be loaded + And I check the "RNASL" radio button + And I press "Next question" + And wait very long for the page to be loaded + And I check the "10" radio button + And I press "Next question" + And wait very long for the page to be loaded + And fill in the following: + | choice_id_6_0 | words | + | choice_id_6_1 | fill | + | choice_id_6_2 | blanks | + And I press "Next question" + And wait very long for the page to be loaded + And I select "A" from "choice_id_7_1" + And I select "B" from "choice_id_7_2" + And I select "C" from "choice_id_7_3" + And wait very long for the page to be loaded + And I press "Next question" + And wait very long for the page to be loaded + And I check "1" + And I press "Next question" + And wait very long for the page to be loaded + And I press "End test" + And wait very long for the page to be loaded + And I zoom out to maximum + Then I should see "Score for the test: 190 / 190" + #Y'a pas exactement ce tableau + And I should see the table "#category_results": + | Categoryname2 | 50 / 70 | 71.43% | + | Categoryname1 | 60 / 60 | 100% | + | none | 80 / 60 | 133.33% | + | Total | 190 / 190 | 100% | + + Scenario: Teacher looks at exercise results by categories + Given I am on "/main/index/user_portal.php" + And wait very long for the page to be loaded + And I am on "/sessions" + And wait very long for the page to be loaded + Then I should see "Session Exercise" + And wait very long for the page to be loaded + And I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise for Behat test" + And wait very long for the page to be loaded + And I click the "i.mdi-chart-box" element + And wait very long for the page to be loaded + Then I should see "Learner score" + And wait very long for the page to be loaded + And I click the "i.mdi-checkbox-marked-circle-plus-outline" element + And wait very long for the page to be loaded + Then I should see "Score for the test: 190 / 190" + And I should see the table "#category_results": + | Categories | Absolute score | Relative score | + | Categoryname2 | 50 / 70 | 71.43% | + | Categoryname1 | 60 / 60 | 100% | + | none | 80 / 60 | 133.33% | + | Total | 190 / 190 | 100% | + Scenario: Delete an exercise + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + And I confirm the popup + Then I should not see "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + And I confirm the popup + Then I should not see "Exercise for Behat test" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + And I confirm the popup + Then I should not see "IQ test" + + Scenario: Delete an exercise category + Given I am on "/main/exercise/tests_category.php?cid=1" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + Then I should not see "Category 1" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + Then I should not see "Category 2" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + Then I should not see "Categoryname2" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + Then I should not see "Categoryname1" + + Scenario: Delete session + Given I am on "/main/session/session_list.php?keyword=Session+Exercise" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + And I confirm the popup + And wait for the page to be loaded + Then I should not see "Session Exercise" + + # Scenario: Delete questions (commented) +# Given I am on "/main/exercise/exercise.php?cid=1" +# And wait very long for the page to be loaded +# And I click the "i.mdi-database" element diff --git a/tests/behat/features/toolExercise.feature b/tests/behat/features/toolExerciseAdmin.feature similarity index 58% rename from tests/behat/features/toolExercise.feature rename to tests/behat/features/toolExerciseAdmin.feature index 7cbd8cda582..6de540cd913 100644 --- a/tests/behat/features/toolExercise.feature +++ b/tests/behat/features/toolExerciseAdmin.feature @@ -4,55 +4,66 @@ Feature: Exercise tool Background: Given I am a platform administrator - And I am on course "TEMP" homepage + And wait very long for the page to be loaded + Scenario: Create a question category Given I am on "/main/exercise/tests_category.php?action=addcategory&cid=1" - And wait for the page to be loaded + And wait very long for the page to be loaded When I fill in the following: | category_name | Category 1 | And I fill in editor field "category_description" with "Category 1 description" And I press "SubmitNote" - And wait for the page to be loaded + And wait very long for the page to be loaded Then I should see "Category added" Scenario: Create a second question category Given I am on "/main/exercise/tests_category.php?action=addcategory&cid=1" - And wait for the page to be loaded + And wait very long for the page to be loaded When I fill in the following: | category_name | Category 2 | And I fill in editor field "category_description" with "Category 2 description" And I press "SubmitNote" - And wait for the page to be loaded + And wait very long for the page to be loaded Then I should see "Category added" Scenario: Create an exercise Given I am on "/main/exercise/exercise_admin.php?cid=1" + And wait very long for the page to be loaded And I press advanced settings When I fill in the following: | exercise_title | Exercise 1 | - And I fill in editor field "exerciseDescription" with "Exercise description" And I press "submitExercise" - And wait for the page to be loaded - Then I should see "Test added" + And wait very long for the page to be loaded + Then I should see "0 questions" Scenario: Edit an exercise Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I wait for the page to be loaded And I follow "Exercise 1" - And I follow "Edit" - And I follow "Edit test name and settings" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I click the "i.mdi-cog" element + And wait very long for the page to be loaded And I press "submitExercise" - And wait for the page to be loaded - Then I should see "Test name and settings have been saved." + And wait very long for the page to be loaded + Then I should see "0 questions" + And I should not see an error Scenario: Add question "Multiple choice" to exercise created "Exercise 1" Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded And I follow "Exercise 1" - And I follow "Edit" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded And I follow "Multiple choice" + And wait very long for the page to be loaded When I fill in the following: | questionName | Multiple choice | - | weighting[1] | 10 | + | weighting[ 1]| 10 | Then I fill in editor field "answer1" with "Answer true" Then I fill in editor field "answer2" with "Answer false" Then I fill in editor field "answer3" with "Answer false" @@ -63,14 +74,18 @@ Feature: Exercise tool Then I fill in editor field "comment3" with "Comment false" Then I fill in editor field "comment4" with "Comment false" And I press "submit-question" - And wait for the page to be loaded - Then I should see "Item added" + And wait very long for the page to be loaded + And I should not see an error Scenario: Add question "Multiple answer" to exercise created "Exercise 1" Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded And I follow "Exercise 1" - And I follow "Edit" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded And I follow "Multiple answer" + And wait very long for the page to be loaded When I fill in the following: | questionName | Multiple answers | | weighting[1] | 10 | @@ -85,26 +100,34 @@ Feature: Exercise tool Then I fill in editor field "comment3" with "Comment false" Then I fill in editor field "comment4" with "Comment false" And I press "submit-question" - And wait for the page to be loaded - Then I should see "Item added" + And wait very long for the page to be loaded + And I should not see an error Scenario: Add question "Fill in blanks" to "Exercise 1" Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded And I follow "Exercise 1" - And I follow "Edit" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded And I follow "Fill blanks or form" + And wait very long for the page to be loaded When I fill in the following: | questionName | Fill blanks | Then I fill in editor field "answer" with "Romeo and [Juliet] [Hätten||Haetten] [möchte||moechte] [wäre||waere] [können||koennen] [Könnten||Koennten] [Ärger] [voilà] [müssen] [l'été] [cherchent à] [Übung] [Ärger|Möglichkeit]" And I press "submitQuestion" - And wait for the page to be loaded - Then I should see "Item added" + And wait very long for the page to be loaded + And I should not see an error Scenario: Add question "Matching" to exercise created "Exercise 1" Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded And I follow "Exercise 1" - And I follow "Edit" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded And I follow "Matching" + And wait very long for the page to be loaded When I fill in the following: | questionName | Matching | And I fill in editor field "answer1" with "Answer A" @@ -113,14 +136,18 @@ Feature: Exercise tool And I fill in editor field "option2" with "Option B" And I fill in select bootstrap static input "#matches_2" select "2" And I press "submitQuestion" - And wait for the page to be loaded - Then I should see "Item added" + And wait very long for the page to be loaded + And I should not see an error - Scenario: Add question "Open" to exercise created "Exercise 1" + Scenario: Add question "Open" to exercise created "Exercise 1" Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded And I follow "Exercise 1" - And I follow "Edit" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded And I follow "Open" + And wait very long for the page to be loaded When I fill in the following: | questionName | Open question | | weighting | 10 | @@ -128,22 +155,30 @@ Feature: Exercise tool And wait for the page to be loaded Then I should see "Item added" -# Scenario: Add question "Oral expression" to exercise created "Exercise 1" -# Given I am on "/main/exercise/exercise.php?cid=1" -# And I follow "Exercise 1" -# And I follow "Edit" -# And I follow "Oral expression" -# When I fill in the following: -# | questionName | Oral expression question | -# | weighting | 10 | -# And I press "submitQuestion" -# Then I should see "Item added" + Scenario: Add question "Oral expression" to exercise created "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Oral expression" + And wait very long for the page to be loaded + When I fill in the following: + | questionName | Oral expression question | + | weighting | 10 | + And I press "submitQuestion" + Then I should not see an error Scenario: Add question "Exact answers combination" to exercise created "Exercise 1" Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded And I follow "Exercise 1" - And I follow "Edit" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded And I follow "Exact Selection" + And wait very long for the page to be loaded When I fill in the following: | questionName | Exact answers combination | Then I check the "correct[1]" radio button @@ -152,37 +187,45 @@ Feature: Exercise tool Then I fill in editor field "comment1" with "Comment true" Then I fill in editor field "comment2" with "Comment false" And I press "submitQuestion" - And wait for the page to be loaded - Then I should see "Item added" + And wait very long for the page to be loaded + And I should not see an error + + Scenario: Add question "Unique answer with unknown" to exercise created "Exercise 1" + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I follow "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded + And I follow "Unique answer with unknown" + And wait very long for the page to be loaded + When I fill in the following: + | questionName | Unique answer with unknown | + | weighting[1] | 10 | + Then I check the "correct" radio button + Then I fill in editor field "answer1" with "Answer true" + Then I fill in editor field "answer2" with "Answer false" + Then I fill in editor field "answer3" with "Answer false" - Scenario: Add question "Unique answer with unknown" to exercise created "Exercise 1" - Given I am on "/main/exercise/exercise.php?cid=1" - And I follow "Exercise 1" - And I follow "Edit" - And I follow "Unique answer with unknown" - When I fill in the following: - | questionName | Unique answer with unknown | - | weighting[1] | 10 | - Then I check the "correct" radio button - Then I fill in editor field "answer1" with "Answer true" - Then I fill in editor field "answer2" with "Answer false" - Then I fill in editor field "answer3" with "Answer false" - - Then I fill in editor field "comment1" with "Comment true" - Then I fill in editor field "comment2" with "Comment false" - Then I fill in editor field "comment3" with "Comment false" - And I press "submitQuestion" - And wait for the page to be loaded - Then I should see "Item added" + Then I fill in editor field "comment1" with "Comment true" + Then I fill in editor field "comment2" with "Comment false" + Then I fill in editor field "comment3" with "Comment false" + And I press "submitQuestion" + And wait very long for the page to be loaded + And I should not see an error Scenario: Add question "Multiple answer true/false/don't know" to exercise created "Exercise 1" Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded And I follow "Exercise 1" - And I follow "Edit" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded And I follow "Multiple answer true/false/don't know" + And wait very long for the page to be loaded When I fill in the following: | questionName | Multiple answer true - false - dont know | - + # radio buttonproblem Then I check the "correct[1]" radio button Then I check the "correct[2]" radio button Then I check the "correct[3]" radio button @@ -198,14 +241,18 @@ Feature: Exercise tool Then I fill in editor field "comment3" with "Comment true" Then I fill in editor field "comment4" with "Comment true" And I press "submitQuestion" - And wait for the page to be loaded - Then I should see "Item added" + And wait very long for the page to be loaded + And I should not see an error Scenario: Add question "Combination true/false/don't-know" to exercise created "Exercise 1" Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded And I follow "Exercise 1" - And I follow "Edit" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded And I follow "Combination true/false/don't-know" + And wait very long for the page to be loaded When I fill in the following: | questionName | Combination true - false - don't-know | @@ -222,9 +269,13 @@ Feature: Exercise tool Scenario: Add question "Global multiple answer" to exercise created "Exercise 1" Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded And I follow "Exercise 1" - And I follow "Edit" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded And I follow "Global multiple answer" + And wait very long for the page to be loaded When I fill in the following: | questionName | Global multiple answer | | weighting[1] | 10 | @@ -247,33 +298,39 @@ Feature: Exercise tool Scenario: Duplicate exercise Given I am on "/main/exercise/exercise.php?cid=1" - And I follow "Copy this exercise as a new one" + And wait very long for the page to be loaded + And I click the "i.mdi-disc" element And I confirm the popup And wait very long for the page to be loaded Then I should see "copied" - And wait for the page to be loaded + And wait very long for the page to be loaded And I should see "Exercise 1 - Copy" -# Scenario: Import exercise to test questions categories -# Given I am on "/main/exercise/upload_exercise.php?cid=1" -# And I should see "Import quiz from Excel" -# And I attach the file "/tests/fixtures/exercise.xls" to "user_upload_quiz" -# When I press "Upload" -# And wait for the page to be loaded -# Then I should see "Exercise for Behat test" + Scenario: Import exercise to test questions categories + Given I am on "/main/exercise/upload_exercise.php?cid=1" + And wait very long for the page to be loaded + And I should see "Import quiz from Excel" + And I attach the file "/tests/fixtures/exercise.xls" to "upload_user_upload_quiz" + When I press "Upload" + And wait for the page to be loaded + Then I should see "Exercise for Behat test" # -# Scenario: Import exercise from excel -# Given I am on "/main/exercise/upload_exercise.php?cid=1" -# Then I should see "Import quiz from Excel" -# Then I attach the file "/public/main/exercise/quiz_template.xls" to "user_upload_quiz" -# And I press "Upload" -# And wait for the page to be loaded -# Then I should see "Definition of oligarchy" + Scenario: Import exercise from excel + Given I am on "/main/exercise/upload_exercise.php?cid=1" + And wait very long for the page to be loaded + Then I should see "Import quiz from Excel" + Then I attach the file "/public/main/exercise/quiz_template.xls" to "upload_user_upload_quiz" + And I press "Upload" + And wait for the page to be loaded + Then I should see "Definition of oligarchy" Scenario: Try exercise "Exercise 1" Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded And I follow "Exercise 1" + And wait very long for the page to be loaded And I follow "Start test" + And wait very long for the page to be loaded # Question 1 Then I should see "Multiple choice" And I check the "Answer true" radio button @@ -339,86 +396,44 @@ Feature: Exercise tool Scenario: Check exercise result Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded And I follow "Exercise 1" - And I follow "Edit" + And wait very long for the page to be loaded + And I click the "i.mdi-pencil" element + And wait very long for the page to be loaded And I follow "Results and feedback" Then I should see "Learner score" And wait very long for the page to be loaded - And I follow "Grade activity" - Then I should see "Score for the test: 83 / 117" - And I press "Edit individual feedback and grade the open question" - And I should see "Assign a grade" - And I fill the only ckeditor in the page with "open question teacher answer" - And I fill in select "select[name=marks]" with option value "10" with class ".grade_select" - Then I press "Correct test" - And wait very long for the page to be loaded - And I follow "Edit" - Then I should see "open question teacher answer" - And I should see "Score for the test: 93 / 117" - - Scenario: Create a session "Session Exercise" and add user "acostea" - Given I am on "/main/session/session_add.php" - When I fill in the following: - | name | Session Exercise | - And I fill in select2 input "#coach_username" with id "1" and value "admin" - And I press "submit" - Then wait for the page to be loaded - Then I should see "Add courses to this session (Session Exercise)" - Then I select "TEMP (TEMP)" from "NoSessionCoursesList[]" - And I press "add_course" - And I press "next" - Then I should see "Update successful" - Then I follow "Multiple registration" - Then I select "Costea Andrea (acostea)" from "nosessionUsersList[]" - And I press "add_user" - And I press "next" - Then I should see "Update successful" - - Scenario: Try exercise with categorized questions as student - Given I am not logged - And I am a student - And I am on course "TEMP" homepage in session "Session Exercise" - Then I should see "TEMP (Session Exercise)" - And I am on "/main/exercise/exercise.php?cid=1" - And I follow "Exercise for Behat test" - And I follow "Start test" - When wait for the page to be loaded - And I press "Next question" - And wait for the page to be loaded - And I check "oligarchy" - And I check "oligopoly" - And I check "timocracy" - And I check "autocracy" - And I press "Next question" - And wait for the page to be loaded And I check the "semantics" radio button And I press "Next question" - And wait for the page to be loaded + And wait very long for the page to be loaded And I check the "RNASL" radio button And I press "Next question" - And wait for the page to be loaded + And wait very long for the page to be loaded And I check the "10" radio button And I press "Next question" - And wait for the page to be loaded + And wait very long for the page to be loaded And fill in the following: | choice_id_6_0 | words | | choice_id_6_1 | fill | | choice_id_6_2 | blanks | And I press "Next question" - And wait for the page to be loaded + And wait very long for the page to be loaded And I select "A" from "choice_id_7_1" And I select "B" from "choice_id_7_2" And I select "C" from "choice_id_7_3" + And wait very long for the page to be loaded And I press "Next question" - And wait for the page to be loaded + And wait very long for the page to be loaded And I check "1" And I press "Next question" - And wait for the page to be loaded + And wait very long for the page to be loaded And I press "End test" - And wait for the page to be loaded + And wait very long for the page to be loaded + And I zoom out to maximum Then I should see "Score for the test: 190 / 190" + #Y'a pas exactement ce tableau And I should see the table "#category_results": - | Categories | Absolute score | Relative score | | Categoryname2 | 50 / 70 | 71.43% | | Categoryname1 | 60 / 60 | 100% | | none | 80 / 60 | 133.33% | @@ -426,14 +441,21 @@ Feature: Exercise tool Scenario: Teacher looks at exercise results by categories Given I am on "/main/index/user_portal.php" - And I am on course "TEMP" homepage in session "Session Exercise" - Then I should see "TEMP (Session Exercise)" + And wait very long for the page to be loaded + And I am on "/sessions" + And wait very long for the page to be loaded + Then I should see "Session Exercise" + And wait very long for the page to be loaded And I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded And I follow "Exercise for Behat test" - And I follow "Results and feedback" + And wait very long for the page to be loaded + And I click the "i.mdi-chart-box" element + And wait very long for the page to be loaded Then I should see "Learner score" And wait very long for the page to be loaded - And I follow "Grade activity" + And I click the "i.mdi-checkbox-marked-circle-plus-outline" element + And wait very long for the page to be loaded Then I should see "Score for the test: 190 / 190" And I should see the table "#category_results": | Categories | Absolute score | Relative score | @@ -441,26 +463,45 @@ Feature: Exercise tool | Categoryname1 | 60 / 60 | 100% | | none | 80 / 60 | 133.33% | | Total | 190 / 190 | 100% | + Scenario: Delete an exercise + Given I am on "/main/exercise/exercise.php?cid=1" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + And I confirm the popup + Then I should not see "Exercise 1" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + And I confirm the popup + Then I should not see "Exercise for Behat test" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + And I confirm the popup + Then I should not see "IQ test" -# Scenario: Delete an exercise -# Given I am on "/main/exercise/exercise.php?cid=1" -# And I follow "Delete" -# And I confirm the popup -# Then I should see "The test has been deleted" -# -# Scenario: Delete an exercise category -# Given I am on "/main/exercise/tests_category.php?cid=1" -# And I follow "Delete" -# Then I should see "Category deleted" -# -# Scenario: Delete an exercise category -# Given I am on "/main/exercise/tests_category.php?cid=1" -# And I follow "Delete" -# Then I should see "Category deleted" -# -# Scenario: Delete session -# Given I am on "/main/session/session_list.php?keyword=Session+Exercise" -# And wait for the page to be loaded -# And I follow "Delete" -# And I confirm the popup -# Then I should see "Deleted" + Scenario: Delete an exercise category + Given I am on "/main/exercise/tests_category.php?cid=1" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + Then I should not see "Category 1" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + Then I should not see "Category 2" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + Then I should not see "Categoryname2" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + Then I should not see "Categoryname1" + + Scenario: Delete session + Given I am on "/main/session/session_list.php?keyword=Session+Exercise" + And wait very long for the page to be loaded + And I click the "i.mdi-delete" element + And I confirm the popup + And wait for the page to be loaded + Then I should not see "Session Exercise" + + # Scenario: Delete questions (commented) +# Given I am on "/main/exercise/exercise.php?cid=1" +# And wait very long for the page to be loaded +# And I click the "i.mdi-database" element diff --git a/tests/behat/features/toolNotebook.feature b/tests/behat/features/toolNotebook.feature new file mode 100644 index 00000000000..648bc16a732 --- /dev/null +++ b/tests/behat/features/toolNotebook.feature @@ -0,0 +1,28 @@ +@common @tools +Feature: Notebook tool + In order to keep notes in a course + As a course administrator + I want to create a note and see it listed + + + Background: + Given I am a platform administrator + And I wait for the page to be loaded + + + Scenario: Admin creates a note and sees it + Given I am on course "TEMP" homepage + And I wait for the page to be loaded + And I zoom out to maximum + And I follow "Notebook" + And I wait for the page to be loaded + And I click the "i.mdi-plus-box" element + And wait very long for the page to be loaded + And I fill in the following: + | note_title | My first note | + And I fill in editor field "Note details" with "test" + And I press "note_SubmitNote" + And I wait for the page to be loaded + Then I should see "My first note" + + diff --git a/tests/behat/features/toolPortfolio.feature b/tests/behat/features/toolPortfolio.feature new file mode 100644 index 00000000000..85a2d815789 --- /dev/null +++ b/tests/behat/features/toolPortfolio.feature @@ -0,0 +1,33 @@ +Feature: Portfolio tool + In order to use the portfolio tool + The teachers should be able to create portfolio items and comments + + + Scenario: Create a portfolio item + Given I am a platform administrator + And I am on course "TEMP" homepage + And I wait for the page to be loaded + And I zoom out to maximum + Then I follow "Portfolio" + And wait for the page to be loaded + Then I follow "Add" + And wait for the page to be loaded + Then I fill in the following: + | add_portfolio_title | PF1 | + And I fill in editor field "content" with "Hello" + And I press "add_portfolio_submit" + And wait for the page to be loaded + Then I should see "PF1" + + + # Scenario: Add a new comment (example, commented as requested) + # Given I am a platform administrator + # And I am on course "TEMP" homepage + # And I wait for the page to be loaded + # And I zoom out to maximum + # Then I follow "Portfolio" + # And wait for the page to be loaded + # Then I follow "AddNewComment" + # And wait for the page to be loaded + # # Further steps to fill and submit the comment would go here + # # Then I should see "Your comment text" diff --git a/tests/behat/features/toolReporting.feature b/tests/behat/features/toolReporting.feature new file mode 100644 index 00000000000..dc017986324 --- /dev/null +++ b/tests/behat/features/toolReporting.feature @@ -0,0 +1,55 @@ +@common @tools +Feature: Reporting tool + In order to check reporting pages + As a course administrator + I want to open each reporting link and ensure the pages load correctly + + + Background: + Given I am a platform administrator + And I wait for the page to be loaded + + + Scenario: Admin navigates reporting pages and checks them + Given I am on course "TEMP" homepage + And I wait for the page to be loaded + And I zoom out to maximum + And I follow "Reporting" + And I wait for the page to be loaded + Then I should see "Andrea Costea" + + + # Group reporting + And I follow "Group reporting" + And I wait for the page to be loaded + Then I should not see an error + + + # Report on resources + And I follow "Report on resources" + And I wait for the page to be loaded + Then I should not see an error + + + # Course report + And I follow "Course report" + And I wait for the page to be loaded + Then I should not see an error + + + # Exam tracking + And I follow "Exam tracking" + And I wait for the page to be loaded + Then I should not see an error + + + # Audit report + And I follow "Audit report" + And I wait for the page to be loaded + Then I should not see an error + + + # Learning paths generic stats + And I follow "Learning paths generic stats" + And I wait for the page to be loaded + Then I should not see an error diff --git a/tests/behat/features/toolUsers.feature b/tests/behat/features/toolUsers.feature new file mode 100644 index 00000000000..0d16d29fe58 --- /dev/null +++ b/tests/behat/features/toolUsers.feature @@ -0,0 +1,44 @@ +@common @tools +Feature: Users tool + In order to manage course users + As a course administrator + I want to search for users and unsubscribe them + + + Background: + Given I am a platform administrator + And I wait for the page to be loaded + + + Scenario: Admin searches for 'amann' and unsubscribes the user + Given I am on course "TEMP" homepage + And I wait for the page to be loaded + And I follow "Users" + And I wait for the page to be loaded + And I click the "i.mdi-account-plus" element + And I fill in the following: + | search_user_keyword | amann | + And I click the "em.mdi-magnify" element + And I click the "a.btn-small" element + And I wait for the page to be loaded + Then I should see "amann" + And I follow "Unsubscribe" + And I confirm the popup + + + Scenario: Admin uses a specific tab then searches for 'ywarnier' and unsubscribes + Given I am on course "TEMP" homepage + And I wait for the page to be loaded + And I follow "Users" + And I wait for the page to be loaded + And I click the "a#tabs_69662037e3281-1" element + And I wait for the page to be loaded + And I click the "i.mdi-account-plus" element + And I fill in the following: + | search_user_keyword | ywarnier | + And I click the "em.mdi-magnify" element + And I click the "a.btn-small" element + And I wait for the page to be loaded + Then I should see "ywarnier" + And I follow "Unsubscribe" + And I confirm the popup diff --git a/tests/behat/features/toolWiki.feature b/tests/behat/features/toolWiki.feature new file mode 100644 index 00000000000..a7d79851ccc --- /dev/null +++ b/tests/behat/features/toolWiki.feature @@ -0,0 +1,24 @@ +@common @tools +Feature: Wiki tool + In order to edit a wiki in a course + As a course administrator + I want to edit the wiki content and see it listed + + + Background: + Given I am a platform administrator + And I wait for the page to be loaded + + + Scenario: Admin edits a wiki and sees the new content + Given I am on course "TEMP" homepage + And I wait for the page to be loaded + And I zoom out to maximum + And I follow "Wiki" + And I wait for the page to be loaded + And I click the "i.mdi-pencil" element + And I wait for the page to be loaded + And I fill in editor field "content" with "New Wiki" + And I press "wiki_SaveWikiChange" + And I wait for the page to be loaded + Then I should see "New Wiki"