From 420daee3916ecb03bbb59be4c5516e83c9024f1c Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Mon, 26 Nov 2018 11:40:00 +0800 Subject: [PATCH] MDL-64200 atto_media: Improve behat test By setting the window size before the modal dialogs are opened, we will get consistent behaviour when interacting with the modal. --- lib/editor/atto/plugins/media/tests/behat/media.feature | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/editor/atto/plugins/media/tests/behat/media.feature b/lib/editor/atto/plugins/media/tests/behat/media.feature index d6e42d30d56..5d59641dc79 100644 --- a/lib/editor/atto/plugins/media/tests/behat/media.feature +++ b/lib/editor/atto/plugins/media/tests/behat/media.feature @@ -4,6 +4,7 @@ Feature: Add media to Atto Background: Given I log in as "admin" + And I change window size to "large" And I follow "Manage private files..." And I upload "lib/editor/atto/tests/fixtures/moodle-logo.webm" file to "Files" filemanager And I upload "lib/editor/atto/tests/fixtures/moodle-logo.mp4" file to "Files" filemanager @@ -58,7 +59,6 @@ Feature: Add media to Atto And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" And I click on "moodle-logo.png" "link" And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" - And I change window size to "large" And I set the field with xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_width_entry ')]" to "420" And I set the field with xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_height_entry ')]" to "69" And I click on "Display options" "link" @@ -83,7 +83,6 @@ Feature: Add media to Atto @javascript Scenario: Insert some media as a video with tracks Given I click on "Video" "link" - And I change window size to "large" And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source" "css_element" And I click on "Private files" "link" in the ".fp-repo-area" "css_element" And I click on "moodle-logo.webm" "link"