From 9e1f5762fc19cbce6cafecc691c5e1c4de2d8477 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 28 May 2026 14:27:56 +0930 Subject: [PATCH 01/10] TINYINT-3431: Prepare for 2.3 release --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1305a4..11c16f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## 2.3.0 - 2026-05-28 + ### Changed - Updated to support jQuery 4. #INT-3359 diff --git a/package.json b/package.json index f363d9d..2c7aabc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tinymce/tinymce-jquery", - "version": "2.3.0-rc", + "version": "2.3.0", "description": "Official TinyMCE integration for jQuery", "main": "dist/tinymce-jquery.js", "files": [ From f58c7046afaeafcab07ab151af60e9ba9435529e Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 28 May 2026 16:25:06 +0930 Subject: [PATCH 02/10] Try to fix flake test --- src/test/ts/Utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/ts/Utils.ts b/src/test/ts/Utils.ts index ef17967..261d814 100644 --- a/src/test/ts/Utils.ts +++ b/src/test/ts/Utils.ts @@ -14,7 +14,7 @@ export const createEditor = async (action: (targetElm: JQuery, edit license_key: 'gpl', base_url: '/project/node_modules/tinymce', }); - await Waiter.pTryUntil('Editor should be initialized', () => editors[0]?.initialized); + await Waiter.pTryUntilPredicate('Editor should be initialized', () => editors[0]?.initialized); try { const maybeAsync = action(targetElm, editors[0]); if (maybeAsync) { From 16d14aab4b76f8c62da68d1d0e24db83d3a1178e Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 1 Jun 2026 08:38:12 +0930 Subject: [PATCH 03/10] Another attempt to fix flaky tests --- src/test/ts/Utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/ts/Utils.ts b/src/test/ts/Utils.ts index 261d814..aad4cbd 100644 --- a/src/test/ts/Utils.ts +++ b/src/test/ts/Utils.ts @@ -14,7 +14,8 @@ export const createEditor = async (action: (targetElm: JQuery, edit license_key: 'gpl', base_url: '/project/node_modules/tinymce', }); - await Waiter.pTryUntilPredicate('Editor should be initialized', () => editors[0]?.initialized); + await Waiter.pTryUntilPredicate('Editor should be initialized', () => editors[0]?.initialized === true); + try { const maybeAsync = action(targetElm, editors[0]); if (maybeAsync) { From 23473f59cb2e8e4fde418ff390ba03635821bb46 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 1 Jun 2026 10:11:25 +0930 Subject: [PATCH 04/10] Use the correct option for loading tinymce locally --- src/test/ts/Utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/ts/Utils.ts b/src/test/ts/Utils.ts index aad4cbd..ca35dc0 100644 --- a/src/test/ts/Utils.ts +++ b/src/test/ts/Utils.ts @@ -12,8 +12,9 @@ export const createEditor = async (action: (targetElm: JQuery, edit const targetElm = $(ce.dom); const editors = await targetElm.tinymce({ license_key: 'gpl', - base_url: '/project/node_modules/tinymce', + script_url: '/project/node_modules/tinymce/tinymce.js', }); + await Waiter.pTryUntilPredicate('Editor should be initialized', () => editors[0]?.initialized === true); try { From fe4341d18e416e651e14f5c1d8f50196f21a7bed Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 1 Jun 2026 10:31:30 +0930 Subject: [PATCH 05/10] Remove await --- src/test/ts/Utils.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/test/ts/Utils.ts b/src/test/ts/Utils.ts index ca35dc0..24ad031 100644 --- a/src/test/ts/Utils.ts +++ b/src/test/ts/Utils.ts @@ -15,15 +15,13 @@ export const createEditor = async (action: (targetElm: JQuery, edit script_url: '/project/node_modules/tinymce/tinymce.js', }); - await Waiter.pTryUntilPredicate('Editor should be initialized', () => editors[0]?.initialized === true); - try { const maybeAsync = action(targetElm, editors[0]); if (maybeAsync) { await maybeAsync; } } finally { - editors[0]?.remove(); + editors[0].remove(); } } finally { Remove.remove(ce); From 68476a6b704ccc998a14da92e37727a8ceb8a1ee Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 1 Jun 2026 10:33:20 +0930 Subject: [PATCH 06/10] Fix lint --- src/test/ts/Utils.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/test/ts/Utils.ts b/src/test/ts/Utils.ts index 24ad031..a6b3981 100644 --- a/src/test/ts/Utils.ts +++ b/src/test/ts/Utils.ts @@ -1,5 +1,3 @@ - -import { Waiter } from '@ephox/agar'; import { Insert, Remove, SugarBody, SugarElement } from '@ephox/sugar'; import { Editor } from 'tinymce'; From dbeedf6e1bf6f09fe4ba8ca20e5ddcc4129be201 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 1 Jun 2026 11:30:32 +0930 Subject: [PATCH 07/10] Update more tests to use local tinymce --- src/test/ts/browser/JqEmptyTest.ts | 39 +++++++++--- src/test/ts/browser/JqRemoveTest.ts | 95 ++++++++++++++++++++++++----- src/test/ts/browser/JqTextTest.ts | 35 ++++++++--- 3 files changed, 139 insertions(+), 30 deletions(-) diff --git a/src/test/ts/browser/JqEmptyTest.ts b/src/test/ts/browser/JqEmptyTest.ts index d62cb93..a0fd9b5 100644 --- a/src/test/ts/browser/JqEmptyTest.ts +++ b/src/test/ts/browser/JqEmptyTest.ts @@ -36,7 +36,11 @@ describe('Check jQuery\'s `.empty()` function', () => { it('check empty works on a inline editor with content', async () => { await createHTML(`

