From ebf2f20fa9134cb060008c13ca700d089df68c91 Mon Sep 17 00:00:00 2001 From: Balazs Bajorics <2226774+balazsbajorics@users.noreply.github.com> Date: Fri, 2 Feb 2024 11:25:57 +0100 Subject: [PATCH] only check the icon's name instead of the full icon url including port number --- .../strategies/absolute-move-strategy.spec.browser2.tsx | 4 +--- .../strategies/flex-reorder-strategy.spec.browser2.tsx | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/editor/src/components/canvas/canvas-strategies/strategies/absolute-move-strategy.spec.browser2.tsx b/editor/src/components/canvas/canvas-strategies/strategies/absolute-move-strategy.spec.browser2.tsx index e17abb30c225..3b091fd91534 100644 --- a/editor/src/components/canvas/canvas-strategies/strategies/absolute-move-strategy.spec.browser2.tsx +++ b/editor/src/components/canvas/canvas-strategies/strategies/absolute-move-strategy.spec.browser2.tsx @@ -633,9 +633,7 @@ describe('Absolute Move Strategy', () => { const toolbarEditButtonImage = renderResult.renderedDOM.getByTestId( `${CanvasToolbarEditButtonID}-icon`, ) - expect(toolbarEditButtonImage.getAttribute('src')).toEqual( - 'http://localhost:9876/editor/icons/light/modalities/moveabs-large-white-18x18@2x.png', - ) + expect(toolbarEditButtonImage.getAttribute('src')).toEqual(expect.stringContaining('moveabs')) // the toolbar shows the Absolute Move icon }) await renderResult.getDispatchFollowUpActionsFinished() diff --git a/editor/src/components/canvas/canvas-strategies/strategies/flex-reorder-strategy.spec.browser2.tsx b/editor/src/components/canvas/canvas-strategies/strategies/flex-reorder-strategy.spec.browser2.tsx index 18c567d16374..78765a14b8de 100644 --- a/editor/src/components/canvas/canvas-strategies/strategies/flex-reorder-strategy.spec.browser2.tsx +++ b/editor/src/components/canvas/canvas-strategies/strategies/flex-reorder-strategy.spec.browser2.tsx @@ -252,7 +252,7 @@ describe('Flex Reorder Strategy', () => { `${CanvasToolbarEditButtonID}-icon`, ) expect(toolbarEditButtonImage.getAttribute('src')).toEqual( - 'http://localhost:9876/editor/icons/light/modalities/reorder-large-white-18x18@2x.png', + expect.stringContaining('reorder'), // check if the toolbar shows the Reorder icon ) expect(renderResult.getEditorState().strategyState.currentStrategy).toEqual( 'FLEX_REORDER',