From a91499c9f1f84f58123d1a1e5d11a12df9207dd4 Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Wed, 24 Aug 2022 08:46:01 +0800 Subject: [PATCH] MDL-75922 behat: Apply @editor_atto tag to tests requiring Atto These steps are currently using Atto-specific UI features and must therefore make use of the @editor_atto tag to ensure that they continue to run using Atto. A new issue will be raised to migrate each of these to be editor-agnostic. --- .../field/textarea/tests/behat/default_value.feature | 3 ++- customfield/tests/behat/edit_fields_settings.feature | 3 ++- filter/displayh5p/tests/behat/h5p_filter.feature | 12 ++++++++---- .../tests/behat/edit_previous_feedback.feature | 3 ++- mod/lesson/tests/behat/duplicate_lesson_page.feature | 3 ++- mod/lesson/tests/behat/questions_images.feature | 3 ++- mod/quiz/tests/behat/manually_mark_question.feature | 3 ++- mod/workshop/tests/behat/embedded_images.feature | 2 ++ .../contentbank/tests/behat/file_update.feature | 4 ++++ .../contentbank/tests/behat/select_content.feature | 2 ++ 10 files changed, 28 insertions(+), 10 deletions(-) diff --git a/customfield/field/textarea/tests/behat/default_value.feature b/customfield/field/textarea/tests/behat/default_value.feature index 113ace626fb..d10b5e2cee8 100644 --- a/customfield/field/textarea/tests/behat/default_value.feature +++ b/customfield/field/textarea/tests/behat/default_value.feature @@ -1,4 +1,5 @@ -@customfield @customfield_textarea @javascript @_file_upload +# This feature has Atto-specific steps. See MDL-75913 for further details. +@customfield @customfield_textarea @javascript @_file_upload @editor_atto Feature: Default value for the textarea custom field can contain images In order to see images on custom fields As a manager diff --git a/customfield/tests/behat/edit_fields_settings.feature b/customfield/tests/behat/edit_fields_settings.feature index 90c9a32219b..5854bd6b040 100644 --- a/customfield/tests/behat/edit_fields_settings.feature +++ b/customfield/tests/behat/edit_fields_settings.feature @@ -1,4 +1,5 @@ -@core @core_course @core_customfield @javascript +# This feature has Atto-specific steps. See MDL-75913 for further details. +@core @core_course @core_customfield @javascript @editor_atto Feature: Teachers can edit course custom fields In order to have additional data on the course As a teacher diff --git a/filter/displayh5p/tests/behat/h5p_filter.feature b/filter/displayh5p/tests/behat/h5p_filter.feature index a5757150bde..842d2dc7f8e 100644 --- a/filter/displayh5p/tests/behat/h5p_filter.feature +++ b/filter/displayh5p/tests/behat/h5p_filter.feature @@ -52,7 +52,8 @@ Feature: Render H5P content using filters And I wait until the page is ready Then ".h5p-iframe" "css_element" should not exist - @javascript + # This scenario has Atto-specific steps. See MDL-75913 for further details. + @javascript @editor_atto Scenario: Render a local H5P file as admin Given I log in as "admin" And I am on "Course 1" course homepage with editing mode on @@ -86,7 +87,8 @@ Feature: Render H5P content using filters And I should not see "you don't have access" And I should see "Lorum ipsum" - @javascript + # This scenario has Atto-specific steps. See MDL-75913 for further details. + @javascript @editor_atto Scenario: Render a local H5P file as teacher Given I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on @@ -110,7 +112,8 @@ Feature: Render H5P content using filters Then I should see "Note that the libraries may exist in the file you uploaded, but you're not allowed to upload new libraries." And I should see "missing-required-library" - @javascript + # This scenario has Atto-specific steps. See MDL-75913 for further details. + @javascript @editor_atto Scenario: Render a local H5P file with existing libraries Given I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on @@ -168,7 +171,8 @@ Feature: Render H5P content using filters Then I should not see "missing-required-library" And I should see "Lorum ipsum" - @javascript + # This scenario has Atto-specific steps. See MDL-75913 for further details. + @javascript @editor_atto Scenario: Render local H5P file with a disabled main library Given I log in as "admin" # Upload H5P file to private files. diff --git a/mod/assign/tests/behat/edit_previous_feedback.feature b/mod/assign/tests/behat/edit_previous_feedback.feature index 22c91280439..8ca7b49efeb 100644 --- a/mod/assign/tests/behat/edit_previous_feedback.feature +++ b/mod/assign/tests/behat/edit_previous_feedback.feature @@ -4,7 +4,8 @@ Feature: In an assignment, teachers can edit feedback for a students previous su As a teacher I need to be able to edit the feedback for a students previous submission attempt. - @javascript + # This scenario has Atto-specific steps. See MDL-75913 for further details. + @javascript @editor_atto Scenario: Edit feedback for a students previous attempt. Given the following "courses" exist: | fullname | shortname | category | groupmode | diff --git a/mod/lesson/tests/behat/duplicate_lesson_page.feature b/mod/lesson/tests/behat/duplicate_lesson_page.feature index 4990ae94a3e..df2501c0a88 100644 --- a/mod/lesson/tests/behat/duplicate_lesson_page.feature +++ b/mod/lesson/tests/behat/duplicate_lesson_page.feature @@ -1,4 +1,5 @@ -@mod @mod_lesson +# This feature has Atto-specific steps. See MDL-75913 for further details. +@mod @mod_lesson @editor_atto Feature: In a lesson activity, a teacher can duplicate a lesson page In order to duplicate a lesson page As a teacher diff --git a/mod/lesson/tests/behat/questions_images.feature b/mod/lesson/tests/behat/questions_images.feature index a236153454f..ee9b7eace23 100644 --- a/mod/lesson/tests/behat/questions_images.feature +++ b/mod/lesson/tests/behat/questions_images.feature @@ -3,7 +3,8 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ As a teacher I need to add questions with images in answers and responses - @javascript @_file_upload + # This scenario has Atto-specific steps. See MDL-75913 for further details. + @javascript @_file_upload @editor_atto Scenario: questions with images in answers and responses Given the following "users" exist: | username | firstname | lastname | email | diff --git a/mod/quiz/tests/behat/manually_mark_question.feature b/mod/quiz/tests/behat/manually_mark_question.feature index a8b27930165..2a7ed44c575 100644 --- a/mod/quiz/tests/behat/manually_mark_question.feature +++ b/mod/quiz/tests/behat/manually_mark_question.feature @@ -56,7 +56,8 @@ Feature: Teachers can override the grade for any question And I switch to "commentquestion" window And I should see "Teacher 1" in the "Manually graded 10 with comment: " "table_row" - @javascript @_switch_window @_file_upload @_bug_phantomjs + # This scenario has Atto-specific steps. See MDL-75913 for further details. + @javascript @_switch_window @_file_upload @_bug_phantomjs @editor_atto Scenario: Comment on a response to an essay question attempt. When I log in as "teacher1" And I follow "Manage private files" diff --git a/mod/workshop/tests/behat/embedded_images.feature b/mod/workshop/tests/behat/embedded_images.feature index d4595b97d58..0506e26d1d6 100644 --- a/mod/workshop/tests/behat/embedded_images.feature +++ b/mod/workshop/tests/behat/embedded_images.feature @@ -4,6 +4,8 @@ Feature: Teachers can embed images into instructions and conclusion fields As a teacher I need to be able to embed images into the fields and they should display correctly + # This scenario has Atto-specific steps. See MDL-75913 for further details. + @editor_atto Scenario: Embedding the image into the instructions and conclusions fields Given the following "users" exist: | username | firstname | lastname | email | diff --git a/repository/contentbank/tests/behat/file_update.feature b/repository/contentbank/tests/behat/file_update.feature index f1a6fa6607b..4a4a38f0077 100644 --- a/repository/contentbank/tests/behat/file_update.feature +++ b/repository/contentbank/tests/behat/file_update.feature @@ -18,6 +18,8 @@ Feature: Updating a file in the content bank after using in a course | activity | name | intro | introformat | course | content | contentformat | idnumber | | page | PageName1 | PageDesc1 | 1 | C1 | H5Ptest | 1 | 1 | + # This scenario has Atto-specific steps. See MDL-75913 for further details. + @editor_atto Scenario: Referenced files is the default option and updates alias as well Given I am on the PageName1 "Page activity editing" page logged in as admin And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element" @@ -58,6 +60,8 @@ Feature: Updating a file in the content bank after using in a course Then I should see "This is a new text" And I switch to the main frame + # This scenario has Atto-specific steps. See MDL-75913 for further details. + @editor_atto Scenario: Copied files should not be updated if the original is edited Given I am on the PageName1 "Page activity editing" page logged in as admin And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element" diff --git a/repository/contentbank/tests/behat/select_content.feature b/repository/contentbank/tests/behat/select_content.feature index dd322015d16..355f119e3ce 100644 --- a/repository/contentbank/tests/behat/select_content.feature +++ b/repository/contentbank/tests/behat/select_content.feature @@ -128,6 +128,8 @@ Feature: Select content bank files using the content bank files repository Then I should see "1" elements in "Files" filemanager And I should see "filltheblanks.h5p" in the ".fp-content .fp-file" "css_element" + # This scenario has Atto-specific steps. See MDL-75913 for further details. + @editor_atto Scenario: Non-editing teacher can not see the content bank repository Given I am on the Forum "Forum activity" page logged in as teacher2 And I click on "Add discussion topic" "link"