From 3440cf430bf6a881051cc93608c8a8f84ff70605 Mon Sep 17 00:00:00 2001 From: yyc-git <395976266@qq.com> Date: Sun, 18 Feb 2024 17:04:42 +0800 Subject: [PATCH] fix(platform): element assemble: fix custom: now if new name exist, warn and not dispatch --- doc/1.3.0.org | 4 +- .../utils/CustomCodeEditUtils.res | 20 +- .../external_layer/ui/app/components/App.res | 1 + .../assemble_space/AssembleSpaceType.res | 4 +- .../test/features/customInputCodeEdit.feature | 8 +- .../contributes.steps.bs.js.snap | 67 + .../elementVisual.steps.bs.js.snap | 18 + .../extensionInspector.steps.bs.js.snap | 3 + .../__snapshots__/extensions.steps.bs.js.snap | 67 + .../fix_assembleSpace_bug.steps.bs.js.snap | 67 + .../__snapshots__/publish.steps.bs.js.snap | 16 + ...unElementVisualController.steps.bs.js.snap | 31 + .../selectedContributes.steps.bs.js.snap | 204 ++ .../selectedExtensions.steps.bs.js.snap | 204 ++ .../uiControlInspector.steps.bs.js.snap | 2856 +++++++++++++++++ .../__snapshots__/uiControls.steps.bs.js.snap | 135 + .../customInputCodeEdit.steps.res | 62 + .../package_contributes.steps.bs.js.snap | 67 + ...ackage_extensionInspector.steps.bs.js.snap | 51 + ...ckage_selectedContributes.steps.bs.js.snap | 204 ++ ...ackage_selectedExtensions.steps.bs.js.snap | 204 ++ .../publish_package.steps.bs.js.snap | 16 + platform/frontend/test/tool/ServiceTool.res | 2 + 23 files changed, 4305 insertions(+), 6 deletions(-) create mode 100644 platform/frontend/test/step-definitions/__snapshots__/contributes.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/__snapshots__/elementVisual.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/__snapshots__/extensionInspector.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/__snapshots__/extensions.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/__snapshots__/fix_assembleSpace_bug.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/__snapshots__/publish.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/__snapshots__/runElementVisualController.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/__snapshots__/selectedContributes.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/__snapshots__/selectedExtensions.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/__snapshots__/uiControlInspector.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/__snapshots__/uiControls.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/package/__snapshots__/package_contributes.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/package/__snapshots__/package_extensionInspector.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/package/__snapshots__/package_selectedContributes.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/package/__snapshots__/package_selectedExtensions.steps.bs.js.snap create mode 100644 platform/frontend/test/step-definitions/package/__snapshots__/publish_package.steps.bs.js.snap diff --git a/doc/1.3.0.org b/doc/1.3.0.org index aba64bb6b..f66016eac 100755 --- a/doc/1.3.0.org +++ b/doc/1.3.0.org @@ -749,11 +749,11 @@ TODO update: # TODO editor loop will increase -* TODO perf(editor): optimize editor loading +# * TODO perf(editor): optimize editor loading -* TODO fix(platform): create input->set name to exist name->change name to other name: will create dupliate one +* DONE fix(platform): create input->set name to exist name->change name to other name: will create dupliate one * TODO perf(platform): code edit: if change code, not create monaco diff --git a/platform/frontend/src/external_layer/ui/app/assemble_space/components/element_assemble/utils/CustomCodeEditUtils.res b/platform/frontend/src/external_layer/ui/app/assemble_space/components/element_assemble/utils/CustomCodeEditUtils.res index 1d1d20355..a29a51bd6 100755 --- a/platform/frontend/src/external_layer/ui/app/assemble_space/components/element_assemble/utils/CustomCodeEditUtils.res +++ b/platform/frontend/src/external_layer/ui/app/assemble_space/components/element_assemble/utils/CustomCodeEditUtils.res @@ -3,7 +3,16 @@ open Antd open AssembleSpaceType module Method = { + let _isNameExist = (name, customs) => { + customs + ->Meta3dCommonlib.ListSt.find((custom: CommonType.custom) => { + custom.name == name + }) + ->Meta3dCommonlib.OptionSt.isSome + } + let getNewCode = ( + service: service, dispatch, getNameFunc, setCurrentCustomNameToGlobalFunc, @@ -11,14 +20,19 @@ module Method = { name, newOriginCode, newTranspiledCode, + customs, ) => { let newTranspiledCode = newTranspiledCode->CodeEditUtils.convertTranspliedCodeToUMDCode let newName = newTranspiledCode->getNameFunc->Meta3dCommonlib.OptionSt.getWithDefault(name) - setCurrentCustomNameToGlobalFunc(newName) + _isNameExist(newName, customs) + ? service.console.warn(. {j`name:${newName}已经存在,请换个name`}, None) + : { + setCurrentCustomNameToGlobalFunc(newName) - dispatch(buildUpdateActionFunc(name, newName, newOriginCode, newTranspiledCode->Some)) + dispatch(buildUpdateActionFunc(name, newName, newOriginCode, newTranspiledCode->Some)) + } } let getCode = (name, customs) => { @@ -61,6 +75,7 @@ let make = ( code={code} getNewCodeFunc={(newOriginCode, newTranspiledCode) => Method.getNewCode( + service, dispatch, getNameFunc, setCurrentCustomNameToGlobalFunc, @@ -69,6 +84,7 @@ let make = ( getCurrentCustomNameFromGlobalFunc()->Meta3dCommonlib.NullableSt.getExn, newOriginCode, newTranspiledCode, + customs, )} /> } diff --git a/platform/frontend/src/external_layer/ui/app/components/App.res b/platform/frontend/src/external_layer/ui/app/components/App.res index 935da0aa2..9415f7a45 100755 --- a/platform/frontend/src/external_layer/ui/app/components/App.res +++ b/platform/frontend/src/external_layer/ui/app/components/App.res @@ -198,6 +198,7 @@ let make = (~service: FrontendType.service, ~env: EnvType.env) => { getNeedConfigData: (. configLib) => Meta3d.Main.getNeedConfigData(configLib), }, console: { + warn: (. warnMessage, durationOpt) => MessageUtils.warn(warnMessage, durationOpt), error: (. errorMessage, durationOpt) => MessageUtils.error(errorMessage, durationOpt), errorWithExn: (. error, durationOpt) => MessageUtils.errorWithExn(error, durationOpt), }, diff --git a/platform/frontend/src/external_layer/ui/app/utils/utils/assemble_space/AssembleSpaceType.res b/platform/frontend/src/external_layer/ui/app/utils/utils/assemble_space/AssembleSpaceType.res index c9414f1e3..4384efaff 100755 --- a/platform/frontend/src/external_layer/ui/app/utils/utils/assemble_space/AssembleSpaceType.res +++ b/platform/frontend/src/external_layer/ui/app/utils/utils/assemble_space/AssembleSpaceType.res @@ -22,6 +22,8 @@ type useDispatch = unit => dispatch // type errorFunc = Js.Exn.t => unit +type warn = (. string, option) => unit + // type error = (. Antd__Message.error, errorFunc, Js.Exn.t, option) => unit type error = (. string, option) => unit @@ -62,7 +64,7 @@ type reactService = { useEffectOnceAsync: (unit => (Js.Promise.t, option unit>)) => unit, } -type consoleService = {error: error, errorWithExn: errorWithExn} +type consoleService = {warn: warn, error: error, errorWithExn: errorWithExn} type convertAllFileDataForApp = ( . array, diff --git a/platform/frontend/test/features/customInputCodeEdit.feature b/platform/frontend/test/features/customInputCodeEdit.feature index faa4ad440..b9296d37e 100755 --- a/platform/frontend/test/features/customInputCodeEdit.feature +++ b/platform/frontend/test/features/customInputCodeEdit.feature @@ -13,7 +13,13 @@ Feature: CustomInputCodeEdit When get new code Then should convert new code to umd And get new input name from it - # dispatch UpdateCustomInputFileStr with converted new code and generate input name and default file str + # dispatch UpdateCustomInputFileStr with converted new code and generate input name and default file str + + Scenario: if input name exist, warn and not dispatch + Given add exist input with name as n1 + And build input name as n1 and new code + When get new code + Then shouldn't dispatch Rule: getCode diff --git a/platform/frontend/test/step-definitions/__snapshots__/contributes.steps.bs.js.snap b/platform/frontend/test/step-definitions/__snapshots__/contributes.steps.bs.js.snap new file mode 100644 index 000000000..d464cf18e --- /dev/null +++ b/platform/frontend/test/step-definitions/__snapshots__/contributes.steps.bs.js.snap @@ -0,0 +1,67 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Contributes show contributes list 1`] = ` +
+
+
+
+
+
+ + + + + + + + + +
+
+ No data +
+
+
+
+
+
+`; diff --git a/platform/frontend/test/step-definitions/__snapshots__/elementVisual.steps.bs.js.snap b/platform/frontend/test/step-definitions/__snapshots__/elementVisual.steps.bs.js.snap new file mode 100644 index 000000000..31e2bf9a3 --- /dev/null +++ b/platform/frontend/test/step-definitions/__snapshots__/elementVisual.steps.bs.js.snap @@ -0,0 +1,18 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ElementVisual show canvas 1`] = ` + +`; diff --git a/platform/frontend/test/step-definitions/__snapshots__/extensionInspector.steps.bs.js.snap b/platform/frontend/test/step-definitions/__snapshots__/extensionInspector.steps.bs.js.snap new file mode 100644 index 000000000..c2e8cfed6 --- /dev/null +++ b/platform/frontend/test/step-definitions/__snapshots__/extensionInspector.steps.bs.js.snap @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ExtensionInspector show nothing 1`] = `null`; diff --git a/platform/frontend/test/step-definitions/__snapshots__/extensions.steps.bs.js.snap b/platform/frontend/test/step-definitions/__snapshots__/extensions.steps.bs.js.snap new file mode 100644 index 000000000..4cc872e5a --- /dev/null +++ b/platform/frontend/test/step-definitions/__snapshots__/extensions.steps.bs.js.snap @@ -0,0 +1,67 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Extensions show extensions list exclude selected extensions 1`] = ` +
+
+
+
+
+
+ + + + + + + + + +
+
+ No data +
+
+
+
+
+
+`; diff --git a/platform/frontend/test/step-definitions/__snapshots__/fix_assembleSpace_bug.steps.bs.js.snap b/platform/frontend/test/step-definitions/__snapshots__/fix_assembleSpace_bug.steps.bs.js.snap new file mode 100644 index 000000000..2af0327ec --- /dev/null +++ b/platform/frontend/test/step-definitions/__snapshots__/fix_assembleSpace_bug.steps.bs.js.snap @@ -0,0 +1,67 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Fix AssembleSpace Bug fix "enter AssembleSpace should reset" bug 1`] = ` +
+
+
+
+
+
+ + + + + + + + + +
+
+ No data +
+
+
+
+
+
+`; diff --git a/platform/frontend/test/step-definitions/__snapshots__/publish.steps.bs.js.snap b/platform/frontend/test/step-definitions/__snapshots__/publish.steps.bs.js.snap new file mode 100644 index 000000000..6d6e6b77b --- /dev/null +++ b/platform/frontend/test/step-definitions/__snapshots__/publish.steps.bs.js.snap @@ -0,0 +1,16 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Publish show publish button 1`] = ` + +`; diff --git a/platform/frontend/test/step-definitions/__snapshots__/runElementVisualController.steps.bs.js.snap b/platform/frontend/test/step-definitions/__snapshots__/runElementVisualController.steps.bs.js.snap new file mode 100644 index 000000000..c2eb42206 --- /dev/null +++ b/platform/frontend/test/step-definitions/__snapshots__/runElementVisualController.steps.bs.js.snap @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`RunElementVisualController if data not ready, show waiting 1`] = ` + +`; + +exports[`RunElementVisualController if data ready, show run button 1`] = ` + +`; diff --git a/platform/frontend/test/step-definitions/__snapshots__/selectedContributes.steps.bs.js.snap b/platform/frontend/test/step-definitions/__snapshots__/selectedContributes.steps.bs.js.snap new file mode 100644 index 000000000..4feed75c2 --- /dev/null +++ b/platform/frontend/test/step-definitions/__snapshots__/selectedContributes.steps.bs.js.snap @@ -0,0 +1,204 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Selected Contributes show selected contributes 1`] = ` +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + d1 + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + d1 + +
+
+
+
+
+
+
+
+
+
+
+
+`; diff --git a/platform/frontend/test/step-definitions/__snapshots__/selectedExtensions.steps.bs.js.snap b/platform/frontend/test/step-definitions/__snapshots__/selectedExtensions.steps.bs.js.snap new file mode 100644 index 000000000..4955e1160 --- /dev/null +++ b/platform/frontend/test/step-definitions/__snapshots__/selectedExtensions.steps.bs.js.snap @@ -0,0 +1,204 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Selected Extensions show selected extensions 1`] = ` +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+`; diff --git a/platform/frontend/test/step-definitions/__snapshots__/uiControlInspector.steps.bs.js.snap b/platform/frontend/test/step-definitions/__snapshots__/uiControlInspector.steps.bs.js.snap new file mode 100644 index 000000000..db37a7392 --- /dev/null +++ b/platform/frontend/test/step-definitions/__snapshots__/uiControlInspector.steps.bs.js.snap @@ -0,0 +1,2856 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`UIControlInsepctor show default action and action select 1`] = ` +
+
+

+ 2 +

+
+
+
+
+
+
+ + X: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + Y: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + 宽: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + 高: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+
+
+

+ 2 +

+
+
+
+
+
+

+ 2 +

+
+
+

+ 2 +

+
+
+
+
+
+
    +
  • +
    +
    +
    +
    + + button_click: + +
    +
    +
    +
    +
    +
    +
    +
  • +
+
+
+
+
+
+
+
+`; + +exports[`UIControlInsepctor show default data 1`] = ` +
+
+

+ 2 +

+
+
+
+
+
+
+ + X: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + Y: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + 宽: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + 高: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+
+
+

+ 2 +

+
+
+
+
+
+

+ 2 +

+
+
+

+ 2 +

+
+
+
+
+
+
+
+
+ + + + + + + + + +
+
+ No data +
+
+
+
+
+
+
+
+
+
+`; + +exports[`UIControlInsepctor show input 1`] = ` +
+
+

+ 2 +

+
+
+
+
+
+
+ + X: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + Y: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + 宽: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + 高: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+
+
+

+ 2 +

+
+
+
+
+
+

+ 2 +

+
+
+

+ 2 +

+
+
+
+
+
+
+
+
+ + + + + + + + + +
+
+ No data +
+
+
+
+
+
+
+
+
+
+`; + +exports[`UIControlInsepctor show nothing 1`] = ` +
+
+

+ 2 +

+
+
+
+
+
+
+ + X: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + Y: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + 宽: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + 高: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+
+
+

+ 2 +

+
+
+
+
+
+

+ 2 +

+
+
+

+ 2 +

+
+
+
+
+
+
+
+
+ + + + + + + + + +
+
+ No data +
+
+
+
+
+
+
+
+
+
+`; + +exports[`UIControlInsepctor show specific 1`] = ` +
+
+

+ 2 +

+
+
+
+
+
+
+ + X: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + Y: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + 宽: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+ + 高: + +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+
+
+
+
+
+

+ 2 +

+
+
+
+
+
+

+ 2 +

+
+
+
+
+
+
+ label +
+
+
+
+ +
+
+
+
+

+ 2 +

+
+
+
+
+
+
+
+
+ + + + + + + + + +
+
+ No data +
+
+
+
+
+
+
+
+
+
+`; diff --git a/platform/frontend/test/step-definitions/__snapshots__/uiControls.steps.bs.js.snap b/platform/frontend/test/step-definitions/__snapshots__/uiControls.steps.bs.js.snap new file mode 100644 index 000000000..78c23ee1c --- /dev/null +++ b/platform/frontend/test/step-definitions/__snapshots__/uiControls.steps.bs.js.snap @@ -0,0 +1,135 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`UIControls show uiControls list 1`] = ` +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ + u1 + +
+
+
+
+
+
+
+
+
+
+
+
+
+`; diff --git a/platform/frontend/test/step-definitions/customInputCodeEdit.steps.res b/platform/frontend/test/step-definitions/customInputCodeEdit.steps.res index ed935194d..4aa50ed4b 100755 --- a/platform/frontend/test/step-definitions/customInputCodeEdit.steps.res +++ b/platform/frontend/test/step-definitions/customInputCodeEdit.steps.res @@ -56,6 +56,7 @@ defineFeature(feature, test => { dispatchStub := createEmptyStub(refJsObjToSandbox(sandbox.contents)) CustomInputCodeEditTool.getNewCode( + ServiceTool.build(~sandbox, ()), dispatchStub.contents, CustomUtils.getInputName, CodeEditUtils.setCurrentCustomInputNameToGlobal, @@ -65,6 +66,7 @@ defineFeature(feature, test => { inputName.contents, newOriginCode.contents, newTranspiledCode.contents, + list{}, ) }, ) @@ -100,6 +102,66 @@ defineFeature(feature, test => { ) }) + test(."if input name exist, warn and not dispatch", ({given, \"when", \"and", then}) => { + let dispatchStub = ref(Obj.magic(1)) + let warnStub = ref(Obj.magic(1)) + let inputName = "InputName1" + let newInputName = ref(Obj.magic(1)) + let customInputs = ref(Obj.magic(1)) + let newOriginCode = ref(Obj.magic(1)) + let newTranspiledCode = ref(Obj.magic(1)) + + _prepare(given) + + given( + "add exist input with name as n1", + () => { + customInputs := list{CustomTool.buildCustomInput(~name=inputName, ())} + }, + ) + + \"and"( + "build input name as n1 and new code", + () => { + newInputName := inputName + newOriginCode := "" + newTranspiledCode := "" + }, + ) + + \"when"( + "get new code", + () => { + dispatchStub := createEmptyStub(refJsObjToSandbox(sandbox.contents)) + warnStub := createEmptyStub(refJsObjToSandbox(sandbox.contents)) + + CustomInputCodeEditTool.getNewCode( + ServiceTool.build(~sandbox, ~warn=warnStub.contents, ()), + dispatchStub.contents, + CustomUtils.getInputName, + CodeEditUtils.setCurrentCustomInputNameToGlobal, + (name, newName, newOriginCode, newTranspiledCode) => { + (name, newName, newOriginCode, newTranspiledCode) + }, + newInputName.contents, + newOriginCode.contents, + newTranspiledCode.contents, + customInputs.contents, + ) + }, + ) + + then( + "shouldn't dispatch", + () => { + ( + warnStub.contents->Obj.magic->getCallCount, + dispatchStub.contents->Obj.magic->getCallCount, + )->expect == (1, 0) + }, + ) + }) + test(."get code", ({given, \"when", \"and", then}) => { let dispatchStub = ref(Obj.magic(1)) let inputName = ref(Obj.magic(1)) diff --git a/platform/frontend/test/step-definitions/package/__snapshots__/package_contributes.steps.bs.js.snap b/platform/frontend/test/step-definitions/package/__snapshots__/package_contributes.steps.bs.js.snap new file mode 100644 index 000000000..c7c223a51 --- /dev/null +++ b/platform/frontend/test/step-definitions/package/__snapshots__/package_contributes.steps.bs.js.snap @@ -0,0 +1,67 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`PackageContributes show contributes list 1`] = ` +
+
+
+
+
+
+ + + + + + + + + +
+
+ No data +
+
+
+
+
+
+`; diff --git a/platform/frontend/test/step-definitions/package/__snapshots__/package_extensionInspector.steps.bs.js.snap b/platform/frontend/test/step-definitions/package/__snapshots__/package_extensionInspector.steps.bs.js.snap new file mode 100644 index 000000000..65c60e071 --- /dev/null +++ b/platform/frontend/test/step-definitions/package/__snapshots__/package_extensionInspector.steps.bs.js.snap @@ -0,0 +1,51 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`PackageExtensionInspector show mark entry button 1`] = ` +
+
+ +
+
+`; + +exports[`PackageExtensionInspector show nothing 1`] = `null`; + +exports[`PackageExtensionInspector show unmark entry button 1`] = ` +
+
+ +
+
+`; diff --git a/platform/frontend/test/step-definitions/package/__snapshots__/package_selectedContributes.steps.bs.js.snap b/platform/frontend/test/step-definitions/package/__snapshots__/package_selectedContributes.steps.bs.js.snap new file mode 100644 index 000000000..0514061a6 --- /dev/null +++ b/platform/frontend/test/step-definitions/package/__snapshots__/package_selectedContributes.steps.bs.js.snap @@ -0,0 +1,204 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Package Selected Contributes show selected contributes 1`] = ` +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + d1 + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + d1 + +
+
+
+
+
+
+
+
+
+
+
+
+`; diff --git a/platform/frontend/test/step-definitions/package/__snapshots__/package_selectedExtensions.steps.bs.js.snap b/platform/frontend/test/step-definitions/package/__snapshots__/package_selectedExtensions.steps.bs.js.snap new file mode 100644 index 000000000..afe481546 --- /dev/null +++ b/platform/frontend/test/step-definitions/package/__snapshots__/package_selectedExtensions.steps.bs.js.snap @@ -0,0 +1,204 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Package Selected Extensions show selected extensions 1`] = ` +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+`; diff --git a/platform/frontend/test/step-definitions/package/__snapshots__/publish_package.steps.bs.js.snap b/platform/frontend/test/step-definitions/package/__snapshots__/publish_package.steps.bs.js.snap new file mode 100644 index 000000000..c13a0f55c --- /dev/null +++ b/platform/frontend/test/step-definitions/package/__snapshots__/publish_package.steps.bs.js.snap @@ -0,0 +1,16 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Publish Package show publish button 1`] = ` + +`; diff --git a/platform/frontend/test/tool/ServiceTool.res b/platform/frontend/test/tool/ServiceTool.res index 843edddf9..627c283ba 100755 --- a/platform/frontend/test/tool/ServiceTool.res +++ b/platform/frontend/test/tool/ServiceTool.res @@ -25,6 +25,7 @@ let build = ( ~useEffect1=createEmptyStub(refJsObjToSandbox(sandbox.contents)), ~useEffectOnce=createEmptyStub(refJsObjToSandbox(sandbox.contents)), ~useEffectOnceAsync=createEmptyStub(refJsObjToSandbox(sandbox.contents)), + ~warn=Js.Console.warn, ~error=Js.Console.error, ~errorWithExn=Js.Console.error, // ~getAllPublishPackageEntryExtensionProtocols=createEmptyStub( @@ -163,6 +164,7 @@ let build = ( useEffectOnceAsync, }, console: { + warn: warn->Obj.magic, error: error->Obj.magic, errorWithExn: errorWithExn->Obj.magic, },