Hello

World

`, async (root) => { const elm = $('div#editor'); - const ed = (await elm.tinymce({ inline: true }))[0]; + const ed = (await elm.tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true + }))[0]; try { Assertions.assertEq('Expected editor to have content', `

Hello

\n

World

`, ed.getContent()); elm.empty(); @@ -56,7 +60,10 @@ describe('Check jQuery\'s `.empty()` function', () => { // eslint-disable-next-line max-len await createHTML(`

Before

After

Extra

`, async (root) => { const edElm = $('textarea#editor'); - const ed = (await edElm.tinymce({ }))[0]; + const ed = (await edElm.tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + }))[0]; try { Assertions.assertEq('Expected editor to have content', `

Hello

\n

World

`, ed.getContent()); const container = $('div#container'); @@ -73,7 +80,11 @@ describe('Check jQuery\'s `.empty()` function', () => { // eslint-disable-next-line max-len await createHTML(`

Before

Hello

World

After

Extra

`, async (root) => { const edElm = $('div#editor'); - const ed = (await edElm.tinymce({ inline: true }))[0]; + const ed = (await edElm.tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true + }))[0]; try { Assertions.assertEq('Expected editor to have content', `

Hello

\n

World

`, ed.getContent()); const container = $('div#container'); @@ -113,8 +124,15 @@ describe('Check jQuery\'s `.empty()` function', () => { const normal = $('textarea.editor'); const eds: Editor[] = []; try { - eds.push(...await inline.tinymce({ inline: true })); - eds.push(...await normal.tinymce({ })); + eds.push(...await inline.tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true + })); + eds.push(...await normal.tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js' + })); for (let i = 0; i < eds.length; i++) { Assertions.assertEq(`Expected editor ${i} to have content`, `

Content1

\n

Content2

`, eds[i].getContent()); } @@ -139,7 +157,10 @@ describe('Check jQuery\'s `.empty()` function', () => { it('check normal editors before and after are left alone', async () => { // eslint-disable-next-line max-len await createHTML(`

Container Content

`, async () => { - const eds = await $('textarea.editor').tinymce({ }); + const eds = await $('textarea.editor').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + }); try { for (let i = 0; i < eds.length; i++) { Assertions.assertEq(`Expected editor ${i} to have content`, `

Editor Content

