jenkins-bot has submitted this change and it was merged.

Change subject: [Browser tests] Sort all the elements for Links tests to proper 
iframes
......................................................................


[Browser tests] Sort all the elements for Links tests to proper iframes

Change-Id: I873cfaccf7211f379eadc6574edbe8de8c2e15f1
---
M 
modules/ve-mw/test/browser/features/step_definitions/visual_editor_links_steps.rb
M modules/ve-mw/test/browser/features/support/pages/visual_editor_page.rb
M modules/ve-mw/test/browser/features/visual_editor_links.feature
3 files changed, 19 insertions(+), 11 deletions(-)

Approvals:
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/modules/ve-mw/test/browser/features/step_definitions/visual_editor_links_steps.rb
 
b/modules/ve-mw/test/browser/features/step_definitions/visual_editor_links_steps.rb
index 08822fa..e095611 100644
--- 
a/modules/ve-mw/test/browser/features/step_definitions/visual_editor_links_steps.rb
+++ 
b/modules/ve-mw/test/browser/features/step_definitions/visual_editor_links_steps.rb
@@ -11,15 +11,15 @@
 end
 
 When(/^I click < to close Link User Interface$/) do
-  on(VisualEditorPage).leftarrowclose
+  on(VisualEditorPage).leftarrowclose_element.when_present.click
 end
 
 Then(/^an external link appears in the diff view$/) do
   on(VisualEditorPage) do |page|
     page.wait_until(10) do
-      page.diff_view.include? 'example.com'
+      page.links_diff_view.include? 'example.com'
     end
-    page.diff_view.should match Regexp.escape('[http://www.example.com 
Editing] ')
+    page.links_diff_view.should match Regexp.escape('[http://www.example.com 
Editing] ')
   end
 end
 
@@ -30,9 +30,9 @@
 Then(/^an internal link appears in the diff view$/) do
   on(VisualEditorPage) do |page|
     page.wait_until(10) do
-      page.diff_view.include? 'Main Page'
+      page.links_diff_view.include? 'Main Page'
     end
-    page.diff_view.should match Regexp.escape('[[Main Page|Editing]]')
+    page.links_diff_view.should match Regexp.escape('[[Main Page|Editing]]')
   end
 end
 
@@ -43,9 +43,9 @@
 Then(/^a non\-existing link appears in the diff view$/) do
   on(VisualEditorPage) do |page|
     page.wait_until(10) do
-      page.diff_view.include? 'DoesNotExist'
+      page.links_diff_view.include? 'DoesNotExist'
     end
-    page.diff_view.should match Regexp.escape('[[DoesNotExist|Editing]]')
+    page.links_diff_view.should match Regexp.escape('[[DoesNotExist|Editing]]')
   end
 end
 
@@ -55,3 +55,8 @@
     page.link_textfield_element.send_keys(content)
   end
 end
+
+When(/^I click Links Review your changes$/) do
+  on(VisualEditorPage).links_review_changes_element.when_present.click
+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 f6eef73..5c1c56f 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
@@ -45,7 +45,6 @@
     a(:ex, title: 'Close', frame: frame)
     span(:heading, text: 'Heading')
     div(:insert_reference, text: 'Insert reference', frame: frame)
-    a(:leftarrowclose, class: 've-ui-widget ve-ui-iconButtonWidget 
ve-ui-icon-previous ve-ui-inspector-closeButton', frame: frame)
     text_field(:link_textfield, index: 0, frame: frame)
     span(:paragraph, text: 'Paragraph')
     span(:preformatted, text: 'Preformatted')
@@ -63,6 +62,7 @@
     div(:ve_link_ui, class: 've-ui-window-head', frame: frame)
     div(:uparrow, class:'ve-init-mw-viewPageTarget-saveDialog-closeButton')
     span(:ve_heading_ui, text: 'Paragraph')
+    a(:leftarrowclose, title: 'Close', frame: frame)
   end
 
   in_frame(:index => 1) do |frame|
@@ -70,6 +70,9 @@
     div(:ref_body, class:'ve-ui-window-head', frame: frame)
     div(:content_box, class: 've-ce-documentNode ve-ce-branchNode', frame: 
frame)
     div(:insert_reference, text: 'Insert reference', frame: frame)
+    span(:links_review_changes, class: 've-ui-labeledElement-label', text: 
'Review your changes', frame: frame)
+    div(:links_diff_view, class: 've-ui-mwSaveDialog-viewer', frame: frame)
+
   end
 
   in_frame(:index => 2) do |frame|
diff --git a/modules/ve-mw/test/browser/features/visual_editor_links.feature 
b/modules/ve-mw/test/browser/features/visual_editor_links.feature
index bea6c4f..94120df 100644
--- a/modules/ve-mw/test/browser/features/visual_editor_links.feature
+++ b/modules/ve-mw/test/browser/features/visual_editor_links.feature
@@ -13,7 +13,7 @@
     And I click the blue text
     And I click < to close Link User Interface
     And I click Save page
-    And I click Review your changes
+    And I click Links Review your changes
   Then an external link appears in the diff view
 
   Scenario: Enter internal link
@@ -22,7 +22,7 @@
     And I click the blue text for Matching Page
     And I click < to close Link User Interface
     And I click Save page
-    And I click Review your changes
+    And I click Links Review your changes
   Then an internal link appears in the diff view
 
   Scenario: Enter non-existing link
@@ -31,5 +31,5 @@
     And I click the blue text for New Page
     And I click < to close Link User Interface
     And I click Save page
-    And I click Review your changes
+    And I click Links Review your changes
     Then a non-existing link appears in the diff view

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I873cfaccf7211f379eadc6574edbe8de8c2e15f1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <cmcma...@wikimedia.org>
Gerrit-Reviewer: Cmcmahon <cmcma...@wikimedia.org>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to