jenkins-bot has submitted this change and it was merged.
Change subject: QA: cleanup, adding "should" to Then steps
......................................................................
QA: cleanup, adding "should" to Then steps
Change-Id: Ifec27106e3526d0e233abed7e8770ff82c98b1ae
---
M tests/browser/features/diff.feature
M tests/browser/features/editor_wikitext_saving.feature
M tests/browser/features/special.feature
M tests/browser/features/special_uploads.feature
M tests/browser/features/step_definitions/common_steps.rb
M tests/browser/features/step_definitions/diff_steps.rb
M tests/browser/features/step_definitions/search_steps.rb
7 files changed, 17 insertions(+), 13 deletions(-)
Approvals:
Cmcmahon: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/browser/features/diff.feature
b/tests/browser/features/diff.feature
index a431c4d..f4d4744 100644
--- a/tests/browser/features/diff.feature
+++ b/tests/browser/features/diff.feature
@@ -19,5 +19,5 @@
And I do not see the wikitext editor overlay
And I click on the history link in the last modified bar
And I open the latest diff
- Then I see "GHI" as added content
- And I see "DEF" as removed content
+ Then I should see "GHI" as added content
+ And I should see "DEF" as removed content
diff --git a/tests/browser/features/editor_wikitext_saving.feature
b/tests/browser/features/editor_wikitext_saving.feature
index 402c109..f404e55 100644
--- a/tests/browser/features/editor_wikitext_saving.feature
+++ b/tests/browser/features/editor_wikitext_saving.feature
@@ -46,4 +46,4 @@
And I click submit
And I say OK in the confirm dialog
And I do not see the wikitext editor overlay
- Then there is a red link with text "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ Then there should be a red link with text
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
diff --git a/tests/browser/features/special.feature
b/tests/browser/features/special.feature
index 06ccd73..7941c8b 100644
--- a/tests/browser/features/special.feature
+++ b/tests/browser/features/special.feature
@@ -9,15 +9,15 @@
Given I am logged into the mobile website
When I click on "Watchlist" in the main navigation menu
And I click the placeholder search box
- Then I see the search overlay
+ Then I should see the search overlay
@extension-geodata
Scenario: Search from Nearby
When I click on "Nearby" in the main navigation menu
And I click the placeholder search box
- Then I see the search overlay
+ Then I should see the search overlay
Scenario: Search from Login
When I click on "Log in" in the main navigation menu
And I click the placeholder search box
- Then I see the search overlay
+ Then I should see the search overlay
diff --git a/tests/browser/features/special_uploads.feature
b/tests/browser/features/special_uploads.feature
index 7c49826..56c697a 100644
--- a/tests/browser/features/special_uploads.feature
+++ b/tests/browser/features/special_uploads.feature
@@ -10,7 +10,7 @@
Scenario: Empty special page parameter takes user to their own uploads page
Given I am logged into the mobile website
When I am on the "Special:Uploads/" page
- Then I can see the uploads interface
+ Then the Contribute an image button should be visible
Scenario: Show error when anon
Given I am on the "Special:Uploads" page
@@ -34,6 +34,6 @@
When I upload file "exif.jpg"
And I type a description
And I click Upload
- Then I see an upload progress bar
- And my image is on the Uploads page
- And the Contribute an image button is visible
+ Then I should see an upload progress bar
+ And my image should be on the Uploads page
+ And the Contribute an image button should be visible
diff --git a/tests/browser/features/step_definitions/common_steps.rb
b/tests/browser/features/step_definitions/common_steps.rb
index 2904323..a116101 100644
--- a/tests/browser/features/step_definitions/common_steps.rb
+++ b/tests/browser/features/step_definitions/common_steps.rb
@@ -99,7 +99,7 @@
visit(ArticlePage, :using_params => {:article_name => article, :hash => hash
})
end
-Then(/^there is a red link with text "(.+)"$/) do |text|
+Then(/^there should be a red link with text "(.+)"$/) do |text|
# FIXME: Switch to link_element when red links move to stable
expect(on(ArticlePage).content_wrapper_element.span_element(text:
text).when_present(10)).to be_visible
end
diff --git a/tests/browser/features/step_definitions/diff_steps.rb
b/tests/browser/features/step_definitions/diff_steps.rb
index 4ffb1b9..2fcbee9 100644
--- a/tests/browser/features/step_definitions/diff_steps.rb
+++ b/tests/browser/features/step_definitions/diff_steps.rb
@@ -1,7 +1,7 @@
-Then(/^I see "(.*?)" as added content$/) do |text|
+Then(/^I should see "(.*?)" as added content$/) do |text|
expect(on(DiffPage).inserted_content_element.text).to eq text
end
-Then(/^I see "(.*?)" as removed content$/) do |text|
+Then(/^I should see "(.*?)" as removed content$/) do |text|
expect(on(DiffPage).deleted_content_element.text).to eq text
end
diff --git a/tests/browser/features/step_definitions/search_steps.rb
b/tests/browser/features/step_definitions/search_steps.rb
index c24b9fe..99df194 100644
--- a/tests/browser/features/step_definitions/search_steps.rb
+++ b/tests/browser/features/step_definitions/search_steps.rb
@@ -54,6 +54,10 @@
expect(on(ArticlePage).search_button_element.when_present).to be_visible
end
+When(/^I should see the search overlay$/) do
+ expect(on(ArticlePage).search_overlay_element.when_present).to be_visible
+end
+
Then(/^search results should contain "(.+)"$/) do |text|
expect(on(ArticlePage).search_result_element.when_present.text).to eq text
end
--
To view, visit https://gerrit.wikimedia.org/r/177637
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifec27106e3526d0e233abed7e8770ff82c98b1ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>
Gerrit-Reviewer: Awjrichards <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits