From a8431494530ec1568e23e663e96891ecdefdbce7 Mon Sep 17 00:00:00 2001 From: Valentin Serra Date: Mon, 4 Mar 2024 03:43:35 +0100 Subject: [PATCH] chore: remove unreliable tests Related to #1073 --- .../features/palette/PaletteModule.spec.js | 39 ------------------- .../PropertiesPanelModule.spec.js | 39 ------------------- 2 files changed, 78 deletions(-) diff --git a/packages/form-js-editor/test/spec/features/palette/PaletteModule.spec.js b/packages/form-js-editor/test/spec/features/palette/PaletteModule.spec.js index 9b8e95045..213a762db 100644 --- a/packages/form-js-editor/test/spec/features/palette/PaletteModule.spec.js +++ b/packages/form-js-editor/test/spec/features/palette/PaletteModule.spec.js @@ -116,45 +116,6 @@ describe('features/palette', function() { }); - it('should attach when section rendered late', async function() { - - // given - const node = document.createElement('div'); - document.body.appendChild(node); - - let formEditor; - - await act(async () => { - const result = await createEditor(schema); - formEditor = result.formEditor; - }); - - const palette = formEditor.get('palette'); - const eventBus = formEditor.get('eventBus'); - - // when - await act(() => { - return palette.attachTo(node); - }); - - // then - expect(domQuery('.fjs-palette', paletteContainer)).to.exist; - expect(domQuery('.fjs-palette', node)).to.not.exist; - - // when - await act(() => { - eventBus.fire('palette.section.rendered'); - }); - - // then - expect(domQuery('.fjs-palette', paletteContainer)).to.not.exist; - expect(domQuery('.fjs-palette', node)).to.exist; - - // cleanup - document.body.removeChild(node); - }); - - it('should detach', async function() { // given diff --git a/packages/form-js-editor/test/spec/features/properties-panel/PropertiesPanelModule.spec.js b/packages/form-js-editor/test/spec/features/properties-panel/PropertiesPanelModule.spec.js index ab4e7b2e4..25e58dd20 100644 --- a/packages/form-js-editor/test/spec/features/properties-panel/PropertiesPanelModule.spec.js +++ b/packages/form-js-editor/test/spec/features/properties-panel/PropertiesPanelModule.spec.js @@ -117,45 +117,6 @@ describe('features/propertiesPanel', function() { }); - it.skip('should attach when section rendered late', async function() { - - // given - const node = document.createElement('div'); - document.body.appendChild(node); - - let formEditor; - - await act(async () => { - const result = await createEditor(schema); - formEditor = result.formEditor; - }); - - const propertiesPanel = formEditor.get('propertiesPanel'); - const eventBus = formEditor.get('eventBus'); - - // when - await act(() => { - return propertiesPanel.attachTo(node); - }); - - // then - expect(domQuery('.fjs-properties-panel', propertiesPanelContainer)).to.exist; - expect(domQuery('.fjs-properties-panel', node)).to.not.exist; - - // when - await act(() => { - eventBus.fire('propertiesPanel.section.rendered'); - }); - - // then - expect(domQuery('.fjs-properties-panel', propertiesPanelContainer)).to.not.exist; - expect(domQuery('.fjs-properties-panel', node)).to.exist; - - // cleanup - document.body.removeChild(node); - }); - - it('should detach', async function() { // given