Page MenuHomePhabricator

UploadWizard tests fail with jQuery 3
Closed, ResolvedPublic

Description

UploadWizard tests fail with jQuery 3, as seen on https://gerrit.wikimedia.org/r/#/c/336610/.

Event Timeline

matmarex created this task.Apr 27 2017, 6:38 PM
Restricted Application added a project: Multimedia. · View Herald TranscriptApr 27 2017, 6:38 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This is probably not a real bug in the code, but just a problem with the tests. We don't wait for promises to be resolved asynchronously. E.g. in snippets like this:

		transport.checkStatus().fail( tstub );
		...
		assert.ok( tstub.calledWith( 'server-error', { error: {
			code: 'server-error',
			html: mw.message( 'apierror-unknownerror' ).parse()
		} } ) );

This needs to be something like:

		promise = transport.checkStatus().fail( tstub );
		...
		promise.then( null, function () {
			assert.ok( tstub.calledWith( 'server-error', { error: {
				code: 'server-error',
				html: mw.message( 'apierror-unknownerror' ).parse()
			} } ) );
		} );

Change 350871 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/UploadWizard@master] Update FormDataTransport tests for jQuery 3

https://gerrit.wikimedia.org/r/350871

Change 351019 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/UploadWizard@master] Add our EventLogging schemas to test module's dependencies

https://gerrit.wikimedia.org/r/351019

matthiasmullie closed this task as Resolved.May 1 2017, 1:45 PM
matthiasmullie claimed this task.

Change 350871 merged by MarkTraceur:
[mediawiki/extensions/UploadWizard@master] Update FormDataTransport tests for jQuery 3

https://gerrit.wikimedia.org/r/350871

Change 351019 merged by MarkTraceur:
[mediawiki/extensions/UploadWizard@master] Add our EventLogging schemas to test module's dependencies

https://gerrit.wikimedia.org/r/351019