#27014 closed enhancement (fixed)
Incorporate the TinyMCE tests into our JS tests
Reported by: | azaozz | Owned by: | |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | |
Focuses: | javascript | Cc: |
Description
TinyMCE comes with a large number of unit tests. It also uses QUnit but the tests are set a bit differently.
Attachments (3)
Change History (12)
This ticket was mentioned in IRC in #wordpress-dev by azaozz. View the logs.
11 years ago
#2
@
11 years ago
Version 0, edited 11 years ago
by
(next)
#3
@
11 years ago
In 27014.2.patch:
- Add tests for obsolete HTML elements and attributes (html4 back-compat).
- Exclude /tests/qunit/editor/* from Grunt tasks for now.
#6
@
11 years ago
Running the TinyMCE tests from Grunt automatically together with the core tests won't work.
- PhantomJS (used for core) cannot run TinyMCE properly. The reason is that a large part of TinyMCE deals with browser specific quirks and normalization. PhantomJS is WebKit based but is neither Chrome nor Safari. It works very well for "pure" JS but doesn't (and shouldn't) emulate browser specific quirks/problems with contenteditable, the DOM, etc.
- Even if there is a JavaScript "runner" that emulates different browsers, don't think it will work well. We would be testing the quality of emulation together with the functionality in TinyMCE, and we need it for IE 7,8,9,10,11, latest Firefox, Chrome, Safari, iOS, Android, etc.
In that terms the best option is to run the TinyMCE tests by hand in all browsers. In Grunt we could launch the browser from Node.js and run the tests. Not sure if we want to go there though.
Note: See
TracTickets for help on using
tickets.
Some of the files in 27014.1.patch are edited so TinyMCE can be loaded from /src/wp-includes/js. Also added a "WP" selection to the UI to deselect tests that do not apply to our integration (mostly the default plugins tests).
One advantage of having these tests is that we can add some more specifically for the schema, testing the backwards compatibility with HTML 4.