[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: QA: Search.feature browser test gives false positives

2016-10-26 Thread jenkins-bot (Code Review)
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 000..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 
Gerrit-Reviewer: Jhobs 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: QA: Search.feature browser test gives false positives

2016-10-17 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

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

Change-Id: I9025f74650070cc188a15e29b802fdc7c968a68c
---
M tests/browser/features/search.feature
1 file changed, 6 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/93/316393/1

diff --git a/tests/browser/features/search.feature 
b/tests/browser/features/search.feature
index 9fc5d4d..afe3f5c 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
 
@@ -50,9 +49,7 @@
 
   @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 am logged into the mobile website
+When I type into search box "Selenium search tes"
   And 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: newchange
Gerrit-Change-Id: I9025f74650070cc188a15e29b802fdc7c968a68c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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