From bad720a1128c375e59612fc6c4fea7e14f722e05 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Thu, 1 Aug 2024 13:18:48 +0100 Subject: [PATCH] MDL-82669 editor: remove reliance on Atto editor in Behat scenarios. --- .../tests/behat/delete_license.feature | 4 +-- .../tests/behat/edit_fields_settings.feature | 1 - .../behat/inline_editing_content.feature | 32 +++++++++---------- h5p/tests/behat/h5p_overview.feature | 2 +- .../tests/behat/online_submissions.feature | 2 -- mod/data/tests/behat/add_entries.feature | 8 ++--- .../behat/h5p_inline_editing_content.feature | 14 ++++---- 7 files changed, 30 insertions(+), 33 deletions(-) diff --git a/admin/tool/licensemanager/tests/behat/delete_license.feature b/admin/tool/licensemanager/tests/behat/delete_license.feature index 15faea8a0db..7a0fa4d7563 100644 --- a/admin/tool/licensemanager/tests/behat/delete_license.feature +++ b/admin/tool/licensemanager/tests/behat/delete_license.feature @@ -37,8 +37,8 @@ Feature: Delete custom licenses | Licence version | ##1 March 2019## | And I press "Save changes" And I follow "Private files" in the user menu - And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager - And I click on "moodle-logo.png" "link" + And I upload "lib/tests/fixtures/gd-logo.png" file to "Files" filemanager + And I click on "gd-logo.png" "link" And I set the field "Choose licence" to "Test licence" And I press "Update" And I press "Save changes" diff --git a/customfield/tests/behat/edit_fields_settings.feature b/customfield/tests/behat/edit_fields_settings.feature index 8d01ec6681d..2cbbb732b91 100644 --- a/customfield/tests/behat/edit_fields_settings.feature +++ b/customfield/tests/behat/edit_fields_settings.feature @@ -1,4 +1,3 @@ -# This feature has Atto-specific steps. See MDL-75913 for further details. @core @core_course @core_customfield @javascript Feature: Teachers can edit course custom fields In order to have additional data on the course diff --git a/filter/displayh5p/tests/behat/inline_editing_content.feature b/filter/displayh5p/tests/behat/inline_editing_content.feature index 9406d4a368a..76a15f0192a 100644 --- a/filter/displayh5p/tests/behat/inline_editing_content.feature +++ b/filter/displayh5p/tests/behat/inline_editing_content.feature @@ -1,4 +1,4 @@ -@editor @editor_atto @atto @atto_h5p @filter @filter_displayh5p @core_h5p @_switch_iframe +@editor @filter @filter_displayh5p @core_h5p @_switch_iframe Feature: Inline editing H5P content anywhere In order to edit an existing H5P content As a user @@ -42,13 +42,13 @@ Feature: Inline editing H5P content anywhere # Add H5P content to the page. And I am on the "PageName1" "page activity" page logged in as "teacher1" And I navigate to "Settings" in current page administration - And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element" - And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue" + And I click on "Configure H5P content" "button" in the "#fitem_id_page" "css_element" + And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue" And I select "Private files" repository in file picker And I click on "greeting-card.h5p" "file" in repository content area And I click on "Link to the file" "radio" And I click on "Select this file" "button" - And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue" + And I click on "Insert H5P" "button" in the "Insert H5P content" "dialogue" And I click on "Save and display" "button" And I switch to "h5p-iframe" class iframe And I switch to "h5p-iframe" class iframe @@ -86,13 +86,13 @@ Feature: Inline editing H5P content anywhere # Add H5P content to the page. And I am on the "PageName1" "page activity" page And I navigate to "Settings" in current page administration - And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element" - And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue" + And I click on "Configure H5P content" "button" in the "#fitem_id_page" "css_element" + And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue" And I select "Content bank" repository in file picker And I click on "Greeting card" "file" in repository content area And I click on "Link to the file" "radio" And I click on "Select this file" "button" - And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue" + And I click on "Insert H5P" "button" in the "Insert H5P content" "dialogue" And I click on "Save and display" "button" And I switch to "h5p-iframe" class iframe And I switch to "h5p-iframe" class iframe @@ -130,13 +130,13 @@ Feature: Inline editing H5P content anywhere # Add H5P content to the page. And I am on the "PageName1" "page activity" page And I navigate to "Settings" in current page administration - And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element" - And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue" + And I click on "Configure H5P content" "button" in the "#fitem_id_page" "css_element" + And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue" And I select "Content bank" repository in file picker And I click on "Greeting card" "file" in repository content area And I click on "Make a copy of the file" "radio" And I click on "Select this file" "button" - And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue" + And I click on "Insert H5P" "button" in the "Insert H5P content" "dialogue" And I click on "Save and display" "button" And I switch to "h5p-iframe" class iframe And I switch to "h5p-iframe" class iframe @@ -176,9 +176,9 @@ Feature: Inline editing H5P content anywhere # Add H5P content to the page. And I am on the "PageName1" "page activity" page And I navigate to "Settings" in current page administration - And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element" - And I set the field with xpath "//input[@data-region='h5pfile']" to "https://moodle.h5p.com/content/1290772960722742119" - And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue" + And I click on "Configure H5P content" "button" in the "#fitem_id_page" "css_element" + And I set the field "H5P URL or file upload" to "https://moodle.h5p.com/content/1290772960722742119" + And I click on "Insert H5P" "button" in the "Insert H5P content" "dialogue" And I click on "Save and display" "button" And ".h5p-placeholder" "css_element" should exist And I switch to "h5pcontent" iframe @@ -219,13 +219,13 @@ Feature: Inline editing H5P content anywhere | Text block title | H5PTest | | Content | - | And I configure the "H5PTest" block - And I click on "Insert H5P" "button" in the "//div[contains(@id,'fitem_id_config_text')]" "xpath_element" - And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue" + And I click on "Configure H5P content" "button" in the "//div[contains(@id,'fitem_id_config_text')]" "xpath_element" + And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue" And I select "Content bank" repository in file picker And I click on "Greeting card" "file" in repository content area And I click on "Make a copy of the file" "radio" And I click on "Select this file" "button" - And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue" + And I click on "Insert H5P" "button" in the "Insert H5P content" "dialogue" And I click on "Save changes" "button" in the "Configure H5PTest block" "dialogue" And I switch to "h5p-iframe" class iframe And I switch to "h5p-iframe" class iframe diff --git a/h5p/tests/behat/h5p_overview.feature b/h5p/tests/behat/h5p_overview.feature index 5d42da7f3d4..90abd4a7d64 100644 --- a/h5p/tests/behat/h5p_overview.feature +++ b/h5p/tests/behat/h5p_overview.feature @@ -23,7 +23,7 @@ Feature: Check H5P tools information is correct And I should see "Disable" in the "H5P scheduled task" "table_row" @javascript - Scenario: H5P atto button. + Scenario: H5P editor button. Given I log in as "admin" When I navigate to "H5P > H5P overview" in site administration Then I should see "Enable" in the "Insert H5P button" "table_row" diff --git a/mod/assign/tests/behat/online_submissions.feature b/mod/assign/tests/behat/online_submissions.feature index dc8da5395cf..03288613fa7 100644 --- a/mod/assign/tests/behat/online_submissions.feature +++ b/mod/assign/tests/behat/online_submissions.feature @@ -60,8 +60,6 @@ Feature: In an assignment, students can add and edit text online | user | course | role | | teacher1 | C1 | editingteacher | | student1 | C1 | student | - And the following config values are set as admin: - | autosavefrequency | 1 | editor_atto | And the following "activity" exists: | activity | assign | | course | C1 | diff --git a/mod/data/tests/behat/add_entries.feature b/mod/data/tests/behat/add_entries.feature index 1db88be3aff..266a1e69921 100644 --- a/mod/data/tests/behat/add_entries.feature +++ b/mod/data/tests/behat/add_entries.feature @@ -66,8 +66,8 @@ Feature: Users can add entries to database activities And I should see "Student second entry" And I should see "Student third entry" - @javascript @editor @editor_atto @atto @atto_h5p - Scenario: If a new text area entry is added, the filepicker is displayed in the H5P Atto button + @javascript + Scenario: If a new text area entry is added, the filepicker is displayed in the H5P editor dialogue Given the following "mod_data > fields" exist: | database | type | name | | data1 | textarea | Textarea field name | @@ -81,8 +81,8 @@ Feature: Users can add entries to database activities And I am on the "Course 1" course page logged in as teacher1 When I click on "Test database name" "link" And I click on "Add entry" "button" - And I click on "Insert H5P" "button" - Then I should see "Browse repositories..." + And I click on "Configure H5P content" "button" + Then I should see "Browse repositories..." in the "Insert H5P content" "dialogue" @javascript Scenario: If maximum number of entries is set other than None then add entries should be seen only if number of entries is less than it diff --git a/mod/forum/tests/behat/h5p_inline_editing_content.feature b/mod/forum/tests/behat/h5p_inline_editing_content.feature index 69728bc3328..76299cde349 100644 --- a/mod/forum/tests/behat/h5p_inline_editing_content.feature +++ b/mod/forum/tests/behat/h5p_inline_editing_content.feature @@ -1,4 +1,4 @@ -@mod @mod_forum @editor @editor_atto @atto @atto_h5p @filter @filter_displayh5p @core_h5p @_file_upload @_switch_iframe +@mod @mod_forum @filter @filter_displayh5p @core_h5p @_file_upload @_switch_iframe Feature: Inline editing H5P content in mod_forum In order to edit an existing H5P content As a user @@ -35,13 +35,13 @@ Feature: Inline editing H5P content in mod_forum Scenario: Edit H5P content from a forum intro using copy to content bank file Given I am on the "ForumName1" "forum activity editing" page logged in as admin # Add H5P content to the forum description. - And I click on "Insert H5P" "button" in the "#fitem_id_introeditor" "css_element" - And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue" + And I click on "Configure H5P content" "button" in the "#fitem_id_introeditor" "css_element" + And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue" And I select "Content bank" repository in file picker And I click on "Greeting card" "file" in repository content area And I click on "Make a copy of the file" "radio" And I click on "Select this file" "button" - And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue" + And I click on "Insert H5P" "button" in the "Insert H5P content" "dialogue" And I click on "Save and display" "button" And I switch to "h5p-iframe" class iframe And I switch to "h5p-iframe" class iframe @@ -82,12 +82,12 @@ Feature: Inline editing H5P content in mod_forum # Add H5P content to a forum post as admin. And I set the following fields to these values: | Subject | Forum post by admin | - And I click on "Insert H5P" "button" in the "#fitem_id_message" "css_element" - And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue" + And I click on "Configure H5P content" "button" in the "#fitem_id_message" "css_element" + And I click on "Browse repositories..." "button" in the "Insert H5P content" "dialogue" And I select "Content bank" repository in file picker And I click on "Greeting card" "file" in repository content area And I click on "Select this file" "button" - And I click on "Insert H5P" "button" in the "Insert H5P" "dialogue" + And I click on "Insert H5P" "button" in the "Insert H5P content" "dialogue" And I press "Save changes" And I switch to "h5p-iframe" class iframe And I switch to "h5p-iframe" class iframe