Skip to content

Commit

Permalink
Merge pull request #405 from tinymce/feature/TINY-10569
Browse files Browse the repository at this point in the history
TINY-10569: Update bedrock for remote testing
  • Loading branch information
ArvinJ-H authored Apr 15, 2024
2 parents e87883d + 7b706fe commit 7508308
Show file tree
Hide file tree
Showing 4 changed files with 2,297 additions and 514 deletions.
14 changes: 9 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!groovy
@Library('waluigi@release/7') _

beehiveFlowBuild(
test: {
bedrockBrowsers(testDirs: [ "src/test/ts/atomic", "src/test/ts/browser" ])
},
mixedBeehiveFlow(
testPrefix: 'Tiny-Vue',
testDirs: [ "src/test/ts/atomic", "src/test/ts/browser" ],
platforms: [
[ browser: 'chrome', headless: true ],
[ browser: 'firefox', provider: 'aws' ],
[ browser: 'safari', provider: 'lambdatest' ]
],
customSteps: {
stage("update storybook") {
def status = beehiveFlowStatus()
Expand All @@ -17,4 +21,4 @@ beehiveFlowBuild(
}
}
}
)
)
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"devDependencies": {
"@babel/core": "^7.20.2",
"@ephox/agar": "^7.2.1",
"@ephox/bedrock-client": "^13.0.0",
"@ephox/bedrock-server": "^13.3.0",
"@ephox/bedrock-client": "^14.1.1",
"@ephox/bedrock-server": "^14.1.2",
"@ephox/katamari": "^9.1.1",
"@ephox/sugar": "^9.1.1",
"@storybook/addon-actions": "^6.5.13",
Expand Down Expand Up @@ -71,6 +71,7 @@
"tinymce-4": "npm:tinymce@^4",
"tinymce-5": "npm:tinymce@^5",
"tinymce-6": "npm:tinymce@^6",
"tinymce-7": "npm:tinymce@^7",
"ts-loader": "^9.4.1",
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^3.5.2",
Expand Down
33 changes: 30 additions & 3 deletions src/test/ts/browser/LoadTinyTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,24 @@ UnitTest.asynctest('LoadTinyTest', (success, failure) => {
Arr.each(elements, Remove.remove);
});

const cAssertTinymceVersion = (version: '4' | '5' | '6') => Chain.op(() => {
const cAssertTinymceVersion = (version: '4' | '5' | '6' | '7') => Chain.op(() => {
Assertions.assertEq(`Loaded version of TinyMCE should be ${version}`, version, Global.tinymce.majorVersion);
});

Pipeline.async({}, [
Log.chainsAsStep('Should be able to load local version of TinyMCE using the tinymceScriptSrc prop', '', [
cDeleteTinymce,

cRender({}, `
<editor
:init="init"
tinymce-script-src="/project/node_modules/tinymce-7/tinymce.min.js"
></editor>
`),
cAssertTinymceVersion('7'),
cRemove,
cDeleteTinymce,

cRender({}, `
<editor
:init="init"
Expand Down Expand Up @@ -67,14 +77,31 @@ UnitTest.asynctest('LoadTinyTest', (success, failure) => {
<editor
:init="init"
api-key="a-fake-api-key"
cloud-channel="6-dev"
cloud-channel="7-stable"
></editor>
`),
cAssertTinymceVersion('7'),
Chain.op(() => {
Assertions.assertEq(
'TinyMCE should have been loaded from Cloud',
'https://cdn.tiny.cloud/1/a-fake-api-key/tinymce/7-stable',
Global.tinymce.baseURI.source
);
}),
cRemove,
cDeleteTinymce,
cRender({}, `
<editor
:init="init"
api-key="a-fake-api-key"
cloud-channel="6-stable"
></editor>
`),
cAssertTinymceVersion('6'),
Chain.op(() => {
Assertions.assertEq(
'TinyMCE should have been loaded from Cloud',
'https://cdn.tiny.cloud/1/a-fake-api-key/tinymce/6-dev',
'https://cdn.tiny.cloud/1/a-fake-api-key/tinymce/6-stable',
Global.tinymce.baseURI.source
);
}),
Expand Down
Loading

0 comments on commit 7508308

Please sign in to comment.