`, eds[i].getContent()); @@ -162,7 +183,11 @@ describe('Check jQuery\'s `.empty()` function', () => { it('check inline editors before and after are left alone', async () => { // eslint-disable-next-line max-len await createHTML(`

Editor Content

Container Content

Editor Content

`, async () => { - const eds = await $('div.editor').tinymce({ inline: true }); + const eds = await $('div.editor').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true + }); try { for (let i = 0; i < eds.length; i++) { Assertions.assertEq(`Expected editor ${i} to have content`, `

Editor Content

`, eds[i].getContent()); diff --git a/src/test/ts/browser/JqRemoveTest.ts b/src/test/ts/browser/JqRemoveTest.ts index b24b268..94ec505 100644 --- a/src/test/ts/browser/JqRemoveTest.ts +++ b/src/test/ts/browser/JqRemoveTest.ts @@ -36,7 +36,10 @@ describe('Check jQuery\'s `.remove()` function', () => { await createHTML(`

Before

`, async (root) => { const target = $('div#target'); const elm = $('textarea#editor'); - const ed = (await elm.tinymce({ }))[0]; + const ed = (await elm.tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + }))[0]; try { Assertions.assertEq('Expected editor to contain content', `

Content

`, ed.getContent()); target.remove(); @@ -51,7 +54,11 @@ describe('Check jQuery\'s `.remove()` function', () => { await createHTML(`

Before

Content

`, async (root) => { const target = $('div#target'); const elm = $('div#editor'); - const ed = (await elm.tinymce({ inline: true }))[0]; + const ed = (await elm.tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true + }))[0]; try { Assertions.assertStructure('Expected root to initially contain everything', ApproxStructure.fromHtml(`

Before

Content

`), @@ -74,9 +81,18 @@ describe('Check jQuery\'s `.remove()` function', () => { const target = $('div.target'); const eds: Editor[] = []; try { - eds.push((await $('textarea#editor1').tinymce({ }))[0]); - eds.push((await $('textarea#editor2').tinymce({ }))[0]); - eds.push((await $('textarea#editor3').tinymce({ }))[0]); + eds.push((await $('textarea#editor1').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js' + }))[0]); + eds.push((await $('textarea#editor2').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js' + }))[0]); + eds.push((await $('textarea#editor3').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js' + }))[0]); Assertions.assertEq('Expected editor 1 to contain content', `

Content

`, eds[0].getContent()); Assertions.assertEq('Expected editor 2 to contain content', `

Content

`, eds[1].getContent()); Assertions.assertEq('Expected editor 3 to contain content', `

Content

`, eds[2].getContent()); @@ -102,9 +118,21 @@ describe('Check jQuery\'s `.remove()` function', () => { const target = $('div.target'); const eds: Editor[] = []; try { - eds.push((await $('div#editor1').tinymce({ inline: true }))[0]); - eds.push((await $('div#editor2').tinymce({ inline: true }))[0]); - eds.push((await $('div#editor3').tinymce({ inline: true }))[0]); + eds.push((await $('div#editor1').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true + }))[0]); + eds.push((await $('div#editor2').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true + }))[0]); + eds.push((await $('div#editor3').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true + }))[0]); Assertions.assertStructure('Expected root to initially contain everything', ApproxStructure.fromHtml('
' + '

Content

' + @@ -135,7 +163,10 @@ describe('Check jQuery\'s `.remove()` function', () => { it('check works without selector on normal editors', async () => { await createHTML(`
`, async (root) => { const elm = $('textarea#editor'); - const ed = (await elm.tinymce({ }))[0]; + const ed = (await elm.tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js' + }))[0]; try { Assertions.assertEq('Expected editor to contain content', `

Content

`, ed.getContent()); elm.remove(); @@ -149,7 +180,11 @@ describe('Check jQuery\'s `.remove()` function', () => { it('check works without selector on inline editors', async () => { await createHTML(`

Content

`, async (root) => { const elm = $('div#editor'); - const ed = (await elm.tinymce({ }))[0]; + const ed = (await elm.tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true + }))[0]; try { Assertions.assertEq('Expected editor to contain content', `

Content

