Skip to content

Commit

Permalink
[Test] fix tests e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
claire2212 committed Oct 18, 2024
1 parent 2f0fd00 commit 9f1ac15
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 7 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ context('Main Window > AMP Layers', () => {
cy.fill("Type d'AMP", ['Natura 2000'])
cy.getDataCy('amp-results-list-button').click()
cy.getDataCy('amp-result-list').find('li').first().click()
cy.clickButton('Sélectionner la/les zone(s)')
cy.wait(1000)
cy.getDataCy('amp-zone-check').first().click()

cy.getDataCy('my-amp-layers-zones').click({ force: true })
cy.getDataCy('my-amp-zones-list').should('have.length', 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ context('LayerTree > Vigilance Area Layers', () => {
})
it('A vigilance area Should be searched, added to My Zones and showed on the map with the Zone button', () => {
cy.clickButton('Définir la zone de recherche et afficher les tracés')
// cy.getDataCy('vigilance-area-results-list-button').contains('5 résultats')

cy.fill('Rechercher une zone', 'Lorem ipsum') // "Lorem ipsum" is in comments of vigilance area
cy.getDataCy('vigilance-area-results-list-button').contains('1 résultat').click()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,26 @@ export function AMPLayer({ layerId, searchedText }: { layerId: number; searchedT
searchWords={searchedText && searchedText.length > 0 ? searchedText.split(' ') : []}
textToHighlight={layer?.type ?? ''}
/>
{layer?.type ?? 'AUCUN TYPE'}
{!layer?.type && 'AUCUN NOM'}
</LayerSelector.Name>
<LayerSelector.IconGroup>
{isLinkingAMPToVigilanceArea ? (
<IconButton
accent={Accent.TERTIARY}
aria-label="Ajouter la zone AMP à la zone de vigilance"
data-cy="amp-zone-add"
disabled={ampsLinkedToVigilanceAreaForm.includes(layerId)}
Icon={Icon.Plus}
onClick={addAMPToVigilanceArea}
title="Ajouter la zone AMP à la zone de vigilance"
/>
) : (
<IconButton
accent={Accent.TERTIARY}
aria-label="Sélectionner la zone"
color={isZoneSelected ? THEME.color.blueGray : THEME.color.gunMetal}
data-cy="amp-zone-check"
Icon={isZoneSelected ? Icon.PinFilled : Icon.Pin}
onClick={handleSelectZone}
title="Sélectionner la zone"
/>
)}
</LayerSelector.IconGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ export function ResultListLayerGroup({
{isLinkingZonesToVigilanceArea ? (
<IconButton
accent={Accent.TERTIARY}
aria-label="Ajouter la/les zone(s) à la zone de vigilance"
disabled={isLayerGroupDisabled}
Icon={Icon.Plus}
onClick={addZonesToVigilanceArea}
Expand All @@ -109,7 +108,6 @@ export function ResultListLayerGroup({
) : (
<IconButton
accent={Accent.TERTIARY}
aria-label="Sélectionner la/les zone(s)"
color={allTopicZonesAreChecked ? THEME.color.blueGray : THEME.color.gunMetal}
Icon={allTopicZonesAreChecked ? Icon.PinFilled : Icon.Pin}
onClick={handleCheckAllZones}
Expand Down

0 comments on commit 9f1ac15

Please sign in to comment.