WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 19 months ago

#31596 new defect (bug)

Make it easier to update TinyMCE

Reported by: iseulde Owned by:
Milestone: Future Release Priority: low
Severity: normal Version:
Component: TinyMCE Keywords: needs-patch needs-docs
Focuses: javascript Cc:

Description

  • Load from src like the other tests
  • Automatically add the plugins without overwriting files.
  • Don't run tests where no plugins are loaded. We're running these test just to test our plugins.
  • Remove everything we don't use.

Attachments (1)

31596.patch (27.0 KB) - added by iseulde 3 years ago.

Download all attachments as: .zip

Change History (10)

@iseulde
3 years ago

#1 @samuelsidler
3 years ago

  • Priority changed from normal to low

This ticket was mentioned in Slack in #core by drew. View the logs.


3 years ago

#3 @DrewAPicture
3 years ago

  • Keywords has-patch added
  • Milestone changed from 4.2 to Future Release

This is not crucial for 4.2. Punting.

#4 @azaozz
3 years ago

Load from src like the other tests

We used to do that. However in some (rare) cases things can get broken during the build. I'd rather know that the concatenated, pre-compressed TinyMCE works properly :)

If testing /src is so important, we can add another link for it.

Automatically add the plugins without overwriting files.

Not sure about that. "Duck-punching" tinymce.EditorManager doesn't seem good :)

Don't run tests where no plugins are loaded. We're running these test just to test our plugins.

We are running all TinyMCE tests with all of our plugins loaded. There are few tests where not all of TinyMCE is loaded. We can exclude these but... What's the benefit? Will have to edit more and more files just for saving few milliseconds of tests that are very rarely run? The opposite is true -- more maintenance, see below.

Remove everything we don't use.

That's nice but will mean more and more maintenance. The TinyMCE tests are typically updated on every release. The more we deviate from the originals, the more maintenance will be needed.

The easiest way to maintain edited files is when we include the whole file and comment out the parts we don's use. If we "scramble" the blocks/line numbers it gets much harder.

Also the patch removes our Obsolete.js tests. That's not good, we've had many failures there in the past. Even if all the rest of the tests are removed, this one should stay.

Last edited 3 years ago by azaozz (previous) (diff)

#5 @azaozz
3 years ago

Also, these tests have to be run in all supported browsers. The only sensible way to do that at the moment is to run them by hand" in each browser and version.

They can be run in "headless WebKit" automatically from cli, but that's not good as big part of TinyMCE deals with browser quirks, differences and normalization.

#6 @iseulde
3 years ago

So how do we start adding our own tests for e.g. wpviews? For these test it does make sense to run them in a headless browser, as well as run the tests in all supported browsers. Just wanted to make it a bit easier to add our own.

#7 @azaozz
3 years ago

IMHO best would be to have another "runner", i.e. a separate https://core.trac.wordpress.org/browser/trunk/tests/qunit/editor/index.html just for our tests. Then we can auto-run them on precommit (same as the other JS tests). The full MCE tests will still be run "by hand".

That way we will be in "full control" what, when and how to run the tests :)

Last edited 3 years ago by azaozz (previous) (diff)

#8 @iseulde
19 months ago

  • Keywords needs-patch needs-docs added; has-patch removed
  • Summary changed from TinyMCE test adjustments to Make it easier to update TinyMCE

Renaming because my intention was to make it easier to update TinyMCE (by anyone) and easier to maintain. If we don't change anything, we should at least document the process somewhere. It's not that obvious, even to me.

This ticket was mentioned in Slack in #core-editor by azaozz. View the logs.


19 months ago

Note: See TracTickets for help on using tickets.