From e7890ef739fbc689e9e3af42e1042e0772a3cb65 Mon Sep 17 00:00:00 2001 From: Nicolas Van Labeke Date: Wed, 11 Dec 2024 18:01:04 +0000 Subject: [PATCH] refactor(28810): flip icons --- .../Workspace/components/nodes/NodeAdapter.spec.cy.tsx | 8 ++++---- .../modules/Workspace/components/nodes/NodeAdapter.tsx | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hivemq-edge/src/frontend/src/modules/Workspace/components/nodes/NodeAdapter.spec.cy.tsx b/hivemq-edge/src/frontend/src/modules/Workspace/components/nodes/NodeAdapter.spec.cy.tsx index 0e35921d8..8837627ff 100644 --- a/hivemq-edge/src/frontend/src/modules/Workspace/components/nodes/NodeAdapter.spec.cy.tsx +++ b/hivemq-edge/src/frontend/src/modules/Workspace/components/nodes/NodeAdapter.spec.cy.tsx @@ -68,8 +68,8 @@ describe('NodeAdapter', () => { cy.getByTestId('adapter-node-name').should('contain', MOCK_ADAPTER_ID) cy.get('[role="toolbar"] button').should('have.length', 3) cy.get('[role="toolbar"] button').eq(0).should('have.attr', 'aria-label', 'Open the overview panel') - cy.get('[role="toolbar"] button').eq(1).should('have.attr', 'aria-label', 'Edit Southbound mappings') - cy.get('[role="toolbar"] button').eq(2).should('have.attr', 'aria-label', 'Edit Northbound mappings') + cy.get('[role="toolbar"] button').eq(1).should('have.attr', 'aria-label', 'Edit Northbound mappings') + cy.get('[role="toolbar"] button').eq(2).should('have.attr', 'aria-label', 'Edit Southbound mappings') }) it('should render the toolbar for multiple selected', () => { @@ -128,13 +128,13 @@ describe('NodeAdapter', () => { `/workspace/node/adapter/opc-ua-client/${MOCK_NODE_ADAPTER.id}` ) - cy.get('[role="toolbar"] button').eq(1).click() + cy.get('[role="toolbar"] button').eq(2).click() cy.getByTestId('test-navigate-pathname').should( 'have.text', `/workspace/node/adapter/opc-ua-client/${MOCK_NODE_ADAPTER.id}/southbound` ) - cy.get('[role="toolbar"] button').eq(2).click() + cy.get('[role="toolbar"] button').eq(1).click() cy.getByTestId('test-navigate-pathname').should( 'have.text', `/workspace/node/adapter/opc-ua-client/${MOCK_NODE_ADAPTER.id}/northbound` diff --git a/hivemq-edge/src/frontend/src/modules/Workspace/components/nodes/NodeAdapter.tsx b/hivemq-edge/src/frontend/src/modules/Workspace/components/nodes/NodeAdapter.tsx index 0eaf765ae..2dcd5c313 100644 --- a/hivemq-edge/src/frontend/src/modules/Workspace/components/nodes/NodeAdapter.tsx +++ b/hivemq-edge/src/frontend/src/modules/Workspace/components/nodes/NodeAdapter.tsx @@ -47,6 +47,11 @@ const NodeAdapter: FC> = ({ id, data: adapter, selected, drag <> + } + aria-label={t('workspace.toolbar.command.mappings.northbound')} + onClick={() => navigate(`${adapterNavPath}/northbound`)} + /> {bidirectional && ( } @@ -54,11 +59,6 @@ const NodeAdapter: FC> = ({ id, data: adapter, selected, drag onClick={() => navigate(`${adapterNavPath}/southbound`)} /> )} - } - aria-label={t('workspace.toolbar.command.mappings.northbound')} - onClick={() => navigate(`${adapterNavPath}/northbound`)} - />