jenkins-bot has submitted this change and it was merged. Change subject: Don't log events during unit tests ......................................................................
Don't log events during unit tests EventLogging should be disabled during all of our unit tests but, for now, stub Schema.prototype.log during the CollectionsContentOverlay test, which was logging a GatherClicks event. This is a workaround for a bug in the Gather mediawiki-extensions-qunit build wherein the GatherClicks schema isn't being registered, i.e. the EventLogging::logEvent method isn't callable, but the EventLogging extension is definitely loaded, which is obvious from the error itself. Bug: T106759 Change-Id: Ic53bb343a9b703003a0310b74d8a9c5571defd13 --- M tests/qunit/ext.gather.collection.contentOverlay/test_CollectionsContentOverlay.js 1 file changed, 7 insertions(+), 2 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/qunit/ext.gather.collection.contentOverlay/test_CollectionsContentOverlay.js b/tests/qunit/ext.gather.collection.contentOverlay/test_CollectionsContentOverlay.js index 2153d39..0889468 100644 --- a/tests/qunit/ext.gather.collection.contentOverlay/test_CollectionsContentOverlay.js +++ b/tests/qunit/ext.gather.collection.contentOverlay/test_CollectionsContentOverlay.js @@ -6,14 +6,17 @@ ( function ( M, $ ) { var CollectionsApi = M.require( 'ext.gather.api/CollectionsApi' ), Page = M.require( 'Page' ), - CollectionsContentOverlay = M.require( 'ext.gather.watchstar/CollectionsContentOverlay' ); + CollectionsContentOverlay = M.require( 'ext.gather.watchstar/CollectionsContentOverlay' ), + Schema = M.require( 'Schema' ); QUnit.module( 'Gather: Add to collection overlay', { setup: function () { var d = $.Deferred().resolve( { id: 2 } ), - d2 = $.Deferred().resolve(); + d2 = $.Deferred().resolve(), + logResult = $.Deferred().reject( 'ACCESS DENIED' ); + this.page = new Page( { title: 'Gather test' } ); @@ -30,6 +33,8 @@ title: 'Foo', titleInCollection: false }; + + this.sandbox.stub( Schema.prototype, 'log' ).returns( logResult ); } } ); -- To view, visit https://gerrit.wikimedia.org/r/237341 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic53bb343a9b703003a0310b74d8a9c5571defd13 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Phuedx <g...@samsmith.io> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits