jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/393693 )
Change subject: Port prefer_recent_api.feature to nodejs
......................................................................
Port prefer_recent_api.feature to nodejs
Transformed into a simple smoke test.
Change-Id: I7fbf7b9945f71b0e46a769ec5b2ebec6f338af14
---
A tests/integration/features/prefer_recent_api.feature
M tests/integration/features/support/hooks.js
2 files changed, 26 insertions(+), 20 deletions(-)
Approvals:
Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
jenkins-bot: Verified
DCausse: Looks good to me, approved
diff --git a/tests/integration/features/prefer_recent_api.feature
b/tests/integration/features/prefer_recent_api.feature
new file mode 100644
index 0000000..9864728
--- /dev/null
+++ b/tests/integration/features/prefer_recent_api.feature
@@ -0,0 +1,17 @@
+@clean @api @prefer_recent
+Feature: Searches with prefer-recent
+ Scenario Outline: Simple smoke test for prefer-recent (make sure it returns
results)
+ When I api search for prefer-recent:<options> PreferRecent First OR Second
OR Third
+ Then PreferRecent First is in the api search results
+ Then PreferRecent Second is in the api search results
+ Then PreferRecent Third is in the api search results
+ Examples:
+ | options |
+ | 1,.001 |
+ | 1,0.001 |
+ | 1,.0001 |
+ | .99,.0001 |
+ | .99,.001 |
+ | 1 |
+ | 1,1 |
+ | 1,.2 |
diff --git a/tests/integration/features/support/hooks.js
b/tests/integration/features/support/hooks.js
index 3f79285..3f4b529 100644
--- a/tests/integration/features/support/hooks.js
+++ b/tests/integration/features/support/hooks.js
@@ -446,26 +446,15 @@
}
} ) );
- BeforeOnce( { tags: "@prefer_recent", timeout: 60000 },
Promise.coroutine( function* () {
- yield runBatch( this, false, {
- edit: {
- // Using epochs as content ensures the page is
edited.
- 'PreferRecent First': "" + ( new Date() / 1 ),
- 'PreferRecent Second Second': "" + ( new Date()
/ 1 ),
- }
- } );
-
- // We need to wait around to ensure the next page has enough
time difference
- // for prefer-recent to reorder things
- yield this.stepHelpers.waitForMs( 20000 );
-
- yield runBatch( this, false, {
- edit: {
- 'PreferRecent Third': "" + ( new Date() / 1 )
- }
- } );
- // TODO: Why are we waiting here?
- yield this.stepHelpers.waitForMs( 10000 );
+ BeforeOnce( { tags: "@prefer_recent", timeout: 60000 }, runBatchFn( {
+ // NOTE: this was originally a real test for testing recency
with prefer-recent
+ // it was transformed into a simple smoke test because it was
too unreliable,
+ // (it's why PreferRecent Third is created in the same batch).
+ edit: {
+ 'PreferRecent First': 'PreferRecent random text for
field norm ' + ( new Date() / 1 ),
+ 'PreferRecent Second': 'PreferRecent ' + ( new Date() /
1 ),
+ 'PreferRecent Third': 'PreferRecent random text for
field norm ' + ( new Date() / 1 )
+ }
} ) );
BeforeOnce( { tags: "@hastemplate" }, runBatchFn( {
--
To view, visit https://gerrit.wikimedia.org/r/393693
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7fbf7b9945f71b0e46a769ec5b2ebec6f338af14
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: Cindy-the-browser-test-bot <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits