Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/231467
Change subject: QA: Tweak tests to work with user_factory
......................................................................
QA: Tweak tests to work with user_factory
These tests do not quite work on fresh instances with a user_factory as they
rely
on existence of collections
Change-Id: I85b3e97c7fba71215e39ba1637959d679e54be3b
---
M tests/browser/features/add_to_collection.feature
M tests/browser/features/anonymous.feature
M tests/browser/features/step_definitions/add_to_collection_steps.rb
M tests/browser/features/step_definitions/anonymous_steps.rb
4 files changed, 12 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather
refs/changes/67/231467/1
diff --git a/tests/browser/features/add_to_collection.feature
b/tests/browser/features/add_to_collection.feature
index 5a7e02c..a5fa133 100644
--- a/tests/browser/features/add_to_collection.feature
+++ b/tests/browser/features/add_to_collection.feature
@@ -12,7 +12,8 @@
Then I see the collection dialog
Scenario: Adding item to existing collection.
- Given I am on the "Selenium Gather test" page
+ Given I have a collection
+ And I am on the "Selenium Gather test" page
When I click the watchstar
And I select a collection
Then I see a toast panel
diff --git a/tests/browser/features/anonymous.feature
b/tests/browser/features/anonymous.feature
index a5f1c30..2d3433d 100644
--- a/tests/browser/features/anonymous.feature
+++ b/tests/browser/features/anonymous.feature
@@ -4,6 +4,7 @@
Background:
Given I am not logged in
And I am using the mobile site
+ And there are public collections
Scenario: Gather shows public view
When I visit the Gather page
diff --git a/tests/browser/features/step_definitions/add_to_collection_steps.rb
b/tests/browser/features/step_definitions/add_to_collection_steps.rb
index 93f97b2..1f7ded8 100644
--- a/tests/browser/features/step_definitions/add_to_collection_steps.rb
+++ b/tests/browser/features/step_definitions/add_to_collection_steps.rb
@@ -3,6 +3,10 @@
1.upto(101-response.data['lists'].length) { |i| make_collection("B#{i}") }
end
+Given(/^I have a collection$/) do
+ make_collection("Z0")
+end
+
When(/^I select a collection$/) do
on(ArticlePage).collections_overlay_collection_one_element.when_present.click
end
diff --git a/tests/browser/features/step_definitions/anonymous_steps.rb
b/tests/browser/features/step_definitions/anonymous_steps.rb
index df92f0a..be28a0d 100644
--- a/tests/browser/features/step_definitions/anonymous_steps.rb
+++ b/tests/browser/features/step_definitions/anonymous_steps.rb
@@ -1,3 +1,8 @@
+Given(/^there are public collections$/) do
+ 1.upto(5) { |i| make_collection("X#{i}") }
+end
+
+
Given(/^I am not logged in$/) do
end
--
To view, visit https://gerrit.wikimedia.org/r/231467
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I85b3e97c7fba71215e39ba1637959d679e54be3b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits