Cmcmahon has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/167869

Change subject: [BrowserTest] create simple test for Basic Citation
......................................................................

[BrowserTest] create simple test for Basic Citation

We can make this more sophisticated later, but right now it
accurately checks that upon clicking Basic citation, the user
sees a true VisualEditor UI

Change-Id: Icea910e2bc1bbd4277a7e8eee08f2b0e49661062
---
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/support/pages/visual_editor_page.rb
3 files changed, 18 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/69/167869/1

diff --git a/modules/ve-mw/tests/browser/features/cite.feature 
b/modules/ve-mw/tests/browser/features/cite.feature
index 41e27bd..4f0fe81 100644
--- a/modules/ve-mw/tests/browser/features/cite.feature
+++ b/modules/ve-mw/tests/browser/features/cite.feature
@@ -71,4 +71,8 @@
     And I click Insert Citation
     And I click Save page
     And I click Links Review your changes
-  Then diff view should show the Journal citation added
\ No newline at end of file
+  Then diff view should show the Journal citation added
+
+  Scenario: Basic
+    When I click Basic
+    Then I should see the VisualEditor interface
\ No newline at end of file
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 6cbc199..6ada173 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,3 +1,12 @@
+When(/^I click Basic$/) do
+  on(VisualEditorPage).cite_basic_reference_element.when_present.click
+end
+
+Then(/^I should see the VisualEditor interface$/) do
+  expect(on(VisualEditorPage).cite_visualeditor_user_interface_element).to 
be_visible
+end
+
+
 Given(/^I click the Cite button$/) do
   on(VisualEditorPage).cite_button_element.when_present.click
 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 c5348ba..d4deabb 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
@@ -3,6 +3,9 @@
 
   include URL
   page_url 
URL.url("User:#{ENV['MEDIAWIKI_USER']}/#{ENV['BROWSER']}?vehidebetadialog=true&veaction=edit")
+
+  span(:cite_basic_reference, css: ".oo-ui-icon-reference")
+  #span(:cite_basic_reference, text: "Basic")
   span(:bullet_number_selector, class: "oo-ui-iconElement-icon 
oo-ui-icon-bullet-list")
   span(:cite_button, text: "Cite")
   div(:cite_select, css: "div.oo-ui-widget:nth-child(5) > div:nth-child(2)")
@@ -95,6 +98,7 @@
   div(:language_notification, class: "tipsy-inner")
 
   in_iframe(index: 0) do |frame|
+    div(:cite_visualeditor_user_interface, css: ".ve-ui-surfaceWidget", frame: 
frame)
     a(:beta_warning, title: "Close", frame: frame)
     a(:cite_add_more_information_button, css: ".ve-ui-mwParameterPage-more a", 
index: 7, frame: frame)
     a(:book_add_more_information_button, css: ".ve-ui-mwParameterPage-more a", 
index: 7, frame: frame)

-- 
To view, visit https://gerrit.wikimedia.org/r/167869
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icea910e2bc1bbd4277a7e8eee08f2b0e49661062
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

Reply via email to