jenkins-bot has submitted this change and it was merged.
Change subject: [BrowserTest] updates for new bullets/indent UI
......................................................................
[BrowserTest] updates for new bullets/indent UI
DONE: bullets test passes in Firefox and Chrome
DONE: indent/outdent test passes in Firefox and Chrome
TODO: instead of sleep do wait_until for the iframe
Change-Id: Ibcda64dc2457648abf3d5c6bc226b5cc628c0c45
---
M modules/ve-mw/test/browser/features/step_definitions/bullets_steps.rb
M modules/ve-mw/test/browser/features/support/pages/visual_editor_page.rb
2 files changed, 31 insertions(+), 14 deletions(-)
Approvals:
Cmcmahon: Looks good to me, approved
jenkins-bot: Verified
diff --git
a/modules/ve-mw/test/browser/features/step_definitions/bullets_steps.rb
b/modules/ve-mw/test/browser/features/step_definitions/bullets_steps.rb
index 93e0184..fd367ff 100644
--- a/modules/ve-mw/test/browser/features/step_definitions/bullets_steps.rb
+++ b/modules/ve-mw/test/browser/features/step_definitions/bullets_steps.rb
@@ -19,7 +19,10 @@
end
When(/^I click Numbering$/) do
- on(VisualEditorPage).ve_numbering_element.when_present(15).click
+ on(VisualEditorPage) do |page|
+ page.bullet_number_selector_element.when_present(15).click
+ page.ve_numbering_element.when_present.click
+ end
end
Then(/^a \# is added in front of input string in the diff view$/) do
@@ -32,7 +35,10 @@
end
When(/^I click Bullets$/) do
- on(VisualEditorPage).ve_bullets_element.when_present(15).click
+ on(VisualEditorPage) do |page|
+ page.bullet_number_selector_element.when_present(15).click
+ page.ve_bullets_element.when_present.click
+ end
end
Then(/^a \* is added in front of input string in the diff view$/) do
@@ -45,7 +51,10 @@
end
When(/^I click Increase indentation$/) do
- on(VisualEditorPage).increase_indentation_on_element.when_present(15).click
+ on(VisualEditorPage) do |page|
+ page.bullet_number_selector_element.when_present(15).click
+ page.increase_indentation_element.when_present.click
+ end
end
Then(/^a \#\# is added in front of input string in the diff view$/) do
@@ -68,7 +77,11 @@
When(/^I click Decrease indentation$/) do
- on(VisualEditorPage).decrease_indentation_on_element.when_present(15).click
+ on(VisualEditorPage) do |page|
+ sleep 2 #this is waiting for the Review Your Changes iframe to disappear
+ page.bullet_number_selector_element.when_present(15).click
+ page.decrease_indentation_element.when_present.click
+ end
end
Then(/^nothing is added in front of input string in the diff view$/) do
@@ -81,26 +94,32 @@
end
Then(/^Decrease indentation should be disabled$/) do
- on(VisualEditorPage).decrease_indentation_element.should be_visible
+ on(VisualEditorPage).decrease_indentation_element.should_not be_visible
end
Then(/^Increase indentation should be disabled$/) do
- on(VisualEditorPage).increase_indentation_element.should be_visible
+ on(VisualEditorPage).increase_indentation_element.should_not be_visible
end
Then(/^Decrease indentation should be enabled$/) do
- on(VisualEditorPage).decrease_indentation_on_element.class_name.should_not
match /disabled/
+ on(VisualEditorPage).decrease_indentation_element.class_name.should_not
match /disabled/
end
Then(/^Increase indentation should be enabled$/) do
- on(VisualEditorPage).increase_indentation_on_element.class_name.should_not
match /disabled/
+ on(VisualEditorPage).increase_indentation_element.class_name.should_not
match /disabled/
end
When(/^I undo Bullets$/) do
- on(VisualEditorPage).ve_bullets_element.when_present(15).click
+ on(VisualEditorPage) do |page|
+ page.bullet_number_selector_element.when_present(15).click
+ page.ve_bullets_element.when_present.click
+ end
end
When(/^I undo Numbering$/) do
- on(VisualEditorPage).ve_numbering_element.when_present(15).click
+ on(VisualEditorPage) do |page|
+ page.bullet_number_selector_element.when_present(15).click
+ page.ve_numbering_element.when_present.click
+ end
end
diff --git
a/modules/ve-mw/test/browser/features/support/pages/visual_editor_page.rb
b/modules/ve-mw/test/browser/features/support/pages/visual_editor_page.rb
index 4e793f3..cf55ab2 100644
--- a/modules/ve-mw/test/browser/features/support/pages/visual_editor_page.rb
+++ b/modules/ve-mw/test/browser/features/support/pages/visual_editor_page.rb
@@ -3,17 +3,15 @@
include URL
page_url
URL.url("User:#{ENV['MEDIAWIKI_USER']}/#{ENV['BROWSER']}?vehidebetadialog=true&veaction=edit")
-
+ span(:bullet_number_selector, class: "oo-ui-iconedElement-icon
oo-ui-icon-bullet-list")
div(:container_disabled, class: "oo-ui-widget oo-ui-widget-disabled
oo-ui-flaggableElement-constructive oo-ui-.oo-ui-buttonedElement-framed")
div(:content, class: "ve-ce-branchNode")
span(:decrease_indentation, class: "oo-ui-iconedElement-icon
oo-ui-icon-outdent-list")
- a(:decrease_indentation_on, title: /Decrease indentation/)
span(:downarrow, class: "oo-ui-indicatedElement-indicator
oo-ui-indicator-down")
a(:edit_ve, title: /Edit this page with VisualEditor/)
a(:edit_wikitext, title: /You can edit this page\./)
a(:heading, text: /Heading/)
span(:increase_indentation, class: "oo-ui-iconedElement-icon
oo-ui-icon-indent-list")
- a(:increase_indentation_on, title: /Increase indentation/)
span(:insert_menu, text: "Insert")
div(:insert_references, class: "oo-ui-window-title")
span(:internal_linksuggestion, text: "Main Page")
@@ -42,7 +40,7 @@
end
span(:ve_bold_text, class: "oo-ui-iconedElement-icon oo-ui-icon-bold-b")
- span(:ve_bullets, class: "oo-ui-iconedElement-icon oo-ui-icon-bullet-list")
+ span(:ve_bullets, class: "oo-ui-iconedElement-icon oo-ui-icon-bullet-list",
index: 1)
span(:ve_computer_code, class: "oo-ui-iconedElement-icon oo-ui-icon-code")
div(:ve_heading_menu, class: "oo-ui-iconedElement-icon oo-ui-icon-down")
span(:ve_link_icon, class: "oo-ui-iconedElement-icon oo-ui-icon-link")
--
To view, visit https://gerrit.wikimedia.org/r/136113
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibcda64dc2457648abf3d5c6bc226b5cc628c0c45
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits