From bddacfd5d7873bee9aa8f31154db410772e1bf11 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 ++- filter/displayh5p/tests/behat/h5p_filter.feature | 9 ++++++--- mod/assign/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 ++ repository/contentbank/tests/behat/file_update.feature | 4 ++++ .../contentbank/tests/behat/select_content.feature | 2 ++ 9 files changed, 24 insertions(+), 8 deletions(-) diff --git a/customfield/field/textarea/tests/behat/default_value.feature b/customfield/field/textarea/tests/behat/default_value.feature index 44004d00814..a8d2732cd99 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/filter/displayh5p/tests/behat/h5p_filter.feature b/filter/displayh5p/tests/behat/h5p_filter.feature index 40f768b34f5..2ed17d7518a 100644 --- a/filter/displayh5p/tests/behat/h5p_filter.feature +++ b/filter/displayh5p/tests/behat/h5p_filter.feature @@ -49,7 +49,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 @@ -83,7 +84,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 @@ -107,7 +109,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 diff --git a/mod/assign/tests/behat/edit_previous_feedback.feature b/mod/assign/tests/behat/edit_previous_feedback.feature index 1166fb82b0d..341d3889995 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 56887dc1b7f..8eade73c62f 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 ee45b3ec372..48a7767c892 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 d8218f3d0f5..11c81a83d03 100644 --- a/mod/quiz/tests/behat/manually_mark_question.feature +++ b/mod/quiz/tests/behat/manually_mark_question.feature @@ -55,7 +55,8 @@ Feature: Teachers can override the grade for any question # This time is same as time the window is open. So wait for it to close before proceeding. And I wait "2" seconds - @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 177c1caad29..ff42e043d91 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 c2c6c12674a..8237030c8e8 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" @@ -56,6 +58,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 4c1d6278f5a..52b8f22bcc2 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 a new discussion topic" "link"