Skip to content

Commit

Permalink
Merge pull request #695
Browse files Browse the repository at this point in the history
* refactor(28810): flip icons
  • Loading branch information
vanch3d authored Dec 12, 2024
1 parent adc0c1d commit d52e472
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ const NodeAdapter: FC<NodeProps<Adapter>> = ({ id, data: adapter, selected, drag
<>
<ContextualToolbar id={id} dragging={dragging} onOpenPanel={onContextMenu}>
<ToolbarButtonGroup>
<IconButton
icon={<Icon as={deviceCapabilityIcon['READ']} />}
aria-label={t('workspace.toolbar.command.mappings.northbound')}
onClick={() => navigate(`${adapterNavPath}/northbound`)}
/>
{bidirectional && (
<IconButton
icon={<Icon as={deviceCapabilityIcon['WRITE']} />}
aria-label={t('workspace.toolbar.command.mappings.southbound')}
onClick={() => navigate(`${adapterNavPath}/southbound`)}
/>
)}
<IconButton
icon={<Icon as={deviceCapabilityIcon['READ']} />}
aria-label={t('workspace.toolbar.command.mappings.northbound')}
onClick={() => navigate(`${adapterNavPath}/northbound`)}
/>
</ToolbarButtonGroup>
</ContextualToolbar>
<NodeWrapper
Expand Down

0 comments on commit d52e472

Please sign in to comment.