Cmcmahon has uploaded a new change for review.
https://gerrit.wikimedia.org/r/197433
Change subject: [BrowserTest] update Cite test for new UI
......................................................................
[BrowserTest] update Cite test for new UI
* Access to Cite options changed
* Various target locators also changed
Paired with Rummana for these changes.
Change-Id: Ib7c3fbd1842879745d3d3128c66d90cc2b4f98cb
---
M modules/ve-mw/tests/browser/features/cite.feature
M modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb
M modules/ve-mw/tests/browser/features/step_definitions/references_steps.rb
M modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
4 files changed, 7 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/33/197433/1
diff --git a/modules/ve-mw/tests/browser/features/cite.feature
b/modules/ve-mw/tests/browser/features/cite.feature
index e00ce9d..b19e68d 100644
--- a/modules/ve-mw/tests/browser/features/cite.feature
+++ b/modules/ve-mw/tests/browser/features/cite.feature
@@ -4,8 +4,7 @@
Background:
Given I go to the "Cite VisualEditor Test" page with content "Cite
VisualEditor Test"
And I click in the editable part
- And I click the Cite button
- And I can see the Cite User Interface
+ And I open the Cite menu
Scenario: Website
When I click Website
diff --git
a/modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb
b/modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb
index e9a083c..6810d16 100644
--- a/modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb
+++ b/modules/ve-mw/tests/browser/features/step_definitions/cite_steps.rb
@@ -1,5 +1,5 @@
-Given(/^I can see the Cite User Interface$/) do
- on(VisualEditorPage).cite_select_element.when_present
+Given(/^I open the Cite menu$/) do
+ on(VisualEditorPage).cite_menu_element.when_present.click
end
When(/^I click Add more information$/) do
diff --git
a/modules/ve-mw/tests/browser/features/step_definitions/references_steps.rb
b/modules/ve-mw/tests/browser/features/step_definitions/references_steps.rb
index 6296fa1..b934169 100644
--- a/modules/ve-mw/tests/browser/features/step_definitions/references_steps.rb
+++ b/modules/ve-mw/tests/browser/features/step_definitions/references_steps.rb
@@ -33,7 +33,7 @@
end
When(/^I create a reference using existing reference$/) do
- step('I click the Cite button')
+ step('I open the Cite menu')
step('I click use an existing reference button in References User Interface')
step('I click on Extension:VisualEditor reference')
end
diff --git
a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
index ab55703..1e4d6f6 100644
--- a/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
+++ b/modules/ve-mw/tests/browser/features/support/pages/visual_editor_page.rb
@@ -20,22 +20,22 @@
text_area(:cite_eighth_textarea, index: 14)
a(:cite_add_more_information_button, css: '.ve-ui-mwParameterPage-more a',
index: 7)
div(:cite_basic_options_area, class: 'oo-ui-layout oo-ui-iconElement
oo-ui-labelElement oo-ui-fieldsetLayout')
- span(:cite_basic_reference, css: '.oo-ui-icon-reference')
+ span(:cite_basic_reference, css: '.oo-ui-tool-name-reference >
a:nth-child(1) > span:nth-child(1)')
a(:cite_book, css: '.oo-ui-tool-name-cite-book > a:nth-child(1)')
div(:cite_button, class: 've-test-toolbar-cite')
text_field(:cite_custom_field_name, css: '.oo-ui-searchWidget-query >
div:nth-child(1) > input:nth-child(1)')
text_field(:cite_group_name_textarea, css:
'div.oo-ui-indicatorElement:nth-child(1) > input:nth-child(1)')
a(:cite_journal, css: '.oo-ui-tool-name-cite-journal > a:nth-child(1)')
span(:cite_indicator_down, css: '.ve-test-toolbar-cite
.oo-ui-indicator-down')
+ span(:cite_menu, css: '.ve-test-toolbar-cite > span:nth-child(1) >
span:nth-child(3)')
div(:cite_new_field_label, css: '.oo-ui-optionWidget')
text_area(:cite_new_website_field, css: 'div.oo-ui-layout:nth-child(10) >
div:nth-child(3) > div:nth-child(1) > textarea:nth-child(1)')
a(:cite_news, css: '.oo-ui-tool-name-cite-news > a:nth-child(1)')
div(:cite_pull_down, css: '.ve-test-toolbar-cite
.oo-ui-clippableElement-clippable')
span(:cite_reuse_existing_reference, css: '.oo-ui-icon-reference-existing')
- div(:cite_select, css: 'div.oo-ui-widget:nth-child(5) > div:nth-child(2)')
div(:cite_show_more_fields, class:
've-ui-mwMoreParametersResultWidget-label')
div(:cite_ui, class: 'oo-ui-window-frame')
- div(:cite_visualeditor_user_interface, css: '.ve-ui-surfaceWidget')
+ div(:cite_visualeditor_user_interface, css: 'div.ve-ui-surface:nth-child(2)')
span(:cite_website, css: '.oo-ui-icon-ref-cite-web')
span(:confirm_switch, text: 'Keep changes')
span(:confirm_switch_cancel, text: 'Resume editing')
--
To view, visit https://gerrit.wikimedia.org/r/197433
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7c3fbd1842879745d3d3128c66d90cc2b4f98cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits