Page MenuHomePhabricator

Convert ext.wikiEditor.tests.toolbar to QUnit
Closed, ResolvedPublic

Description

The use of this testsuit is somewhat limited, since there is no way to execute it automatically (you even have to load this module by hand!)
Convert it to QUnit test to run them automatically, and expand the tests to cover things like T39484.


Version: unspecified
Severity: enhancement

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:27 AM
bzimport set Reference to bz37485.
bzimport added a subscriber: Unknown Object (MLST).

I've been working on this bug. I'll try to post something to Gerrit this week. As it stands, there is one assertion that fails. It looks like there's a bug preventing the removal of select tools.

According to the code [1] removeFromToolbar is not designed to be able to remove select tools (and probably never was). Changing line 161 to

target = target + ' [rel="' + data.tool + '"].tool';

might fix this.

[1] https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FWikiEditor/f5fcd50ce421b55a3d0a15f6c7d7707518a7284a/modules%2Fjquery.wikiEditor.toolbar.js#L148

Should I fix that in the same commit?

Change 175698 had a related patch set uploaded (by Happy5214):
Add QUnit test for ext.wikiEditor.toolbar

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

Patch-For-Review

Change 175698 merged by jenkins-bot:
Add QUnit test for ext.wikiEditor.toolbar

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

TheDJ claimed this task.