From 74f807238fe7aba026b6ec748e3e062bf3c2ff21 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 11 Feb 2026 16:14:23 +1030 Subject: [PATCH 01/42] Add a build file for running smoke tests --- Jenkinsfile-SmokeTest | 92 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 Jenkinsfile-SmokeTest diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest new file mode 100644 index 00000000..920cecea --- /dev/null +++ b/Jenkinsfile-SmokeTest @@ -0,0 +1,92 @@ +#!groovy +@Library('waluigi@release/7') _ + +properties([ + disableConcurrentBuilds(), + buildDiscarder(logRotator( + artifactDaysToKeepStr: '', + artifactNumToKeepStr: '1', + daysToKeepStr: '', + numToKeepStr: '50' + )), + parameters([ + string(defaultValue: 'Tinymce-Angular-SmokeTest', description: 'The test directory to run', name: 'TEST_DIR', trim: false), + ]) +]) + + +def runSmokeTests(Map args = new LinkedHashMap()) { + // String stagingJwtCredentials = 'informant-staging-jwt' + // String prodJwtCredentials = 'informant-production-jwt' + + String testDir = args.test_dir ?: 'smoke' + String additionalArgs = "--chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --customRoutes src/test/json/routes.json" + + def platforms = args.platforms ?: [ + [ browser: "chrome", provider: "lambdatest" ], + // [ browser: "firefox", provider: "lambdatest" ], + // [ browser: "safari", provider: "lambdatest" ], + // [ browser: "edge", provider: "lambdatest" ] + ] + + def processes = [:] + + for (int i = 0; i < platforms.size(); i++) { + def platform = platforms.get(i) + def buckets = platform.buckets ?: 1 + + for (int bucket = 1; bucket <= buckets; bucket++) { + // clousure var - don't inline or jenkins complains + def currBucket = bucket + def suffix = currBucket == 1 ? '' : "-${currBucket}" + + if (platform.provider) { + // Run using remote provider + def name = "${platform.browser}-${platform.provider}${suffix}" + def testName = "TinyMCE-Angular-SmokeTest_${name}" + processes[name] = { + tinyPods.node { + stage("${name}") { + // withCredentials([ + // string(credentialsId: stagingJwtCredentials, variable: 'INFORMANT_STAGING_JWT_CREDS'), + // string(credentialsId: prodJwtCredentials, variable: 'INFORMANT_PRODUCTION_JWT_CREDS') + // ]) { + yarnInstall() + // Update Angular related packages + sh('yarn add @angular/animations@next@angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular/platform-browser-dynamic@next @angular/router@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next') + + // echo "Writing credentials" + // writeFile(file: "src/test/json/jwt-staging.json", text: '{"token": "' + env.INFORMANT_STAGING_JWT_CREDS + '"}', encoding: "UTF-8") + // writeFile(file: "src/test/json/jwt-production.json", text: '{"token": "' + env.INFORMANT_PRODUCTION_JWT_CREDS + '"}', encoding: "UTF-8") + bedrockTests( + name: name, + browser: platform.browser, + testDirs: [ "tinymce-angular-component/src/test/ts/browser" ], + bucket: currBucket, + buckets: buckets, + custom: customArgs + ) + } + } + } + } + } + } + } + + +timestamps { + tinyPods.node(tag: '20') { + stage("deps") { + yarnInstall(true) + } + + stage("build") { + exec("yarn build") + } + + stage("tests") { + runSmokeTests() + } + } +} From 25f4da90754603e5753b4eca6543c32dba51b0bd Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 11 Feb 2026 16:41:33 +1030 Subject: [PATCH 02/42] Install next angular version --- Jenkinsfile-SmokeTest | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 920cecea..47c3ba19 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -53,7 +53,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { // ]) { yarnInstall() // Update Angular related packages - sh('yarn add @angular/animations@next@angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular/platform-browser-dynamic@next @angular/router@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next') + // sh('yarn add @angular/animations@next@angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular/platform-browser-dynamic@next @angular/router@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next') // echo "Writing credentials" // writeFile(file: "src/test/json/jwt-staging.json", text: '{"token": "' + env.INFORMANT_STAGING_JWT_CREDS + '"}', encoding: "UTF-8") @@ -79,6 +79,8 @@ timestamps { tinyPods.node(tag: '20') { stage("deps") { yarnInstall(true) + + sh 'yarn add @angular/animations@next@angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular/platform-browser-dynamic@next @angular/router@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' } stage("build") { From fb3c060138975a56d15c78334ccab63496d1ce57 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 11 Feb 2026 16:47:44 +1030 Subject: [PATCH 03/42] Fix command --- Jenkinsfile-SmokeTest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 47c3ba19..2281796e 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -53,7 +53,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { // ]) { yarnInstall() // Update Angular related packages - // sh('yarn add @angular/animations@next@angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular/platform-browser-dynamic@next @angular/router@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next') + // sh('yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular/platform-browser-dynamic@next @angular/router@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next') // echo "Writing credentials" // writeFile(file: "src/test/json/jwt-staging.json", text: '{"token": "' + env.INFORMANT_STAGING_JWT_CREDS + '"}', encoding: "UTF-8") @@ -80,7 +80,7 @@ timestamps { stage("deps") { yarnInstall(true) - sh 'yarn add @angular/animations@next@angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular/platform-browser-dynamic@next @angular/router@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' + sh 'yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular/platform-browser-dynamic@next @angular/router@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' } stage("build") { From 934797c04f82e486ce309140cd278ed6cfef22d0 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Fri, 13 Feb 2026 13:30:51 +1030 Subject: [PATCH 04/42] Add smoketest file --- .../src/test/ts/alien/TestHelpers.ts | 4 +- .../src/test/ts/browser/LoadTinyTest.ts | 6 +-- .../ts/smoke_test/VerifyIntegrationTest.ts | 54 +++++++++++++++++++ 3 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 tinymce-angular-component/src/test/ts/smoke_test/VerifyIntegrationTest.ts diff --git a/tinymce-angular-component/src/test/ts/alien/TestHelpers.ts b/tinymce-angular-component/src/test/ts/alien/TestHelpers.ts index 8d7db947..f41e091c 100644 --- a/tinymce-angular-component/src/test/ts/alien/TestHelpers.ts +++ b/tinymce-angular-component/src/test/ts/alien/TestHelpers.ts @@ -4,12 +4,14 @@ import { ScriptLoader } from '../../../main/ts/utils/ScriptLoader'; import { Attribute, Remove, SelectorFilter, SugarElement } from '@ephox/sugar'; import { ComponentFixture } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; -import { EditorComponent } from '../../../main/ts/editor/editor.component'; +import { EditorComponent, Version } from '../../../main/ts/editor/editor.component'; import type { Editor } from 'tinymce'; import { Keyboard, Keys } from '@ephox/agar'; export const apiKey = Fun.constant('qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc'); +export const supportedTinymceVersions = Fun.constant([ '5', '6', '7', '8' ]); + export const throwTimeout = (timeoutMs: number, message: string = `Timeout ${timeoutMs}ms`) => (source: Observable) => diff --git a/tinymce-angular-component/src/test/ts/browser/LoadTinyTest.ts b/tinymce-angular-component/src/test/ts/browser/LoadTinyTest.ts index c6780ffc..9b00970e 100644 --- a/tinymce-angular-component/src/test/ts/browser/LoadTinyTest.ts +++ b/tinymce-angular-component/src/test/ts/browser/LoadTinyTest.ts @@ -8,7 +8,7 @@ import { EditorComponent, TINYMCE_SCRIPT_SRC } from '../../../main/ts/public_api import { Version } from '../../../main/ts/editor/editor.component'; import { editorHook, tinymceVersionHook } from '../alien/TestHooks'; import type { Editor } from 'tinymce'; -import { apiKey, deleteTinymce } from '../alien/TestHelpers'; +import { apiKey, deleteTinymce, supportedTinymceVersions } from '../alien/TestHelpers'; describe('LoadTinyTest', () => { const key = apiKey(); @@ -17,7 +17,7 @@ describe('LoadTinyTest', () => { Assertions.assertEq(`Loaded version of TinyMCE should be ${version}`, version, Global.tinymce.majorVersion); }; - for (const version of [ '4', '5', '6', '7', '8' ] as Version[]) { + for (const version of supportedTinymceVersions()) { context(`With local version ${version}`, () => { const createFixture = editorHook(EditorComponent, { providers: [ @@ -47,7 +47,7 @@ describe('LoadTinyTest', () => { }); } - for (const version of [ '5', '6', '7', '8' ] as Version[]) { + for (const version of supportedTinymceVersions()) { context(`With cloud version ${version}`, () => { const createFixture = editorHook(EditorComponent); diff --git a/tinymce-angular-component/src/test/ts/smoke_test/VerifyIntegrationTest.ts b/tinymce-angular-component/src/test/ts/smoke_test/VerifyIntegrationTest.ts new file mode 100644 index 00000000..99adc7f6 --- /dev/null +++ b/tinymce-angular-component/src/test/ts/smoke_test/VerifyIntegrationTest.ts @@ -0,0 +1,54 @@ +import '../alien/InitTestEnvironment'; + +import { Assertions } from '@ephox/agar'; +import { describe, it, context, before } from '@ephox/bedrock-client'; +import { Global } from '@ephox/katamari'; +import { Traverse, SugarElement, Attribute } from '@ephox/sugar'; + +import { EditorComponent, TINYMCE_SCRIPT_SRC } from '../../../main/ts/public_api'; +import { Version } from '../../../main/ts/editor/editor.component'; +import { editorHook } from '../alien/TestHooks'; +import type { Editor } from 'tinymce'; +import { deleteTinymce, supportedTinymceVersions } from '../alien/TestHelpers'; + +/* + This test requires the targeted Angular version provided via custom route +*/ +describe('VerifyIntegrationTest', () => { + interface IntegrationInfo { + version: string; + } + + const assertTinymceVersion = (version: Version, editor: Editor) => { + Assertions.assertEq(`Loaded version of TinyMCE should be ${version}`, version, editor.editorManager.majorVersion); + Assertions.assertEq(`Loaded version of TinyMCE should be ${version}`, version, Global.tinymce.majorVersion); + }; + + for (const version of supportedTinymceVersions()) { + context(`With local version ${version}`, () => { + const createFixture = editorHook(EditorComponent, { + providers: [ + { + provide: TINYMCE_SCRIPT_SRC, + useValue: `/project/node_modules/tinymce-${version}/tinymce.min.js`, + }, + ], + }); + + before(deleteTinymce); + + it('Should be able to load with the specified Angular version', async () => { + const { editor } = await createFixture(); + const integrationInfo = await window.fetch('/custom/integration/info').then((resp) => resp.json()) as IntegrationInfo; + const rootEl = editor.getContainer().parentNode as Element; + + Assertions.assertEq(`Angular version should be ${integrationInfo.version}`, + true, + Attribute.get(SugarElement.fromDom(rootEl), 'ng-version') === integrationInfo.version + ); + + assertTinymceVersion(version, editor); + }); + }); + } +}); From a5fa37947411752e5fb291247e770dbceeeea543 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Fri, 13 Feb 2026 13:54:05 +1030 Subject: [PATCH 05/42] Update the test script to run browser tests only --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 230ae438..9f7ad2ee 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "license": "MIT", "scripts": { "preinstall": "node -e \"if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('You must use Yarn to install, not NPM')\"", - "test": "yarn bedrock-auto -b chrome-headless -f tinymce-angular-component/src/test/ts/**/*Test.ts", + "test": "yarn bedrock-auto -b chrome-headless -f tinymce-angular-component/src/test/ts/browser/*Test.ts", "test-manual": "bedrock -f tinymce-angular-component/src/test/ts/**/*Test.ts", "clean": "yarn rimraf dist", "lint": "eslint tinymce-angular-component/src/**/*.ts stories/**/*.ts", From 9d34d3438027ac0532f840c119bcf197da5e52fa Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 16 Feb 2026 09:25:54 +1030 Subject: [PATCH 06/42] Add a smoke-test bash script file --- smoke-test.sh | 22 +++++++++++++++++++ .../src/test/ts/alien/TestHooks.ts | 9 ++++++-- .../VerifyIntegrationTest.ts | 8 +++---- 3 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 smoke-test.sh rename tinymce-angular-component/src/test/ts/{smoke_test => smoke-test}/VerifyIntegrationTest.ts (86%) diff --git a/smoke-test.sh b/smoke-test.sh new file mode 100644 index 00000000..59a2bb67 --- /dev/null +++ b/smoke-test.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +export NEXT_VERSION=$(npm view @angular/core@next version) +export ROUTE_FILE_PATH=version.json + +# Build the custom route file with the next Angular version to be used in the test +printf ' + [{ + "request": { + "method": "get", + "path": "/custom/integration/info" + }, + "response": { + "status": 200, + "json": { + "version": "%s" + } + } + }] +' "$NEXT_VERSION" > $ROUTE_FILE_PATH + +yarn bedrock-auto -b chrome -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --customRoutes $ROUTE_FILE_PATH \ No newline at end of file diff --git a/tinymce-angular-component/src/test/ts/alien/TestHooks.ts b/tinymce-angular-component/src/test/ts/alien/TestHooks.ts index 121dcad6..4914f2ef 100644 --- a/tinymce-angular-component/src/test/ts/alien/TestHooks.ts +++ b/tinymce-angular-component/src/test/ts/alien/TestHooks.ts @@ -1,6 +1,6 @@ import { after, before, beforeEach, context } from '@ephox/bedrock-client'; import { ComponentFixture, TestBed, TestModuleMetadata } from '@angular/core/testing'; -import { Type } from '@angular/core'; +import { Type, VERSION } from '@angular/core'; import { EditorComponent, Version } from '../../../main/ts/editor/editor.component'; import { firstValueFrom, map, switchMap, tap } from 'rxjs'; import { By } from '@angular/platform-browser'; @@ -9,6 +9,7 @@ import { VersionLoader } from '@tinymce/miniature'; import { deleteTinymce, throwTimeout } from './TestHelpers'; import { FormsModule, ReactiveFormsModule, NgModel } from '@angular/forms'; import type { Editor } from 'tinymce'; +import { Attribute, SugarElement } from '@ephox/sugar'; export const fixtureHook = (component: Type, moduleDef: TestModuleMetadata) => { before(async () => { @@ -76,8 +77,12 @@ export const editorHook = (component: Type, moduleDef: TestModul ({ editor }) => new Promise((resolve) => { editor.once('SkinLoaded', () => { + // Bake the Angular version as a data attribute on the editor container so it can be verified in the test + const container = editor.getContainer(); + Attribute.set(SugarElement.fromDom( container), 'data-framework-version', VERSION.full); + // This is a workaround to avoid a race condition occurring in tinymce 8 where licenseKeyManager is still validating the license key - // after global tinymce is removed in a clean up. Specifically, it happens when unloading/loading different versions of TinyMCE + // after global tinymce is removed in a clean up. Specifically, it happens when unloading/loading different versions of TinyMCE if (editor.licenseKeyManager) { editor.licenseKeyManager.validate({}).then(() => { resolve(editor as Editor); diff --git a/tinymce-angular-component/src/test/ts/smoke_test/VerifyIntegrationTest.ts b/tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts similarity index 86% rename from tinymce-angular-component/src/test/ts/smoke_test/VerifyIntegrationTest.ts rename to tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts index 99adc7f6..dffc8dca 100644 --- a/tinymce-angular-component/src/test/ts/smoke_test/VerifyIntegrationTest.ts +++ b/tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts @@ -3,7 +3,7 @@ import '../alien/InitTestEnvironment'; import { Assertions } from '@ephox/agar'; import { describe, it, context, before } from '@ephox/bedrock-client'; import { Global } from '@ephox/katamari'; -import { Traverse, SugarElement, Attribute } from '@ephox/sugar'; +import { SugarElement, Attribute } from '@ephox/sugar'; import { EditorComponent, TINYMCE_SCRIPT_SRC } from '../../../main/ts/public_api'; import { Version } from '../../../main/ts/editor/editor.component'; @@ -25,7 +25,7 @@ describe('VerifyIntegrationTest', () => { }; for (const version of supportedTinymceVersions()) { - context(`With local version ${version}`, () => { + context(`With local Tinymce version ${version}`, () => { const createFixture = editorHook(EditorComponent, { providers: [ { @@ -40,11 +40,11 @@ describe('VerifyIntegrationTest', () => { it('Should be able to load with the specified Angular version', async () => { const { editor } = await createFixture(); const integrationInfo = await window.fetch('/custom/integration/info').then((resp) => resp.json()) as IntegrationInfo; - const rootEl = editor.getContainer().parentNode as Element; + const container = editor.getContainer(); Assertions.assertEq(`Angular version should be ${integrationInfo.version}`, true, - Attribute.get(SugarElement.fromDom(rootEl), 'ng-version') === integrationInfo.version + Attribute.get(SugarElement.fromDom(container), 'data-framework-version') === integrationInfo.version ); assertTinymceVersion(version, editor); From 2a3b94c8836c29a443ffddbe8d161888f4aa33f6 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 16 Feb 2026 13:54:52 +1030 Subject: [PATCH 07/42] Update jenkins smoke test file --- Jenkinsfile-SmokeTest | 41 ++++++++++++++++++++++------------------- smoke-test.sh | 6 +++++- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 2281796e..819059f0 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -47,26 +47,29 @@ def runSmokeTests(Map args = new LinkedHashMap()) { processes[name] = { tinyPods.node { stage("${name}") { - // withCredentials([ - // string(credentialsId: stagingJwtCredentials, variable: 'INFORMANT_STAGING_JWT_CREDS'), - // string(credentialsId: prodJwtCredentials, variable: 'INFORMANT_PRODUCTION_JWT_CREDS') - // ]) { + bedrockRemoteTools.tinyWorkSishTunnel() + bedrockRemoteTools.withRemoteCreds(platform.provider) { yarnInstall() - // Update Angular related packages - // sh('yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular/platform-browser-dynamic@next @angular/router@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next') - - // echo "Writing credentials" - // writeFile(file: "src/test/json/jwt-staging.json", text: '{"token": "' + env.INFORMANT_STAGING_JWT_CREDS + '"}', encoding: "UTF-8") - // writeFile(file: "src/test/json/jwt-production.json", text: '{"token": "' + env.INFORMANT_PRODUCTION_JWT_CREDS + '"}', encoding: "UTF-8") - bedrockTests( - name: name, - browser: platform.browser, - testDirs: [ "tinymce-angular-component/src/test/ts/browser" ], - bucket: currBucket, - buckets: buckets, - custom: customArgs - ) - } + + def testStatus = exec(script: 'bash smoke-test.sh', returnStatus: true) + + junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' + if (testStatus == 4) { + unstable("Tests failed for ${name}") + } else if (testStatus != 0) { + error("Unexpected error running tests for ${name} so passing failure as exist code") + } + } + + // bedrockTests( + // name: name, + // browser: platform.browser, + // testDirs: [ "tinymce-angular-component/src/test/ts/browser" ], + // bucket: currBucket, + // buckets: buckets, + // custom: customArgs + // ) + // } } } } diff --git a/smoke-test.sh b/smoke-test.sh index 59a2bb67..b0bd910c 100644 --- a/smoke-test.sh +++ b/smoke-test.sh @@ -3,6 +3,10 @@ export NEXT_VERSION=$(npm view @angular/core@next version) export ROUTE_FILE_PATH=version.json +yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next + +yarn build + # Build the custom route file with the next Angular version to be used in the test printf ' [{ @@ -19,4 +23,4 @@ printf ' }] ' "$NEXT_VERSION" > $ROUTE_FILE_PATH -yarn bedrock-auto -b chrome -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --customRoutes $ROUTE_FILE_PATH \ No newline at end of file +yarn bedrock-auto -b chrome -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --customRoutes $ROUTE_FILE_PATH From 57d3098ba15ec80ba0be8df1cdb8a8485598ea55 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 16 Feb 2026 14:04:19 +1030 Subject: [PATCH 08/42] Fix jenkin errors --- Jenkinsfile-SmokeTest | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 819059f0..69722887 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -49,8 +49,6 @@ def runSmokeTests(Map args = new LinkedHashMap()) { stage("${name}") { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { - yarnInstall() - def testStatus = exec(script: 'bash smoke-test.sh', returnStatus: true) junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' @@ -76,18 +74,13 @@ def runSmokeTests(Map args = new LinkedHashMap()) { } } } +} timestamps { tinyPods.node(tag: '20') { stage("deps") { - yarnInstall(true) - - sh 'yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular/platform-browser-dynamic@next @angular/router@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' - } - - stage("build") { - exec("yarn build") + yarnInstall() } stage("tests") { From 12575f1a0fbb4663357cc107113de3f0e9745838 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 16 Feb 2026 14:14:05 +1030 Subject: [PATCH 09/42] Log messages --- Jenkinsfile-SmokeTest | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 69722887..898b2199 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -22,7 +22,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { String testDir = args.test_dir ?: 'smoke' String additionalArgs = "--chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --customRoutes src/test/json/routes.json" - def platforms = args.platforms ?: [ + def platforms = [ [ browser: "chrome", provider: "lambdatest" ], // [ browser: "firefox", provider: "lambdatest" ], // [ browser: "safari", provider: "lambdatest" ], @@ -31,7 +31,13 @@ def runSmokeTests(Map args = new LinkedHashMap()) { def processes = [:] + println platforms + println processes + + println "Beginning running tests" + for (int i = 0; i < platforms.size(); i++) { + def platform = platforms.get(i) def buckets = platform.buckets ?: 1 From da57e4bbfee0b32879d9f5cdee48faf9c0556845 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 16 Feb 2026 14:19:12 +1030 Subject: [PATCH 10/42] Add the missing parall process --- Jenkinsfile-SmokeTest | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 898b2199..f953a077 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -79,7 +79,10 @@ def runSmokeTests(Map args = new LinkedHashMap()) { } } } + } + + parallel processes } From 76f26f83478026ef293f112df53619f1d4e1389d Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 16 Feb 2026 14:44:27 +1030 Subject: [PATCH 11/42] Try firefox --- Jenkinsfile-SmokeTest | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index f953a077..940d5157 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -22,11 +22,13 @@ def runSmokeTests(Map args = new LinkedHashMap()) { String testDir = args.test_dir ?: 'smoke' String additionalArgs = "--chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --customRoutes src/test/json/routes.json" - def platforms = [ + def platforms = args.platforms ?: [ + // [ browser: "chrome", provider: "aws", buckets: 2 ], + // [ browser: "firefox", provider: "aws", buckets: 2 ], [ browser: "chrome", provider: "lambdatest" ], - // [ browser: "firefox", provider: "lambdatest" ], - // [ browser: "safari", provider: "lambdatest" ], - // [ browser: "edge", provider: "lambdatest" ] + [ browser: "firefox", provider: "lambdatest" ], + [ browser: "safari", provider: "lambdatest" ], + [ browser: "edge", provider: "lambdatest" ] ] def processes = [:] @@ -35,7 +37,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { println processes println "Beginning running tests" - + for (int i = 0; i < platforms.size(); i++) { def platform = platforms.get(i) @@ -93,7 +95,11 @@ timestamps { } stage("tests") { - runSmokeTests() + runSmokeTests( + platforms: [ + [ browser: "firefox", provider: "lambdatest" ] + ] + ) } } } From abf48b1816d9085b92250e88f8fdd329ee976178 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 16 Feb 2026 16:02:23 +1030 Subject: [PATCH 12/42] Use remote command --- Jenkinsfile-SmokeTest | 15 ++++++--------- smoke-test.sh | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 940d5157..1a7f836f 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -18,9 +18,10 @@ properties([ def runSmokeTests(Map args = new LinkedHashMap()) { // String stagingJwtCredentials = 'informant-staging-jwt' // String prodJwtCredentials = 'informant-production-jwt' + String routeFilePath = 'version.json' String testDir = args.test_dir ?: 'smoke' - String additionalArgs = "--chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --customRoutes src/test/json/routes.json" + String additionalArgs = "--chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3" def platforms = args.platforms ?: [ // [ browser: "chrome", provider: "aws", buckets: 2 ], @@ -33,11 +34,6 @@ def runSmokeTests(Map args = new LinkedHashMap()) { def processes = [:] - println platforms - println processes - - println "Beginning running tests" - for (int i = 0; i < platforms.size(); i++) { def platform = platforms.get(i) @@ -57,7 +53,8 @@ def runSmokeTests(Map args = new LinkedHashMap()) { stage("${name}") { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { - def testStatus = exec(script: 'bash smoke-test.sh', returnStatus: true) + + def testStatus = exec(script: 'bash smoke-test.sh ', returnStatus: true) junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' if (testStatus == 4) { @@ -65,8 +62,8 @@ def runSmokeTests(Map args = new LinkedHashMap()) { } else if (testStatus != 0) { error("Unexpected error running tests for ${name} so passing failure as exist code") } - } - + }` + // bedrockTests( // name: name, // browser: platform.browser, diff --git a/smoke-test.sh b/smoke-test.sh index b0bd910c..da0bdd4f 100644 --- a/smoke-test.sh +++ b/smoke-test.sh @@ -23,4 +23,4 @@ printf ' }] ' "$NEXT_VERSION" > $ROUTE_FILE_PATH -yarn bedrock-auto -b chrome -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --customRoutes $ROUTE_FILE_PATH +yarn bedrock-auto -b $1 -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes $ROUTE_FILE_PATH From e57f0c8b57bd83ab63fabeecddf51e420eca065f Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 16 Feb 2026 16:04:43 +1030 Subject: [PATCH 13/42] Fix syntax --- Jenkinsfile-SmokeTest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 1a7f836f..a2d424f8 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -62,7 +62,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { } else if (testStatus != 0) { error("Unexpected error running tests for ${name} so passing failure as exist code") } - }` + } // bedrockTests( // name: name, From 6a6c41839550c17d7f737a68316eb90b98ff2da7 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Mon, 16 Feb 2026 16:11:00 +1030 Subject: [PATCH 14/42] Add missing browser --- Jenkinsfile-SmokeTest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index a2d424f8..7bd79e9f 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -54,7 +54,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { - def testStatus = exec(script: 'bash smoke-test.sh ', returnStatus: true) + def testStatus = exec(script: "bash smoke-test.sh ${platform.browser}", returnStatus: true) junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' if (testStatus == 4) { From 095fc15313a29581d6257e343859e5cd52f81ae3 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 13:32:34 +1030 Subject: [PATCH 15/42] Move bashcript into jenkinsfile --- Jenkinsfile-SmokeTest | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 7bd79e9f..f88e24ce 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -18,7 +18,21 @@ properties([ def runSmokeTests(Map args = new LinkedHashMap()) { // String stagingJwtCredentials = 'informant-staging-jwt' // String prodJwtCredentials = 'informant-production-jwt' - String routeFilePath = 'version.json' + String customRouteFilePath = 'version.json' + String routFileContent = ''' + [{ + "request": { + "method": "get", + "path": "/custom/integration/info" + }, + "response": { + "status": 200, + "json": { + "version": "$nextVersion" + } + } + }] + ''' String testDir = args.test_dir ?: 'smoke' String additionalArgs = "--chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3" @@ -53,8 +67,15 @@ def runSmokeTests(Map args = new LinkedHashMap()) { stage("${name}") { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { + def nextVersion = sh('npm view @angular/core@next version', returnStdout: true).toString().trim() - def testStatus = exec(script: "bash smoke-test.sh ${platform.browser}", returnStatus: true) + sh ('yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next') + sh ('echo ${routFileContent} > ' + customRouteFilePath) + + sh ('cat ${customRouteFilePath}') + sh ('yarn build') + + sh ('yarn bedrock-auto -b $1 -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes $ROUTE_FILE_PATH') junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' if (testStatus == 4) { From 07e31c314d5225be5ba8508195e04eb0a7213315 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 13:40:51 +1030 Subject: [PATCH 16/42] Fix errors --- Jenkinsfile-SmokeTest | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index f88e24ce..409b583f 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -67,15 +67,15 @@ def runSmokeTests(Map args = new LinkedHashMap()) { stage("${name}") { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { - def nextVersion = sh('npm view @angular/core@next version', returnStdout: true).toString().trim() + def nextVersion = sh(script: 'npm view @angular/core@next version', returnStdout: true).toString().trim() - sh ('yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next') - sh ('echo ${routFileContent} > ' + customRouteFilePath) + sh 'yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' + sh 'echo ${routFileContent} > ${customRouteFilePath}' - sh ('cat ${customRouteFilePath}') - sh ('yarn build') + sh 'cat ${customRouteFilePath}' + sh 'yarn build' - sh ('yarn bedrock-auto -b $1 -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes $ROUTE_FILE_PATH') + sh 'yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${customRouteFilePath}' junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' if (testStatus == 4) { From 3700ef94bc7db0ecc5d00c1d76c447bafd90e417 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 13:49:52 +1030 Subject: [PATCH 17/42] More fixes --- Jenkinsfile-SmokeTest | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 409b583f..f9a3cb1d 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -19,20 +19,6 @@ def runSmokeTests(Map args = new LinkedHashMap()) { // String stagingJwtCredentials = 'informant-staging-jwt' // String prodJwtCredentials = 'informant-production-jwt' String customRouteFilePath = 'version.json' - String routFileContent = ''' - [{ - "request": { - "method": "get", - "path": "/custom/integration/info" - }, - "response": { - "status": 200, - "json": { - "version": "$nextVersion" - } - } - }] - ''' String testDir = args.test_dir ?: 'smoke' String additionalArgs = "--chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3" @@ -67,10 +53,25 @@ def runSmokeTests(Map args = new LinkedHashMap()) { stage("${name}") { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { - def nextVersion = sh(script: 'npm view @angular/core@next version', returnStdout: true).toString().trim() - + def nextVersion = sh(script: 'npm view @angular/core@next version', returnStdout: true).trim() + echo 'next version ${nextVersion}' sh 'yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' - sh 'echo ${routFileContent} > ${customRouteFilePath}' + + def routeFileContent = ''' + [{ + "request": { + "method": "get", + "path": "/custom/integration/info" + }, + "response": { + "status": 200, + "json": { + "version": "$nextVersion" + } + } + }] + ''' + sh 'echo ${routeFileContent} > ${customRouteFilePath}' sh 'cat ${customRouteFilePath}' sh 'yarn build' From 262216427fa4611894c5ad1a2a33ee281df3d800 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 14:14:52 +1030 Subject: [PATCH 18/42] Use workspace --- Jenkinsfile-SmokeTest | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index f9a3cb1d..1dda3a52 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -71,12 +71,13 @@ def runSmokeTests(Map args = new LinkedHashMap()) { } }] ''' - sh 'echo ${routeFileContent} > ${customRouteFilePath}' - sh 'cat ${customRouteFilePath}' + sh 'echo ${routeFileContent} > ${WORKSPACE}/${customRouteFilePath}' + + sh 'cat ${WORKSPACE}/${customRouteFilePath}' sh 'yarn build' - sh 'yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${customRouteFilePath}' + sh 'yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${WORKSPACE}/${customRouteFilePath}' junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' if (testStatus == 4) { From 6a5bb323e968fc8d8af024f6c8e0ca98b8f514b7 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 14:25:19 +1030 Subject: [PATCH 19/42] Use double quotes where interpolation is required --- Jenkinsfile-SmokeTest | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 1dda3a52..1ba63fc2 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -54,10 +54,10 @@ def runSmokeTests(Map args = new LinkedHashMap()) { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { def nextVersion = sh(script: 'npm view @angular/core@next version', returnStdout: true).trim() - echo 'next version ${nextVersion}' + echo "next version ${nextVersion}" sh 'yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' - def routeFileContent = ''' + def routeFileContent = """ [{ "request": { "method": "get", @@ -70,14 +70,14 @@ def runSmokeTests(Map args = new LinkedHashMap()) { } } }] - ''' + """ - sh 'echo ${routeFileContent} > ${WORKSPACE}/${customRouteFilePath}' + sh "echo ${routeFileContent} > ${WORKSPACE}/${customRouteFilePath}" - sh 'cat ${WORKSPACE}/${customRouteFilePath}' + sh "cat ${WORKSPACE}/${customRouteFilePath}" sh 'yarn build' - sh 'yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${WORKSPACE}/${customRouteFilePath}' + sh "yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${WORKSPACE}/${customRouteFilePath}" junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' if (testStatus == 4) { From b6ebd98ebb102bf0e4be95bdec343cdc64a6ce29 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 14:36:34 +1030 Subject: [PATCH 20/42] Fix string --- Jenkinsfile-SmokeTest | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 1ba63fc2..54165bb3 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -58,21 +58,21 @@ def runSmokeTests(Map args = new LinkedHashMap()) { sh 'yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' def routeFileContent = """ - [{ - "request": { - "method": "get", - "path": "/custom/integration/info" - }, - "response": { - "status": 200, - "json": { - "version": "$nextVersion" + [{ + "request": { + "method": "get", + "path": "/custom/integration/info" + }, + "response": { + "status": 200, + "json": { + "version": "${nextVersion}" + } } - } - }] + }] """ - sh "echo ${routeFileContent} > ${WORKSPACE}/${customRouteFilePath}" + sh "echo \"${routeFileContent}\" > ${WORKSPACE}/${customRouteFilePath}" sh "cat ${WORKSPACE}/${customRouteFilePath}" sh 'yarn build' From 71c5dc7d500918afdca8d4b7bf4a28a0edc4fd3e Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 14:44:32 +1030 Subject: [PATCH 21/42] Preserve double quotes in json format --- Jenkinsfile-SmokeTest | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 54165bb3..b0e9e883 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -59,14 +59,14 @@ def runSmokeTests(Map args = new LinkedHashMap()) { def routeFileContent = """ [{ - "request": { - "method": "get", - "path": "/custom/integration/info" + \"request\": { + \"method\": \"get\", + \"path\": \"/custom/integration/info\" }, - "response": { - "status": 200, - "json": { - "version": "${nextVersion}" + \"response\": { + \"status\": 200, + \"json\": { + \"version\": \"${nextVersion}\" } } }] From 7d8c46b076c529511e95c4c2520a1922eb1cf102 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 15:08:26 +1030 Subject: [PATCH 22/42] Use JSON utility functions to handle json --- Jenkinsfile-SmokeTest | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index b0e9e883..8b3612d6 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -57,22 +57,21 @@ def runSmokeTests(Map args = new LinkedHashMap()) { echo "next version ${nextVersion}" sh 'yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' - def routeFileContent = """ + def routeFileContent = readJSON text: """ [{ - \"request\": { - \"method\": \"get\", - \"path\": \"/custom/integration/info\" + "request": { + "method": "get", + "path": "/custom/integration/info" }, - \"response\": { - \"status\": 200, - \"json\": { - \"version\": \"${nextVersion}\" + "response": { + "status": 200, + "json": { + "version": "${nextVersion}" } } }] """ - - sh "echo \"${routeFileContent}\" > ${WORKSPACE}/${customRouteFilePath}" + writeJSON file: "${WORKSPACE}/${customRouteFilePath}", json: routeFileContent sh "cat ${WORKSPACE}/${customRouteFilePath}" sh 'yarn build' From 9e928ed1bd7fef897bf921238f5f505edd6d5d07 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 15:35:23 +1030 Subject: [PATCH 23/42] Enable tests on more platforms --- Jenkinsfile-SmokeTest | 48 +++++++++++++------------------------------ 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 8b3612d6..60861475 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -11,21 +11,19 @@ properties([ )), parameters([ string(defaultValue: 'Tinymce-Angular-SmokeTest', description: 'The test directory to run', name: 'TEST_DIR', trim: false), + string(defaultValue: 'next', description: 'The test directory to run', name: 'TARGET_TAG', trim: false), ]) ]) - def runSmokeTests(Map args = new LinkedHashMap()) { // String stagingJwtCredentials = 'informant-staging-jwt' // String prodJwtCredentials = 'informant-production-jwt' String customRouteFilePath = 'version.json' - String testDir = args.test_dir ?: 'smoke' - String additionalArgs = "--chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3" + // String testDir = args.test_dir ?: 'smoke' + // String additionalArgs = "--chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3" def platforms = args.platforms ?: [ - // [ browser: "chrome", provider: "aws", buckets: 2 ], - // [ browser: "firefox", provider: "aws", buckets: 2 ], [ browser: "chrome", provider: "lambdatest" ], [ browser: "firefox", provider: "lambdatest" ], [ browser: "safari", provider: "lambdatest" ], @@ -35,7 +33,6 @@ def runSmokeTests(Map args = new LinkedHashMap()) { def processes = [:] for (int i = 0; i < platforms.size(); i++) { - def platform = platforms.get(i) def buckets = platform.buckets ?: 1 @@ -47,7 +44,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { if (platform.provider) { // Run using remote provider def name = "${platform.browser}-${platform.provider}${suffix}" - def testName = "TinyMCE-Angular-SmokeTest_${name}" + // def testName = "TinyMCE-Angular-SmokeTest_${name}" processes[name] = { tinyPods.node { stage("${name}") { @@ -73,40 +70,27 @@ def runSmokeTests(Map args = new LinkedHashMap()) { """ writeJSON file: "${WORKSPACE}/${customRouteFilePath}", json: routeFileContent - sh "cat ${WORKSPACE}/${customRouteFilePath}" sh 'yarn build' - sh "yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${WORKSPACE}/${customRouteFilePath}" - - junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' - if (testStatus == 4) { - unstable("Tests failed for ${name}") - } else if (testStatus != 0) { - error("Unexpected error running tests for ${name} so passing failure as exist code") - } - } + def testStatus = exec(script: "yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${WORKSPACE}/${customRouteFilePath}", returnStatus: true) - // bedrockTests( - // name: name, - // browser: platform.browser, - // testDirs: [ "tinymce-angular-component/src/test/ts/browser" ], - // bucket: currBucket, - // buckets: buckets, - // custom: customArgs - // ) - // } + junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' + if (testStatus == 4) { + unstable("Tests failed for ${name}") + } else if (testStatus != 0) { + error("Unexpected error running tests for ${name} so passing failure as exist code") + } } } } - } + } + } } - } parallel processes } - timestamps { tinyPods.node(tag: '20') { stage("deps") { @@ -114,11 +98,7 @@ timestamps { } stage("tests") { - runSmokeTests( - platforms: [ - [ browser: "firefox", provider: "lambdatest" ] - ] - ) + runSmokeTests() } } } From 7ece6dcbe5e583853c9542fdd94b75c14cd97970 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 16:39:03 +1030 Subject: [PATCH 24/42] Reduce the number of times of installing the upcoming release --- Jenkinsfile-SmokeTest | 42 ++++++++++++++++++++---------------------- smoke-test.sh | 26 -------------------------- 2 files changed, 20 insertions(+), 48 deletions(-) delete mode 100644 smoke-test.sh diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 60861475..65abd9f5 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -16,8 +16,6 @@ properties([ ]) def runSmokeTests(Map args = new LinkedHashMap()) { - // String stagingJwtCredentials = 'informant-staging-jwt' - // String prodJwtCredentials = 'informant-production-jwt' String customRouteFilePath = 'version.json' // String testDir = args.test_dir ?: 'smoke' @@ -50,26 +48,6 @@ def runSmokeTests(Map args = new LinkedHashMap()) { stage("${name}") { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { - def nextVersion = sh(script: 'npm view @angular/core@next version', returnStdout: true).trim() - echo "next version ${nextVersion}" - sh 'yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' - - def routeFileContent = readJSON text: """ - [{ - "request": { - "method": "get", - "path": "/custom/integration/info" - }, - "response": { - "status": 200, - "json": { - "version": "${nextVersion}" - } - } - }] - """ - writeJSON file: "${WORKSPACE}/${customRouteFilePath}", json: routeFileContent - sh 'yarn build' def testStatus = exec(script: "yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${WORKSPACE}/${customRouteFilePath}", returnStatus: true) @@ -95,6 +73,26 @@ timestamps { tinyPods.node(tag: '20') { stage("deps") { yarnInstall() + def nextVersion = sh(script: 'npm view @angular/core@next version', returnStdout: true).trim() + + sh 'yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' + + def routeFileContent = readJSON text: """ + [{ + "request": { + "method": "get", + "path": "/custom/integration/info" + }, + "response": { + "status": 200, + "json": { + "version": "${nextVersion}" + } + } + }] + """ + writeJSON file: "${WORKSPACE}/${customRouteFilePath}", json: routeFileContent + } stage("tests") { diff --git a/smoke-test.sh b/smoke-test.sh deleted file mode 100644 index da0bdd4f..00000000 --- a/smoke-test.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -export NEXT_VERSION=$(npm view @angular/core@next version) -export ROUTE_FILE_PATH=version.json - -yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next - -yarn build - -# Build the custom route file with the next Angular version to be used in the test -printf ' - [{ - "request": { - "method": "get", - "path": "/custom/integration/info" - }, - "response": { - "status": 200, - "json": { - "version": "%s" - } - } - }] -' "$NEXT_VERSION" > $ROUTE_FILE_PATH - -yarn bedrock-auto -b $1 -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes $ROUTE_FILE_PATH From f589733dff909c652118dc24aa2a61ea4c094ceb Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 16:41:31 +1030 Subject: [PATCH 25/42] Fix variable not defined --- Jenkinsfile-SmokeTest | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 65abd9f5..b09c7488 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -15,12 +15,9 @@ properties([ ]) ]) -def runSmokeTests(Map args = new LinkedHashMap()) { - String customRouteFilePath = 'version.json' - - // String testDir = args.test_dir ?: 'smoke' - // String additionalArgs = "--chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3" +String customRouteFilePath = 'version.json' +def runSmokeTests(Map args = new LinkedHashMap()) { def platforms = args.platforms ?: [ [ browser: "chrome", provider: "lambdatest" ], [ browser: "firefox", provider: "lambdatest" ], @@ -92,7 +89,6 @@ timestamps { }] """ writeJSON file: "${WORKSPACE}/${customRouteFilePath}", json: routeFileContent - } stage("tests") { From 3e1d8a4dc778a568c0110793653f549233151c5a Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 16:49:38 +1030 Subject: [PATCH 26/42] Move build target --- Jenkinsfile-SmokeTest | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index b09c7488..117a8d21 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -45,8 +45,6 @@ def runSmokeTests(Map args = new LinkedHashMap()) { stage("${name}") { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { - sh 'yarn build' - def testStatus = exec(script: "yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${WORKSPACE}/${customRouteFilePath}", returnStatus: true) junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' @@ -91,6 +89,10 @@ timestamps { writeJSON file: "${WORKSPACE}/${customRouteFilePath}", json: routeFileContent } + stage("build") { + sh 'yarn build' + } + stage("tests") { runSmokeTests() } From ccec3a3c23f8046d323b080198e9cee880ded51f Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 17:00:02 +1030 Subject: [PATCH 27/42] Fix custom route file not found --- Jenkinsfile-SmokeTest | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 117a8d21..d3987a1d 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -15,9 +15,10 @@ properties([ ]) ]) -String customRouteFilePath = 'version.json' +String customRouteFilePath = "${WORKSPACE}/version.json" def runSmokeTests(Map args = new LinkedHashMap()) { + def platforms = args.platforms ?: [ [ browser: "chrome", provider: "lambdatest" ], [ browser: "firefox", provider: "lambdatest" ], @@ -45,7 +46,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { stage("${name}") { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { - def testStatus = exec(script: "yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${WORKSPACE}/${customRouteFilePath}", returnStatus: true) + def testStatus = exec(script: "yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${args.routeFile}", returnStatus: true) junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' if (testStatus == 4) { @@ -86,7 +87,7 @@ timestamps { } }] """ - writeJSON file: "${WORKSPACE}/${customRouteFilePath}", json: routeFileContent + writeJSON file: "${customRouteFilePath}", json: routeFileContent } stage("build") { @@ -94,7 +95,7 @@ timestamps { } stage("tests") { - runSmokeTests() + runSmokeTests(routeFile: customRouteFilePath) } } } From 709c5b342627c109760ab03360faea90fb58fe11 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 17:02:45 +1030 Subject: [PATCH 28/42] Fix workspace error --- Jenkinsfile-SmokeTest | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index d3987a1d..6f7c1ad1 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -15,8 +15,6 @@ properties([ ]) ]) -String customRouteFilePath = "${WORKSPACE}/version.json" - def runSmokeTests(Map args = new LinkedHashMap()) { def platforms = args.platforms ?: [ @@ -68,7 +66,10 @@ def runSmokeTests(Map args = new LinkedHashMap()) { timestamps { tinyPods.node(tag: '20') { stage("deps") { + String customRouteFilePath = "${WORKSPACE}/version.json" + yarnInstall() + def nextVersion = sh(script: 'npm view @angular/core@next version', returnStdout: true).trim() sh 'yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' From daa19e3f9fb3944cf2aa03f59ffe2ea1717608b5 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 17:32:58 +1030 Subject: [PATCH 29/42] try again --- Jenkinsfile-SmokeTest | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 6f7c1ad1..6b7aaa04 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -65,8 +65,9 @@ def runSmokeTests(Map args = new LinkedHashMap()) { timestamps { tinyPods.node(tag: '20') { + def customRouteFilePath = "${WORKSPACE}/version.json" + stage("deps") { - String customRouteFilePath = "${WORKSPACE}/version.json" yarnInstall() From c8aa14b6aaf065c564dc20e0e59e52672b1f286b Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Wed, 18 Feb 2026 18:17:06 +1030 Subject: [PATCH 30/42] Install dependencies on each browser test --- Jenkinsfile-SmokeTest | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 6b7aaa04..14643bb6 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -44,7 +44,10 @@ def runSmokeTests(Map args = new LinkedHashMap()) { stage("${name}") { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { - def testStatus = exec(script: "yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${args.routeFile}", returnStatus: true) + yarnInstall() + + def testStatus = exec(script: "yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/**/*Test.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${args.routeFile}", returnStatus: true) + junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' if (testStatus == 4) { From 1d9b70e4601ea4388a402913a48fe6d3ab8a14bf Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 19 Feb 2026 08:31:47 +1030 Subject: [PATCH 31/42] Revert previous changes --- Jenkinsfile-SmokeTest | 51 +++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 14643bb6..efdf5827 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -44,10 +44,28 @@ def runSmokeTests(Map args = new LinkedHashMap()) { stage("${name}") { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { - yarnInstall() - - def testStatus = exec(script: "yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/**/*Test.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${args.routeFile}", returnStatus: true) - + // Create custom route file to contain the next version of Angular to test against + def customRouteFilePath = "${WORKSPACE}/version.json" + def nextVersion = sh(script: 'npm view @angular/core@next version', returnStdout: true).trim() + def routeFileContent = readJSON text: """ + [{ + "request": { + "method": "get", + "path": "/custom/integration/info" + }, + "response": { + "status": 200, + "json": { + "version": "${nextVersion}" + } + } + }] + """ + writeJSON file: "${customRouteFilePath}", json: routeFileContent + + sh 'yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' + + def testStatus = exec(script: "yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/**/*Test.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${customRouteFilePath}", returnStatus: true) junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' if (testStatus == 4) { @@ -68,31 +86,8 @@ def runSmokeTests(Map args = new LinkedHashMap()) { timestamps { tinyPods.node(tag: '20') { - def customRouteFilePath = "${WORKSPACE}/version.json" - stage("deps") { - yarnInstall() - - def nextVersion = sh(script: 'npm view @angular/core@next version', returnStdout: true).trim() - - sh 'yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' - - def routeFileContent = readJSON text: """ - [{ - "request": { - "method": "get", - "path": "/custom/integration/info" - }, - "response": { - "status": 200, - "json": { - "version": "${nextVersion}" - } - } - }] - """ - writeJSON file: "${customRouteFilePath}", json: routeFileContent } stage("build") { @@ -100,7 +95,7 @@ timestamps { } stage("tests") { - runSmokeTests(routeFile: customRouteFilePath) + runSmokeTests() } } } From 9cd6a37a88ffd05248ded36b4470a8b9f9cb0ce6 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 19 Feb 2026 10:37:22 +1030 Subject: [PATCH 32/42] Refactor --- Jenkinsfile-SmokeTest | 113 ++++++++++++++++++++++++++++++------------ 1 file changed, 80 insertions(+), 33 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index efdf5827..8bbf7175 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -10,13 +10,51 @@ properties([ numToKeepStr: '50' )), parameters([ - string(defaultValue: 'Tinymce-Angular-SmokeTest', description: 'The test directory to run', name: 'TEST_DIR', trim: false), - string(defaultValue: 'next', description: 'The test directory to run', name: 'TARGET_TAG', trim: false), + string(defaultValue: 'next', description: 'The NPM publish tag ', name: 'NPM_TAG', trim: false), ]) ]) -def runSmokeTests(Map args = new LinkedHashMap()) { +// Generates a custom route file that contains the next version of Angular to test against +def generateNPMVersionRouteFile(Map args = new LinkedHashMap()) { + def customRouteFilePath = "${WORKSPACE}/version.json" + // @angular/core's version is the one baked into the angular app + def nextVersion = sh(script: "npm view @angular/core@${args.npm_tag} version", returnStdout: true).trim() + def routeFileContent = readJSON text: """ + [{ + "request": { + "method": "get", + "path": "/custom/integration/info" + }, + "response": { + "status": 200, + "json": { + "version": "${nextVersion}" + } + } + }] + """ + writeJSON file: "${customRouteFilePath}", json: routeFileContent + return customRouteFilePath +} +// Updates the Angular dependencies to the version specified by the npm tag +def updateDependenciesWithTag(Map args = new LinkedHashMap()) { + String npm_tag = args.npm_tag + sh """ + yarn add @angular/core@${npm_tag} + @angular/animations@${npm_tag} + @angular/common@${npm_tag} + @angular/compiler@${npm_tag} + @angular/core@${npm_tag} + @angular/forms@${npm_tag} + @angular/platform-browser@${npm_tag} + @angular-devkit/build-angular@${npm_tag} + @angular/cli@${npm_tag} + @angular/compiler-cli@${npm_tag} + """ +} + +def runSmokeTests(Map args = new LinkedHashMap()) { def platforms = args.platforms ?: [ [ browser: "chrome", provider: "lambdatest" ], [ browser: "firefox", provider: "lambdatest" ], @@ -35,48 +73,57 @@ def runSmokeTests(Map args = new LinkedHashMap()) { def currBucket = bucket def suffix = currBucket == 1 ? '' : "-${currBucket}" + // Run using remote provider if (platform.provider) { - // Run using remote provider def name = "${platform.browser}-${platform.provider}${suffix}" - // def testName = "TinyMCE-Angular-SmokeTest_${name}" processes[name] = { tinyPods.node { stage("${name}") { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { // Create custom route file to contain the next version of Angular to test against - def customRouteFilePath = "${WORKSPACE}/version.json" - def nextVersion = sh(script: 'npm view @angular/core@next version', returnStdout: true).trim() - def routeFileContent = readJSON text: """ - [{ - "request": { - "method": "get", - "path": "/custom/integration/info" - }, - "response": { - "status": 200, - "json": { - "version": "${nextVersion}" - } - } - }] - """ - writeJSON file: "${customRouteFilePath}", json: routeFileContent - - sh 'yarn add @angular/animations@next @angular/common@next @angular/compiler@next @angular/core@next @angular/forms@next @angular/platform-browser@next @angular-devkit/build-angular@next @angular/cli@next @angular/compiler-cli@next' - - def testStatus = exec(script: "yarn bedrock-auto -b ${platform.browser} -f tinymce-angular-component/src/test/ts/**/*Test.ts --chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --remote lambdatest --customRoutes ${customRouteFilePath}", returnStatus: true) - - junit allowEmptyResults: true, testResults: 'scratch/TEST-*.xml' - if (testStatus == 4) { - unstable("Tests failed for ${name}") - } else if (testStatus != 0) { - error("Unexpected error running tests for ${name} so passing failure as exist code") + String customRouteFilePath = generateNPMVersionRouteFile(npm_tag: args.npm_tag) + String customArgs = additionalArgs + " --remote ${platform.provider}" + if (platform.provider == "aws") { + customArgs = customArgs + " --sishDomain \"sish.osu.tiny.work\"" + } + if (platform.os) { + customArgs = customArgs + " --platformName \"${platform.os}\"" } + + updateDependenciesWithTag(npm_tag: args.npm_tag) + bedrockTests( + name: name, + browser: platform.browser, + testDirs: [ "src/test/ts/" ], + bucket: currBucket, + buckets: buckets, + custom: customArgs + " --customRoutes ${customRouteFilePath}" + ) } } } } + } else { + // Headless code in case is needed + def name = "headless-${platform.browser}${suffix}" + processes[name] = { + tinyPods.nodeBrowser(browser: platform.browser) { + stage("${name}") { + yarnInstall() + def customRouteFilePath = generateNPMVersionRouteFile(npm_tag: args.npm_tag) + + bedrockTests( + name: name, + browser: platform.browser, + testDirs: [ "src/test/ts/browser/" ], + bucket: currBucket, + buckets: buckets, + custom: additionalArgs + " --useSelenium --customRoutes ${customRouteFilePath}" + ) + } + } + } } } } @@ -95,7 +142,7 @@ timestamps { } stage("tests") { - runSmokeTests() + runSmokeTests(npm_tag: params.NPM_TAG) } } } From 941ecd9aa0ad96709b16cc1222ae7a9f735193c8 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 19 Feb 2026 10:40:09 +1030 Subject: [PATCH 33/42] Default NPM_TAG param --- Jenkinsfile-SmokeTest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 8bbf7175..c2d96264 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -142,7 +142,7 @@ timestamps { } stage("tests") { - runSmokeTests(npm_tag: params.NPM_TAG) + runSmokeTests(npm_tag: params.NPM_TAG ?: 'latest') } } } From 3b42bbac6c8aa830b700b603e25b3ff423f3626a Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 19 Feb 2026 10:50:19 +1030 Subject: [PATCH 34/42] Again --- Jenkinsfile-SmokeTest | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index c2d96264..ad6a12c5 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -16,7 +16,6 @@ properties([ // Generates a custom route file that contains the next version of Angular to test against def generateNPMVersionRouteFile(Map args = new LinkedHashMap()) { - def customRouteFilePath = "${WORKSPACE}/version.json" // @angular/core's version is the one baked into the angular app def nextVersion = sh(script: "npm view @angular/core@${args.npm_tag} version", returnStdout: true).trim() def routeFileContent = readJSON text: """ @@ -33,8 +32,7 @@ def generateNPMVersionRouteFile(Map args = new LinkedHashMap()) { } }] """ - writeJSON file: "${customRouteFilePath}", json: routeFileContent - return customRouteFilePath + writeJSON file: "${args.filePath}", json: routeFileContent } // Updates the Angular dependencies to the version specified by the npm tag @@ -61,6 +59,8 @@ def runSmokeTests(Map args = new LinkedHashMap()) { [ browser: "safari", provider: "lambdatest" ], [ browser: "edge", provider: "lambdatest" ] ] + String customRouteFilePath = "${WORKSPACE}/version.json" + String additionalArgs = "--chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --customRoutes ${customRouteFilePath}" def processes = [:] @@ -81,8 +81,6 @@ def runSmokeTests(Map args = new LinkedHashMap()) { stage("${name}") { bedrockRemoteTools.tinyWorkSishTunnel() bedrockRemoteTools.withRemoteCreds(platform.provider) { - // Create custom route file to contain the next version of Angular to test against - String customRouteFilePath = generateNPMVersionRouteFile(npm_tag: args.npm_tag) String customArgs = additionalArgs + " --remote ${platform.provider}" if (platform.provider == "aws") { customArgs = customArgs + " --sishDomain \"sish.osu.tiny.work\"" @@ -91,6 +89,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { customArgs = customArgs + " --platformName \"${platform.os}\"" } + generateNPMVersionRouteFile(npm_tag: args.npm_tag, filePath: customRouteFilePath) updateDependenciesWithTag(npm_tag: args.npm_tag) bedrockTests( name: name, @@ -98,7 +97,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { testDirs: [ "src/test/ts/" ], bucket: currBucket, buckets: buckets, - custom: customArgs + " --customRoutes ${customRouteFilePath}" + custom: customArgs ) } } @@ -110,16 +109,15 @@ def runSmokeTests(Map args = new LinkedHashMap()) { processes[name] = { tinyPods.nodeBrowser(browser: platform.browser) { stage("${name}") { - yarnInstall() - def customRouteFilePath = generateNPMVersionRouteFile(npm_tag: args.npm_tag) - + generateNPMVersionRouteFile(npm_tag: args.npm_tag, filePath: customRouteFilePath) + updateDependenciesWithTag(npm_tag: args.npm_tag) bedrockTests( name: name, browser: platform.browser, testDirs: [ "src/test/ts/browser/" ], bucket: currBucket, buckets: buckets, - custom: additionalArgs + " --useSelenium --customRoutes ${customRouteFilePath}" + custom: additionalArgs + " --useSelenium" ) } } From 90d3e0a2db68afa1a5eb67df12e5a61a7a049f5c Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 19 Feb 2026 10:59:40 +1030 Subject: [PATCH 35/42] more changes --- Jenkinsfile-SmokeTest | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index ad6a12c5..039ed574 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -38,18 +38,7 @@ def generateNPMVersionRouteFile(Map args = new LinkedHashMap()) { // Updates the Angular dependencies to the version specified by the npm tag def updateDependenciesWithTag(Map args = new LinkedHashMap()) { String npm_tag = args.npm_tag - sh """ - yarn add @angular/core@${npm_tag} - @angular/animations@${npm_tag} - @angular/common@${npm_tag} - @angular/compiler@${npm_tag} - @angular/core@${npm_tag} - @angular/forms@${npm_tag} - @angular/platform-browser@${npm_tag} - @angular-devkit/build-angular@${npm_tag} - @angular/cli@${npm_tag} - @angular/compiler-cli@${npm_tag} - """ + sh "yarn add @angular/core@${npm_tag} @angular/animations@${npm_tag} @angular/common@${npm_tag} @angular/compiler@${npm_tag} @angular/core@${npm_tag} @angular/forms@${npm_tag} @angular/platform-browser@${npm_tag} @angular-devkit/build-angular@${npm_tag} @angular/cli@${npm_tag} @angular/compiler-cli@${npm_tag}" } def runSmokeTests(Map args = new LinkedHashMap()) { @@ -114,7 +103,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { bedrockTests( name: name, browser: platform.browser, - testDirs: [ "src/test/ts/browser/" ], + testDirs: [ "src/test/ts" ], bucket: currBucket, buckets: buckets, custom: additionalArgs + " --useSelenium" From 7aef68b7bcf575b1709e15be778f0439602a0f4a Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 19 Feb 2026 11:12:53 +1030 Subject: [PATCH 36/42] Fix test directory not found --- Jenkinsfile-SmokeTest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 039ed574..75fd4c17 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -83,7 +83,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { bedrockTests( name: name, browser: platform.browser, - testDirs: [ "src/test/ts/" ], + testDirs: [ "tinymce-angular-component/src/test/ts" ], bucket: currBucket, buckets: buckets, custom: customArgs @@ -103,7 +103,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { bedrockTests( name: name, browser: platform.browser, - testDirs: [ "src/test/ts" ], + testDirs: [ "tinymce-angular-component/src/test/ts" ], bucket: currBucket, buckets: buckets, custom: additionalArgs + " --useSelenium" From 9665a0f2d0e01d9ac79e9b64a2dfba3046ed2896 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 19 Feb 2026 11:26:57 +1030 Subject: [PATCH 37/42] Echo the target framework version --- Jenkinsfile-SmokeTest | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 75fd4c17..d2fd9b87 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -18,6 +18,9 @@ properties([ def generateNPMVersionRouteFile(Map args = new LinkedHashMap()) { // @angular/core's version is the one baked into the angular app def nextVersion = sh(script: "npm view @angular/core@${args.npm_tag} version", returnStdout: true).trim() + + echo "Target framework version: ${nextVersion}" + def routeFileContent = readJSON text: """ [{ "request": { From c32332dca06043b71b5cd745f53b0d2b5a787ead Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 19 Feb 2026 11:31:21 +1030 Subject: [PATCH 38/42] Clean up --- Jenkinsfile-SmokeTest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index d2fd9b87..981d5140 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -122,7 +122,7 @@ def runSmokeTests(Map args = new LinkedHashMap()) { } timestamps { - tinyPods.node(tag: '20') { + tinyPods.node() { stage("deps") { yarnInstall() } From 5d9eaac16cd44c860ddc68b6f5e42154f38a3490 Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 19 Feb 2026 11:48:03 +1030 Subject: [PATCH 39/42] Fix lint errors --- tinymce-angular-component/src/test/ts/alien/TestHooks.ts | 2 +- .../src/test/ts/smoke-test/VerifyIntegrationTest.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tinymce-angular-component/src/test/ts/alien/TestHooks.ts b/tinymce-angular-component/src/test/ts/alien/TestHooks.ts index 4914f2ef..262e5e57 100644 --- a/tinymce-angular-component/src/test/ts/alien/TestHooks.ts +++ b/tinymce-angular-component/src/test/ts/alien/TestHooks.ts @@ -70,7 +70,7 @@ export const editorHook = (component: Type, moduleDef: TestModul fixture.detectChanges(); return firstValueFrom( - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + editorComponent.onInit.pipe( throwTimeout(10000, `Timed out waiting for editor to load`), switchMap( diff --git a/tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts b/tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts index dffc8dca..235222b2 100644 --- a/tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts +++ b/tinymce-angular-component/src/test/ts/smoke-test/VerifyIntegrationTest.ts @@ -23,7 +23,7 @@ describe('VerifyIntegrationTest', () => { Assertions.assertEq(`Loaded version of TinyMCE should be ${version}`, version, editor.editorManager.majorVersion); Assertions.assertEq(`Loaded version of TinyMCE should be ${version}`, version, Global.tinymce.majorVersion); }; - + for (const version of supportedTinymceVersions()) { context(`With local Tinymce version ${version}`, () => { const createFixture = editorHook(EditorComponent, { @@ -42,7 +42,7 @@ describe('VerifyIntegrationTest', () => { const integrationInfo = await window.fetch('/custom/integration/info').then((resp) => resp.json()) as IntegrationInfo; const container = editor.getContainer(); - Assertions.assertEq(`Angular version should be ${integrationInfo.version}`, + Assertions.assertEq(`Angular version should be ${integrationInfo.version}`, true, Attribute.get(SugarElement.fromDom(container), 'data-framework-version') === integrationInfo.version ); From 66111d06c3ab68f83e00a43e308d556c522e844a Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 19 Feb 2026 13:54:11 +1030 Subject: [PATCH 40/42] Stop running a node inside another node --- Jenkinsfile-SmokeTest | 2 -- 1 file changed, 2 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 981d5140..3c2d9f9c 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -122,7 +122,6 @@ def runSmokeTests(Map args = new LinkedHashMap()) { } timestamps { - tinyPods.node() { stage("deps") { yarnInstall() } @@ -134,5 +133,4 @@ timestamps { stage("tests") { runSmokeTests(npm_tag: params.NPM_TAG ?: 'latest') } - } } From 439dd7cfb198a181507f3829b1c469a5437385ca Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 19 Feb 2026 14:19:34 +1030 Subject: [PATCH 41/42] More improvements --- Jenkinsfile-SmokeTest | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 3c2d9f9c..135b46d1 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -46,10 +46,7 @@ def updateDependenciesWithTag(Map args = new LinkedHashMap()) { def runSmokeTests(Map args = new LinkedHashMap()) { def platforms = args.platforms ?: [ - [ browser: "chrome", provider: "lambdatest" ], - [ browser: "firefox", provider: "lambdatest" ], - [ browser: "safari", provider: "lambdatest" ], - [ browser: "edge", provider: "lambdatest" ] + [ browser: "chrome", provider: "lambdatest" ] ] String customRouteFilePath = "${WORKSPACE}/version.json" String additionalArgs = "--chunk 20 --totalTimeout 1800000 --singleTimeout 90000 --retries 3 --customRoutes ${customRouteFilePath}" @@ -122,15 +119,15 @@ def runSmokeTests(Map args = new LinkedHashMap()) { } timestamps { - stage("deps") { - yarnInstall() - } + stage('deps') { + yarnInstall() + } - stage("build") { - sh 'yarn build' - } + stage('build') { + sh 'yarn build' + } - stage("tests") { - runSmokeTests(npm_tag: params.NPM_TAG ?: 'latest') - } + stage('tests') { + runSmokeTests(npm_tag: params.NPM_TAG ?: 'latest') + } } From 4f618ddae2732ad311841d8b53ab2076f1e2de6b Mon Sep 17 00:00:00 2001 From: Ben Tran Date: Thu, 19 Feb 2026 14:37:42 +1030 Subject: [PATCH 42/42] Fix node context issue --- Jenkinsfile-SmokeTest | 78 +++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/Jenkinsfile-SmokeTest b/Jenkinsfile-SmokeTest index 135b46d1..b5677c09 100644 --- a/Jenkinsfile-SmokeTest +++ b/Jenkinsfile-SmokeTest @@ -66,38 +66,17 @@ def runSmokeTests(Map args = new LinkedHashMap()) { if (platform.provider) { def name = "${platform.browser}-${platform.provider}${suffix}" processes[name] = { - tinyPods.node { - stage("${name}") { - bedrockRemoteTools.tinyWorkSishTunnel() - bedrockRemoteTools.withRemoteCreds(platform.provider) { - String customArgs = additionalArgs + " --remote ${platform.provider}" - if (platform.provider == "aws") { - customArgs = customArgs + " --sishDomain \"sish.osu.tiny.work\"" - } - if (platform.os) { - customArgs = customArgs + " --platformName \"${platform.os}\"" - } - - generateNPMVersionRouteFile(npm_tag: args.npm_tag, filePath: customRouteFilePath) - updateDependenciesWithTag(npm_tag: args.npm_tag) - bedrockTests( - name: name, - browser: platform.browser, - testDirs: [ "tinymce-angular-component/src/test/ts" ], - bucket: currBucket, - buckets: buckets, - custom: customArgs - ) + stage("${name}") { + bedrockRemoteTools.tinyWorkSishTunnel() + bedrockRemoteTools.withRemoteCreds(platform.provider) { + String customArgs = additionalArgs + " --remote ${platform.provider}" + if (platform.provider == "aws") { + customArgs = customArgs + " --sishDomain \"sish.osu.tiny.work\"" } - } - } - } - } else { - // Headless code in case is needed - def name = "headless-${platform.browser}${suffix}" - processes[name] = { - tinyPods.nodeBrowser(browser: platform.browser) { - stage("${name}") { + if (platform.os) { + customArgs = customArgs + " --platformName \"${platform.os}\"" + } + generateNPMVersionRouteFile(npm_tag: args.npm_tag, filePath: customRouteFilePath) updateDependenciesWithTag(npm_tag: args.npm_tag) bedrockTests( @@ -106,11 +85,28 @@ def runSmokeTests(Map args = new LinkedHashMap()) { testDirs: [ "tinymce-angular-component/src/test/ts" ], bucket: currBucket, buckets: buckets, - custom: additionalArgs + " --useSelenium" + custom: customArgs ) } } } + } else { + // Headless code in case is needed + def name = "headless-${platform.browser}${suffix}" + processes[name] = { + stage("${name}") { + generateNPMVersionRouteFile(npm_tag: args.npm_tag, filePath: customRouteFilePath) + updateDependenciesWithTag(npm_tag: args.npm_tag) + bedrockTests( + name: name, + browser: platform.browser, + testDirs: [ "tinymce-angular-component/src/test/ts" ], + bucket: currBucket, + buckets: buckets, + custom: additionalArgs + " --useSelenium" + ) + } + } } } } @@ -119,15 +115,17 @@ def runSmokeTests(Map args = new LinkedHashMap()) { } timestamps { - stage('deps') { - yarnInstall() - } + tinyPods.node() { + stage('deps') { + yarnInstall() + } - stage('build') { - sh 'yarn build' - } + stage('build') { + sh 'yarn build' + } - stage('tests') { - runSmokeTests(npm_tag: params.NPM_TAG ?: 'latest') + stage('tests') { + runSmokeTests(npm_tag: params.NPM_TAG ?: 'latest') + } } }