From 2ed920e7749760619fe4d08e67fa6b3e01c3b579 Mon Sep 17 00:00:00 2001 From: Daniel Thies Date: Sun, 16 Aug 2015 15:10:02 -0500 Subject: [PATCH] MDL-46387 editor_atto: Add behat test for sub/sup --- .../subscript/tests/behat/subscript.feature | 17 +++++++++++++++++ .../superscript/tests/behat/superscript.feature | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/lib/editor/atto/plugins/subscript/tests/behat/subscript.feature b/lib/editor/atto/plugins/subscript/tests/behat/subscript.feature index 3ecd8e7ed7d..9569b07569a 100644 --- a/lib/editor/atto/plugins/subscript/tests/behat/subscript.feature +++ b/lib/editor/atto/plugins/subscript/tests/behat/subscript.feature @@ -19,3 +19,20 @@ Feature: Atto subscript button And I follow "Edit profile" Then I should see "Submarine" + @javascript + Scenario: Subscript some text in enclosed in superscript + Given I log in as "admin" + And I follow "Profile" in the user menu + And I follow "Edit profile" + And I set the field "Description" to "Submarine" + And I select the text in the "Description" Atto editor + And I click on "Show more buttons" "button" + When I click on "Subscript" "button" + And I press "Update profile" + And I follow "Preferences" in the user menu + And I follow "Editor preferences" + And I set the field "Text editor" to "Plain text area" + And I press "Save changes" + And I follow "Edit profile" + Then I should see "Submarine" + diff --git a/lib/editor/atto/plugins/superscript/tests/behat/superscript.feature b/lib/editor/atto/plugins/superscript/tests/behat/superscript.feature index 350b11d6f47..72ce449397a 100644 --- a/lib/editor/atto/plugins/superscript/tests/behat/superscript.feature +++ b/lib/editor/atto/plugins/superscript/tests/behat/superscript.feature @@ -19,3 +19,20 @@ Feature: Atto superscript button And I follow "Edit profile" Then I should see "Helicopter" + @javascript + Scenario: Superscript some text that is enclosed in subscript + Given I log in as "admin" + And I follow "Profile" in the user menu + And I follow "Edit profile" + And I set the field "Description" to "Helicopter" + And I select the text in the "Description" Atto editor + And I click on "Show more buttons" "button" + When I click on "Superscript" "button" + And I press "Update profile" + And I follow "Preferences" in the user menu + And I follow "Editor preferences" + And I set the field "Text editor" to "Plain text area" + And I press "Save changes" + And I follow "Edit profile" + Then I should see "Helicopter" +