Cmcmahon has uploaded a new change for review.

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


Change subject: refactor to use Scenario Outline and REUSE_BROWSER env var
......................................................................

refactor to use Scenario Outline and REUSE_BROWSER env var

Change-Id: I65970c0df35bcac48f16899090cadc8df8c560c6
---
M modules/ve-mw/test/browser/features/support/hooks.rb
M modules/ve-mw/test/browser/features/visual_editor_indent_outdent.feature
2 files changed, 29 insertions(+), 31 deletions(-)


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

diff --git a/modules/ve-mw/test/browser/features/support/hooks.rb 
b/modules/ve-mw/test/browser/features/support/hooks.rb
index f59f070..b92b808 100644
--- a/modules/ve-mw/test/browser/features/support/hooks.rb
+++ b/modules/ve-mw/test/browser/features/support/hooks.rb
@@ -1,9 +1,22 @@
 
+#This is for the Headings test
 Before('@edit_user_page') do
-  if !$set_up_edited_page or !(ENV['REUSE_BROWSER'] == 'true')
+  if !$edit_user_page or !(ENV['REUSE_BROWSER'] == 'true')
     step 'I am logged in'
     step 'I am at my user page'
     step 'I edit the page with a string'
-    $set_up_edited_page=true
+    $edit_user_page=true
+  end
+end
+
+#This is for the indent-outdent test
+Before('@make_selectable_line') do
+       if !$make_selectable_line or !(ENV['REUSE_BROWSER'] == 'true')
+         step 'I am logged in'
+      step 'I am at my user page'
+      step 'I click Edit for VisualEditor'
+      step 'I type in an input string'
+      step 'select the string'
+      $make_selectable_line=true
   end
 end
\ No newline at end of file
diff --git 
a/modules/ve-mw/test/browser/features/visual_editor_indent_outdent.feature 
b/modules/ve-mw/test/browser/features/visual_editor_indent_outdent.feature
index 254b5c1..5868d8a 100644
--- a/modules/ve-mw/test/browser/features/visual_editor_indent_outdent.feature
+++ b/modules/ve-mw/test/browser/features/visual_editor_indent_outdent.feature
@@ -1,35 +1,20 @@
 @ie6-bug  @ie7-bug  @ie8-bug  @ie9-bug @ie10-bug @test2.wikipedia.org @login
 Feature: VisualEditor Bullets, Numbering, Indent, Outdent
 
-  Background:
-    Given I am logged in
-      And I am at my user page
-      And I click Edit for VisualEditor
-      And I type in an input string
-      And select the string
-
-  Scenario: Check indentation controls disabled by default
+@make_selectable_line
+ Scenario: Check indentation controls disabled by default
     Then Decrease indentation should be disabled
       And Increase indentation should be disabled
 
-  Scenario: Check indentation controls enabled upon creating Bullet
-    When I click Bullets
-    Then Decrease indentation should be enabled
-       And Increase indentation should be enabled
-
-  Scenario: Check indentation controls enabled upon creating Numbering
-    When I click Numbering
-    Then Decrease indentation should be enabled
-       And Increase indentation should be enabled
-
-  Scenario: Check indentation controls disabled upon undoing Bullet
-    When I click Bullets
-      And  I undo Bullets
-    Then Decrease indentation should be disabled
-       And Increase indentation should be disabled
-
-  Scenario: Check indentation controls enabled upon creating Numbering
-    When I click Numbering
-      And I undo Numbering
-    Then Decrease indentation should be disabled
-       And Increase indentation should be disabled
\ No newline at end of file
+  @make_selectable_line
+  Scenario Outline: check indent and outdent enable and disable
+    When I click <control>
+    Then Decrease indentation should be <initial_state>
+      And Increase indentation should be <initial_state>
+      And I undo <control>
+      And Decrease indentation should be <final_state>
+      And Increase indentation should be <final_state>
+  Examples: 
+    | control   | initial_state | final_state |
+    | Bullets   | enabled       | disabled    |
+    | Numbering | enabled       | disabled    |
\ No newline at end of file

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

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