`, ed.getContent()); elm.remove(); @@ -169,9 +204,18 @@ describe('Check jQuery\'s `.remove()` function', () => { const target = $('section.container textarea'); const eds: Editor[] = []; try { - eds.push((await $('textarea#editor1').tinymce({ }))[0]); - eds.push((await $('textarea#editor2').tinymce({ }))[0]); - eds.push((await $('textarea#editor3').tinymce({ }))[0]); + eds.push((await $('textarea#editor1').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js' + }))[0]); + eds.push((await $('textarea#editor2').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js' + }))[0]); + eds.push((await $('textarea#editor3').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js' + }))[0]); Assertions.assertEq('Expected editor 1 to contain content', `

Content

`, eds[0].getContent()); Assertions.assertEq('Expected editor 2 to contain content', `

Content

`, eds[1].getContent()); Assertions.assertEq('Expected editor 3 to contain content', `

Content

`, eds[2].getContent()); @@ -197,9 +241,28 @@ describe('Check jQuery\'s `.remove()` function', () => { const target = $('section.container div'); const eds: Editor[] = []; try { - eds.push((await $('div#editor1').tinymce({ inline: true }))[0]); - eds.push((await $('div#editor2').tinymce({ inline: true }))[0]); - eds.push((await $('div#editor3').tinymce({ inline: true }))[0]); + eds.push((await $('div#editor1').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true }))[0]); + eds.push((await $('div#editor2').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true }))[0]); + eds.push((await $('div#editor3').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true }))[0]); + eds.push((await $('div#editor2').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true + }))[0]); + eds.push((await $('div#editor3').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + inline: true + }))[0]); Assertions.assertStructure('Expected root to initially contain everything', ApproxStructure.fromHtml('
' + '

Content

' + diff --git a/src/test/ts/browser/JqTextTest.ts b/src/test/ts/browser/JqTextTest.ts index 8594f87..d9c3aea 100644 --- a/src/test/ts/browser/JqTextTest.ts +++ b/src/test/ts/browser/JqTextTest.ts @@ -30,7 +30,10 @@ describe('Check jQuery\'s `.text()` function', () => { it('gets the text of TinyMCE and two divs', async () => { await createHTML(`

Before

Middle

After

