Skip to content

Commit

Permalink
Fix new regulation e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangabriele committed Feb 28, 2024
1 parent 0a4e552 commit 58bab5f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions frontend/cypress/e2e/backoffice/new_regulation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,13 @@ context('New Regulation', () => {
cy.get('[data-cy="regulatory-gears-section"]').scrollIntoView().click()
cy.wait(1000)
cy.get('[data-cy="unauthorized-all-gears-option"]').should('not.have.class', 'rs-checkbox-checked')
cy.get('[data-cy="unauthorized-all-gears-option"]').click()
cy.get('[data-cy="unauthorized-all-gears-option"]').find('input').forceClick()

// then
cy.get('[data-cy="unauthorized-all-towed-gears-option"]').should('have.class', 'rs-checkbox-checked')
cy.get('[data-cy="unauthorized-all-passive-gears-option"]').should('have.class', 'rs-checkbox-checked')
cy.get('[data-cy^="tag-"]').should('have.length', 12)
cy.get('[data-cy="unauthorized-all-gears-option"]').click()
cy.get('[data-cy="unauthorized-all-gears-option"]').find('input').forceClick()

cy.get('[data-cy="unauthorized-all-towed-gears-option"]').should('not.have.class', 'rs-checkbox-checked')
cy.get('[data-cy="unauthorized-all-passive-gears-option"]').should('not.have.class', 'rs-checkbox-checked')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ const CustomMultiCascader = styled(MultiCascader)`

const GearCheckBox = styled(CustomCheckbox)`
padding-right: 11px;
margin-bottom: 15px;
`

const DerogationRadioWrapper = styled.div`
Expand Down
32 changes: 20 additions & 12 deletions frontend/src/ui/LegacyRsuiteComponentsWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -429,25 +429,33 @@ export const LegacyRsuiteComponentsWrapper = styled.div`
}
.rs-checkbox {
.rs-checkbox-wrapper {
.rs-checkbox-inner {
&:before {
background-color: ${p => p.theme.color.gainsboro} !important;
border: solid 2px ${p => p.theme.color.lightGray} !important;
border-radius: 0;
}
}
}
.rs-checkbox-checker {
min-height: 0;
&.rs-checkbox-checked {
.rs-checkbox-wrapper {
.rs-checkbox-inner {
&:before {
background-color: ${p => p.theme.color.charcoal} !important;
border: solid 2px ${p => p.theme.color.charcoal} !important;
background-color: ${p => p.theme.color.gainsboro} !important;
border: solid 2px ${p => p.theme.color.lightGray} !important;
border-radius: 0;
}
}
}
&.rs-checkbox-checked {
.rs-checkbox-wrapper {
.rs-checkbox-inner {
&:before {
background-color: ${p => p.theme.color.charcoal} !important;
border: solid 2px ${p => p.theme.color.charcoal} !important;
}
}
}
}
}
}
.rs-picker {
width: auto;
}
`

0 comments on commit 58bab5f

Please sign in to comment.