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

Change subject: QA: Search.feature browser test gives false positives
......................................................................


QA: Search.feature browser test gives false positives

* The closing search overlay doesn't even check that the overlay
is opened before testing so will always pass.
* All the browser tests share a background scenario

Additional changes:
* Separate the logged in browser test from the anonymous tests

Change-Id: I9025f74650070cc188a15e29b802fdc7c968a68c
---
M tests/browser/features/search.feature
A tests/browser/features/search_loggedin.feature
2 files changed, 17 insertions(+), 14 deletions(-)

Approvals:
  Jhobs: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Phuedx: Looks good to me, approved



diff --git a/tests/browser/features/search.feature 
b/tests/browser/features/search.feature
index 9fc5d4d..e6c989b 100644
--- a/tests/browser/features/search.feature
+++ b/tests/browser/features/search.feature
@@ -5,7 +5,8 @@
     Given I am using the mobile site
       And the page "Selenium search test" exists
       And I am on the "Main Page" page
-    When I click the placeholder search box
+      And I click the placeholder search box
+      And I see the search overlay
 
   Scenario: Closing search (overlay button)
     When I click the search overlay close button
@@ -21,15 +22,13 @@
     Then search results should contain "Selenium search test"
 
   Scenario: Search with search in pages button
-      And I see the search overlay
-      And I type into search box "Test is used by Selenium web driver"
+    When I type into search box "Test is used by Selenium web driver"
       And I see the search in pages button
       And I click the search in pages button
     Then I should see a list of search results
 
   Scenario: Search with enter key
-      And I see the search overlay
-      And I type into search box "Test is used by Selenium web driver"
+    When I type into search box "Test is used by Selenium web driver"
       And I press the enter key
     Then I should see a list of search results
 
@@ -47,12 +46,3 @@
     And I click the placeholder search box
     And I type into search box "Main Page"
     Then search results should contain "Main Page"
-
-  @login
-  Scenario: Clicking on a watchstar toggles the watchstar
-    Given I am logged into the mobile website
-      And the page "Selenium search test" exists
-    When I click the placeholder search box
-      And I type into search box "Selenium search tes"
-      And I click a search watch star
-    Then I should see a toast
diff --git a/tests/browser/features/search_loggedin.feature 
b/tests/browser/features/search_loggedin.feature
new file mode 100644
index 0000000..93206ab
--- /dev/null
+++ b/tests/browser/features/search_loggedin.feature
@@ -0,0 +1,13 @@
+@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @integration 
@test2.m.wikipedia.org @vagrant @login
+Feature: Search
+
+  Scenario: Clicking on a watchstar toggles the watchstar
+    Given I am using the mobile site
+      And the page "Selenium search test" exists
+      And I am logged into the mobile website
+      And I am on the "Main Page" page
+      And I click the placeholder search box
+      And I see the search overlay
+      And I type into search box "Selenium search tes"
+    When I click a search watch star
+    Then I should see a toast

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9025f74650070cc188a15e29b802fdc7c968a68c
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: Jhobs <jhob...@wikimedia.org>
Gerrit-Reviewer: Phuedx <samsm...@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