`, async (root) => { const divs = $(root).find('div'); - const ed = (await $('#editor').tinymce({ }))[0]; + const ed = (await $('#editor').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + }))[0]; try { Assertions.assertEq('Expected matching text', 'BeforeMiddleAfter', divs.text()); } finally { @@ -54,7 +57,10 @@ describe('Check jQuery\'s `.text()` function', () => { it('sets the content of multiple things simultaneously', async () => { await createHTML(`
Before
`, async (root) => { const divs = root.querySelectorAll('div'); - const ed = (await $('#editor').tinymce({ }))[0]; + const ed = (await $('#editor').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + }))[0]; try { $(divs).text('Hello'); Assertions.assertEq('Expected matching html', 'Hello', divs[0].innerHTML); @@ -80,7 +86,10 @@ describe('Check jQuery\'s `.text()` function', () => { it('sets the content of multiple things simultaneously', async () => { await createHTML(`
Before
`, async (root) => { const divs = root.querySelectorAll('div'); - const ed = (await $('#editor').tinymce({ }))[0]; + const ed = (await $('#editor').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + }))[0]; try { $(divs).text(9007199254740991); Assertions.assertEq('Expected matching html', '9007199254740991', divs[0].innerHTML); @@ -106,7 +115,10 @@ describe('Check jQuery\'s `.text()` function', () => { it('sets the content of multiple things simultaneously', async () => { await createHTML(`
Before
`, async (root) => { const divs = root.querySelectorAll('div'); - const ed = (await $('#editor').tinymce({ }))[0]; + const ed = (await $('#editor').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js' + }))[0]; try { $(divs).text(true); Assertions.assertEq('Expected matching html', 'true', divs[0].innerHTML); @@ -144,7 +156,10 @@ describe('Check jQuery\'s `.text()` function', () => { it('sets the content of multiple things simultaneously', async () => { await createHTML(`
Content
Content
`, async (root) => { const divs = root.querySelectorAll('div'); - const ed = (await $('#editor').tinymce({ }))[0]; + const ed = (await $('#editor').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js' + }))[0]; try { $(divs).text(function (index, prevValue) { Assertions.assertEq('Expected matching this', divs[index], this); @@ -186,7 +201,10 @@ describe('Check jQuery\'s `.text()` function', () => { it('sets the content of multiple things simultaneously', async () => { await createHTML(`
Content
Content
`, async (root) => { const divs = root.querySelectorAll('div'); - const ed = (await $('#editor').tinymce({ }))[0]; + const ed = (await $('#editor').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js' + }))[0]; try { $(divs).text(function (index, prevValue) { Assertions.assertEq('Expected matching this', divs[index], this); @@ -229,7 +247,10 @@ describe('Check jQuery\'s `.text()` function', () => { it('sets the content of multiple things simultaneously', async () => { await createHTML(`
Content
Content
`, async (root) => { const divs = root.querySelectorAll('div'); - const ed = (await $('#editor').tinymce({ }))[0]; + const ed = (await $('#editor').tinymce({ + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js' + }))[0]; try { $(divs).text(function (index, prevValue) { Assertions.assertEq('Expected matching this', divs[index], this); From 5c9e7c420099195406dc77422779ceb53975e0e4 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 1 Jun 2026 12:06:50 +0930 Subject: [PATCH 08/10] Skip most tests --- src/test/ts/Utils.ts | 4 ++++ src/test/ts/browser/JqAttrTest.ts | 2 +- src/test/ts/browser/JqEmptyTest.ts | 2 +- src/test/ts/browser/JqHtmlTest.ts | 2 +- src/test/ts/browser/JqPrependTest.ts | 2 +- src/test/ts/browser/JqRemoveTest.ts | 2 +- src/test/ts/browser/JqTextTest.ts | 2 +- src/test/ts/browser/JqValTest.ts | 2 +- src/test/ts/browser/LoadTest.ts | 3 +-- src/test/ts/browser/OriginalTest.ts | 7 +++++-- 10 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/test/ts/Utils.ts b/src/test/ts/Utils.ts index a6b3981..dd6ec0b 100644 --- a/src/test/ts/Utils.ts +++ b/src/test/ts/Utils.ts @@ -1,3 +1,5 @@ + +import { Waiter } from '@ephox/agar'; import { Insert, Remove, SugarBody, SugarElement } from '@ephox/sugar'; import { Editor } from 'tinymce'; @@ -13,6 +15,8 @@ export const createEditor = async (action: (targetElm: JQuery, edit script_url: '/project/node_modules/tinymce/tinymce.js', }); + await Waiter.pTryUntilPredicate('Editor should be initialized', () => editors[0]?.initialized === true); + try { const maybeAsync = action(targetElm, editors[0]); if (maybeAsync) { diff --git a/src/test/ts/browser/JqAttrTest.ts b/src/test/ts/browser/JqAttrTest.ts index ceb10bd..d446dd1 100644 --- a/src/test/ts/browser/JqAttrTest.ts +++ b/src/test/ts/browser/JqAttrTest.ts @@ -4,7 +4,7 @@ import { after, before, context, describe, it } from '@ephox/bedrock-client'; import { setupIntegration } from '../../../main/ts/Integration'; import { createEditor, removeTinymce } from '../Utils'; -describe('Check jQuery\'s `.attr()` function', () => { +describe.skip('Check jQuery\'s `.attr()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/JqEmptyTest.ts b/src/test/ts/browser/JqEmptyTest.ts index a0fd9b5..af3f51d 100644 --- a/src/test/ts/browser/JqEmptyTest.ts +++ b/src/test/ts/browser/JqEmptyTest.ts @@ -6,7 +6,7 @@ import { setupIntegration } from '../../../main/ts/Integration'; import { createEditor, createHTML, removeTinymce } from '../Utils'; import { after, before, context, describe, it } from '@ephox/bedrock-client'; -describe('Check jQuery\'s `.empty()` function', () => { +describe.skip('Check jQuery\'s `.empty()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/JqHtmlTest.ts b/src/test/ts/browser/JqHtmlTest.ts index 43165ec..003b63f 100644 --- a/src/test/ts/browser/JqHtmlTest.ts +++ b/src/test/ts/browser/JqHtmlTest.ts @@ -4,7 +4,7 @@ import { after, before, context, describe, it } from '@ephox/bedrock-client'; import { setupIntegration } from '../../../main/ts/Integration'; import { createEditor, createHTML, removeTinymce } from '../Utils'; -describe('Check jQuery\'s `.html()` function', () => { +describe.skip('Check jQuery\'s `.html()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/JqPrependTest.ts b/src/test/ts/browser/JqPrependTest.ts index b027a47..b8ced32 100644 --- a/src/test/ts/browser/JqPrependTest.ts +++ b/src/test/ts/browser/JqPrependTest.ts @@ -4,7 +4,7 @@ import { after, before, context, describe, it } from '@ephox/bedrock-client'; import { setupIntegration } from '../../../main/ts/Integration'; import { createEditor, createHTML, removeTinymce } from '../Utils'; -describe('Check jQuery\'s `.prepend()` function', () => { +describe.skip('Check jQuery\'s `.prepend()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/JqRemoveTest.ts b/src/test/ts/browser/JqRemoveTest.ts index 94ec505..de3c400 100644 --- a/src/test/ts/browser/JqRemoveTest.ts +++ b/src/test/ts/browser/JqRemoveTest.ts @@ -6,7 +6,7 @@ import { Editor } from 'tinymce'; import { setupIntegration } from '../../../main/ts/Integration'; import { createHTML, removeTinymce } from '../Utils'; -describe('Check jQuery\'s `.remove()` function', () => { +describe.skip('Check jQuery\'s `.remove()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/JqTextTest.ts b/src/test/ts/browser/JqTextTest.ts index d9c3aea..f90f3fe 100644 --- a/src/test/ts/browser/JqTextTest.ts +++ b/src/test/ts/browser/JqTextTest.ts @@ -4,7 +4,7 @@ import { after, before, context, describe, it } from '@ephox/bedrock-client'; import { setupIntegration } from '../../../main/ts/Integration'; import { createEditor, createHTML, removeTinymce } from '../Utils'; -describe('Check jQuery\'s `.text()` function', () => { +describe.skip('Check jQuery\'s `.text()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/JqValTest.ts b/src/test/ts/browser/JqValTest.ts index 0574478..dd5bf18 100644 --- a/src/test/ts/browser/JqValTest.ts +++ b/src/test/ts/browser/JqValTest.ts @@ -4,7 +4,7 @@ import { after, before, context, describe, it } from '@ephox/bedrock-client'; import { setupIntegration } from '../../../main/ts/Integration'; import { createEditor, removeTinymce } from '../Utils'; -describe('Check jQuery\'s `.val()` function', () => { +describe.skip('Check jQuery\'s `.val()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/LoadTest.ts b/src/test/ts/browser/LoadTest.ts index 248b600..525f749 100644 --- a/src/test/ts/browser/LoadTest.ts +++ b/src/test/ts/browser/LoadTest.ts @@ -6,7 +6,7 @@ import { Arr } from '@ephox/katamari'; import { Editor } from 'tinymce'; import { removeTinymce } from '../Utils'; -describe('LoadTest', () => { +describe.skip('LoadTest', () => { let editorInstance: Editor; before(async function () { @@ -17,7 +17,6 @@ describe('LoadTest', () => { const ce = SugarElement.fromTag('div'); Class.add(ce, 'test-editor'); Insert.append(SugarBody.body(), ce); - await new Promise((resolve) => { $('div.test-editor').tinymce({ license_key: 'gpl', diff --git a/src/test/ts/browser/OriginalTest.ts b/src/test/ts/browser/OriginalTest.ts index 95ada48..0c68a9c 100644 --- a/src/test/ts/browser/OriginalTest.ts +++ b/src/test/ts/browser/OriginalTest.ts @@ -6,7 +6,7 @@ import { getTinymce } from '../../../main/ts/TinyMCE'; import { setupIntegration } from 'src/main/ts/Integration'; import { removeTinymce } from '../Utils'; -describe('OriginalTest', () => { +describe.skip('OriginalTest', () => { const setup = () => { // make an SugarElement for jQuery to target const ce = SugarElement.fromTag('div'); @@ -96,7 +96,10 @@ describe('OriginalTest', () => { }); it('applyPatch is only called once', () => { - const options = {}; + const options = { + license_key: 'gpl', + script_url: '/project/node_modules/tinymce/tinymce.js', + }; $('#elm1').tinymce(options).catch((err) => { /* eslint-disable-next-line no-console */ From a6dff9c324f7d19a704eeeca9c48e362ddda290c Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 1 Jun 2026 13:03:01 +0930 Subject: [PATCH 09/10] Configure chrome + lambdatest pipeline --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 93f77f6..cf845fe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ mixedBeehiveFlow( ], testPrefix: 'Tiny-jQuery', platforms: [ - [ browser: 'chrome', headless: true ], + [ browser: 'chrome', provider: 'lambdatest', os: 'macOS Sonoma', buckets: 1 ], [ browser: 'firefox', provider: 'aws', buckets: 1 ], [ browser: 'safari', provider: 'lambdatest', os: 'macOS Sonoma', buckets: 1 ] ], From 04eeffa29c7b225912ba6b08857bb52dd93b5ada Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 1 Jun 2026 13:20:43 +0930 Subject: [PATCH 10/10] Unskip tests --- src/test/ts/Utils.ts | 2 +- src/test/ts/browser/JqAttrTest.ts | 2 +- src/test/ts/browser/JqEmptyTest.ts | 2 +- src/test/ts/browser/JqHtmlTest.ts | 2 +- src/test/ts/browser/JqPrependTest.ts | 2 +- src/test/ts/browser/JqRemoveTest.ts | 2 +- src/test/ts/browser/JqTextTest.ts | 2 +- src/test/ts/browser/JqValTest.ts | 2 +- src/test/ts/browser/LoadTest.ts | 2 +- src/test/ts/browser/OriginalTest.ts | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/test/ts/Utils.ts b/src/test/ts/Utils.ts index dd6ec0b..ca35dc0 100644 --- a/src/test/ts/Utils.ts +++ b/src/test/ts/Utils.ts @@ -23,7 +23,7 @@ export const createEditor = async (action: (targetElm: JQuery, edit await maybeAsync; } } finally { - editors[0].remove(); + editors[0]?.remove(); } } finally { Remove.remove(ce); diff --git a/src/test/ts/browser/JqAttrTest.ts b/src/test/ts/browser/JqAttrTest.ts index d446dd1..ceb10bd 100644 --- a/src/test/ts/browser/JqAttrTest.ts +++ b/src/test/ts/browser/JqAttrTest.ts @@ -4,7 +4,7 @@ import { after, before, context, describe, it } from '@ephox/bedrock-client'; import { setupIntegration } from '../../../main/ts/Integration'; import { createEditor, removeTinymce } from '../Utils'; -describe.skip('Check jQuery\'s `.attr()` function', () => { +describe('Check jQuery\'s `.attr()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/JqEmptyTest.ts b/src/test/ts/browser/JqEmptyTest.ts index af3f51d..a0fd9b5 100644 --- a/src/test/ts/browser/JqEmptyTest.ts +++ b/src/test/ts/browser/JqEmptyTest.ts @@ -6,7 +6,7 @@ import { setupIntegration } from '../../../main/ts/Integration'; import { createEditor, createHTML, removeTinymce } from '../Utils'; import { after, before, context, describe, it } from '@ephox/bedrock-client'; -describe.skip('Check jQuery\'s `.empty()` function', () => { +describe('Check jQuery\'s `.empty()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/JqHtmlTest.ts b/src/test/ts/browser/JqHtmlTest.ts index 003b63f..43165ec 100644 --- a/src/test/ts/browser/JqHtmlTest.ts +++ b/src/test/ts/browser/JqHtmlTest.ts @@ -4,7 +4,7 @@ import { after, before, context, describe, it } from '@ephox/bedrock-client'; import { setupIntegration } from '../../../main/ts/Integration'; import { createEditor, createHTML, removeTinymce } from '../Utils'; -describe.skip('Check jQuery\'s `.html()` function', () => { +describe('Check jQuery\'s `.html()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/JqPrependTest.ts b/src/test/ts/browser/JqPrependTest.ts index b8ced32..b027a47 100644 --- a/src/test/ts/browser/JqPrependTest.ts +++ b/src/test/ts/browser/JqPrependTest.ts @@ -4,7 +4,7 @@ import { after, before, context, describe, it } from '@ephox/bedrock-client'; import { setupIntegration } from '../../../main/ts/Integration'; import { createEditor, createHTML, removeTinymce } from '../Utils'; -describe.skip('Check jQuery\'s `.prepend()` function', () => { +describe('Check jQuery\'s `.prepend()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/JqRemoveTest.ts b/src/test/ts/browser/JqRemoveTest.ts index de3c400..94ec505 100644 --- a/src/test/ts/browser/JqRemoveTest.ts +++ b/src/test/ts/browser/JqRemoveTest.ts @@ -6,7 +6,7 @@ import { Editor } from 'tinymce'; import { setupIntegration } from '../../../main/ts/Integration'; import { createHTML, removeTinymce } from '../Utils'; -describe.skip('Check jQuery\'s `.remove()` function', () => { +describe('Check jQuery\'s `.remove()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/JqTextTest.ts b/src/test/ts/browser/JqTextTest.ts index f90f3fe..d9c3aea 100644 --- a/src/test/ts/browser/JqTextTest.ts +++ b/src/test/ts/browser/JqTextTest.ts @@ -4,7 +4,7 @@ import { after, before, context, describe, it } from '@ephox/bedrock-client'; import { setupIntegration } from '../../../main/ts/Integration'; import { createEditor, createHTML, removeTinymce } from '../Utils'; -describe.skip('Check jQuery\'s `.text()` function', () => { +describe('Check jQuery\'s `.text()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/JqValTest.ts b/src/test/ts/browser/JqValTest.ts index dd5bf18..0574478 100644 --- a/src/test/ts/browser/JqValTest.ts +++ b/src/test/ts/browser/JqValTest.ts @@ -4,7 +4,7 @@ import { after, before, context, describe, it } from '@ephox/bedrock-client'; import { setupIntegration } from '../../../main/ts/Integration'; import { createEditor, removeTinymce } from '../Utils'; -describe.skip('Check jQuery\'s `.val()` function', () => { +describe('Check jQuery\'s `.val()` function', () => { before(setupIntegration); after(removeTinymce); diff --git a/src/test/ts/browser/LoadTest.ts b/src/test/ts/browser/LoadTest.ts index 525f749..8cb849f 100644 --- a/src/test/ts/browser/LoadTest.ts +++ b/src/test/ts/browser/LoadTest.ts @@ -6,7 +6,7 @@ import { Arr } from '@ephox/katamari'; import { Editor } from 'tinymce'; import { removeTinymce } from '../Utils'; -describe.skip('LoadTest', () => { +describe('LoadTest', () => { let editorInstance: Editor; before(async function () { diff --git a/src/test/ts/browser/OriginalTest.ts b/src/test/ts/browser/OriginalTest.ts index 0c68a9c..f0a2720 100644 --- a/src/test/ts/browser/OriginalTest.ts +++ b/src/test/ts/browser/OriginalTest.ts @@ -6,7 +6,7 @@ import { getTinymce } from '../../../main/ts/TinyMCE'; import { setupIntegration } from 'src/main/ts/Integration'; import { removeTinymce } from '../Utils'; -describe.skip('OriginalTest', () => { +describe('OriginalTest', () => { const setup = () => { // make an SugarElement for jQuery to target const ce = SugarElement.fromTag('div');