Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/92018
Change subject: WIP: Basic QA tests for Nearby
......................................................................
WIP: Basic QA tests for Nearby
TODO: Browser needs to be able to spoof a geolocation that we
know returns results
TODO: We need to check for existence of that result
Change-Id: Iecd74adbdffcbe63958c43d10ae5e542735cdffc
---
A tests/browser/features/nearby.feature
A tests/browser/features/step_definitions/nearby_steps.rb
A tests/browser/features/support/pages/nearby_page.rb
3 files changed, 22 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/18/92018/1
diff --git a/tests/browser/features/nearby.feature
b/tests/browser/features/nearby.feature
new file mode 100644
index 0000000..77e7f43
--- /dev/null
+++ b/tests/browser/features/nearby.feature
@@ -0,0 +1,9 @@
+Feature: Nearby
+ Background:
+ Given I am on the nearby page in mobile
+
+ Scenario: Nearby exists
+ Then my URL should be set to the Nearby Page
+
+ Scenario: Nearby shows results
+ Then I see a result in the page list
diff --git a/tests/browser/features/step_definitions/nearby_steps.rb
b/tests/browser/features/step_definitions/nearby_steps.rb
new file mode 100644
index 0000000..42ea325
--- /dev/null
+++ b/tests/browser/features/step_definitions/nearby_steps.rb
@@ -0,0 +1,7 @@
+Given(/^I am on the nearby page in mobile$/) do
+ visit(NearbyPage)
+end
+
+Then(/^I see a result in the page list$/) do
+ on(NearbyPage).results_element.when_present.should exist
+end
diff --git a/tests/browser/features/support/pages/nearby_page.rb
b/tests/browser/features/support/pages/nearby_page.rb
new file mode 100644
index 0000000..d4f1cf6
--- /dev/null
+++ b/tests/browser/features/support/pages/nearby_page.rb
@@ -0,0 +1,6 @@
+class NearbyPage
+ include PageObject
+ include URL
+ page_url URL.url('Special:Nearby')
+ li(:results, css:'.pagelist li')
+end
--
To view, visit https://gerrit.wikimedia.org/r/92018
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iecd74adbdffcbe63958c43d10ae5e542735cdffc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits