Skip to content

Commit

Permalink
[Cartographie] Ne pas griser le bouton d'actions des positions de la …
Browse files Browse the repository at this point in the history
…fiche navire (#2591)

## Linked issues

- Resolve #2583

----

- [ ] Tests E2E (Cypress)
  • Loading branch information
louptheron authored Oct 11, 2023
2 parents 19721f7 + 8cc34e0 commit 99e6215
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion frontend/cypress/e2e/vessel_sidebar/control_buttons.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ context('Vessel sidebar controls buttons', () => {
cy.get('*[data-cy^="vessel-sidebar"]').should('be.visible')

// When
cy.get('*[data-cy="vessel-track-depth-selection"]').should('have.attr', 'disabled')
cy.get('*[data-cy="show-all-fishing-activities-on-map"]').should('have.attr', 'disabled')
cy.get('*[data-cy="trigger-hide-other-vessels-from-sidebar"]').should('have.attr', 'disabled')
cy.get('*[data-cy="animate-to-track"]').should('have.attr', 'disabled')
// The positions button is not disabled
cy.get('*[data-cy="vessel-track-depth-selection"]').should('not.have.attr', 'disabled')
})

it('Vessel track depth Should be changed', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function TrackRequest({ isSidebarOpen }: TrackRequestProps) {
const { healthcheckTextWarning } = useMainAppSelector(state => state.global)
const { rightMenuIsOpen } = useMainAppSelector(state => state.global)
const { defaultVesselTrackDepth } = useMainAppSelector(state => state.map)
const { selectedVesselPositions, selectedVesselTrackRequest } = useMainAppSelector(state => state.vessel)
const { selectedVesselTrackRequest } = useMainAppSelector(state => state.vessel)
const { selectedVesselIdentity } = useMainAppSelector(state => state.vessel)
const [isOpenedFromClick, setIsOpenedFromClick] = useState(false)

Expand Down Expand Up @@ -85,7 +85,6 @@ export function TrackRequest({ isSidebarOpen }: TrackRequestProps) {
<VesselSidebarActionButton
backgroundColor={isOpen ? THEME.color.blueGray : THEME.color.charcoal}
data-cy="vessel-track-depth-selection"
disabled={!selectedVesselPositions?.length}
healthcheckTextWarning={!!healthcheckTextWarning}
isHidden={false}
isRightMenuOpen={rightMenuIsOpen}
Expand Down

0 comments on commit 99e6215

Please sign in to comment.