Jhall has uploaded a new change for review. https://gerrit.wikimedia.org/r/97144
Change subject: WIP New test for Visual Editor Page Settings (aka Tools) menu ...................................................................... WIP New test for Visual Editor Page Settings (aka Tools) menu Change-Id: Ia30e0e12e01d765443818dd516e0e4ea8fda0b5c --- A modules/ve-mw/test/browser/features/step_definitions/tools_steps.rb M modules/ve-mw/test/browser/features/support/pages/visual_editor_page.rb A modules/ve-mw/test/browser/features/tools.feature 3 files changed, 54 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/44/97144/1 diff --git a/modules/ve-mw/test/browser/features/step_definitions/tools_steps.rb b/modules/ve-mw/test/browser/features/step_definitions/tools_steps.rb new file mode 100644 index 0000000..c257bc6 --- /dev/null +++ b/modules/ve-mw/test/browser/features/step_definitions/tools_steps.rb @@ -0,0 +1,22 @@ +When(/^I click the Page settings menu option$/) do + on(VisualEditorPage) do |page| + page.tools_menu_element.when_present.click + page.tools_page_settings_element.when_present.click + end +end + +And(/^I enter a (.+) category label$/) do |content| + on(VisualEditorPage).add_category_element.when_present.send_keys(content) +end + +When(/^I enter a (.+) sort option label$/) do |content| + on(VisualEditorPage).add_category_sort_element.when_present.send_keys(content) +end + +When(/^I click to confirm the new category$/) do + on(VisualEditorPage).confirm_category_element.when_present.click +end + +When(/^I click the Apply Changes button$/) do + on(VisualEditorPage).apply_changes_element.when_present.click +end \ No newline at end of file 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 e12749c..cd10359 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 @@ -31,6 +31,8 @@ span(:subheading2, text: 'Sub-heading 2') span(:subheading3, text: 'Sub-heading 3') span(:subheading4, text: 'Sub-heading 4') + span(:tools_menu, class: 'oo-ui-iconedElement-icon oo-ui-icon-menu') + span(:tools_page_settings, class: 'oo-ui-iconedElement-icon oo-ui-icon-settings') span(:ve_bullets, class: 'oo-ui-iconedElement-icon oo-ui-icon-bullet-list') 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') @@ -66,9 +68,12 @@ end in_frame(:index => 2) do |frame| + text_field(:add_category, placeholder: 'Add a category', frame: frame) span(:add_parameter, class: 've-ui-mwParameterResultWidget-name', frame: frame) + div(:add_category_sort, class: 'oo-ui-widget oo-ui-inputWidget oo-ui-textInputWidget', frame: frame) span(:add_template, text: 'Add template', frame: frame) span(:apply_changes, text: 'Apply changes', frame: frame) + div(:confirm_category, class: 'oo-ui-optionWidget-icon oo-ui-icon-check', frame: frame) div(:content_box, class: 've-ce-documentNode ve-ce-branchNode', frame: frame) span(:insert_reference, text: 'Insert reference', frame: frame) text_field(:parameter_box, index: 0, frame: frame) diff --git a/modules/ve-mw/test/browser/features/tools.feature b/modules/ve-mw/test/browser/features/tools.feature new file mode 100644 index 0000000..6b5f1fa --- /dev/null +++ b/modules/ve-mw/test/browser/features/tools.feature @@ -0,0 +1,27 @@ +@ie6-bug @ie7-bug @ie8-bug @ie9-bug @ie10-bug @en.wikipedia.beta.wmflabs.org @test2.wikipedia.org @login +Feature: VisualEditor Page Settings (aka Tools) menu + + Background: + Given I am logged in + And I am at my user page + When I click Edit for VisualEditor + And I click the Page settings menu option + + Scenario: VisualEditor create new category + And I enter a Test category label + And I click to confirm the new category + And I click the Apply Changes button + And I click Save page + And I click Review your changes + Then [[Category:Test]] should appear in the diff view + And I can click the X on the save box + + Scenario: VisualEditor create new category with sort + And I enter a Sorted Test category label + And I click to confirm the new category + And I enter a New Sort sort option label + And I click the Apply Changes button + And I click Save page + And I click Review your changes + Then [[Category:Sorted Test]] should appear in the diff view + And I can click the X on the save box -- To view, visit https://gerrit.wikimedia.org/r/97144 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia30e0e12e01d765443818dd516e0e4ea8fda0b5c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jhall <jh...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits