Skip to content

Commit

Permalink
Merge pull request #818 from geonetwork/carousel-dots
Browse files Browse the repository at this point in the history
chore(carousel): Remove dot from carousel component if less than 2 dots
  • Loading branch information
jahow authored Mar 22, 2024
2 parents 91cd6a9 + 752cd05 commit 4434d8e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,16 @@ describe('dataset pages', () => {
.find('gn-ui-api-card')
.should('have.length.gt', 0)
})
it('should not display carousel dot button for 4 link cards', () => {
cy.get('datahub-record-otherlinks')
.find('.carousel-step-dot')
.should('exist')
})
it('should not display carousel dot button for 2 API cards', () => {
cy.get('datahub-record-apis')
.find('.carousel-step-dot')
.should('not.exist')
})
})
describe('features', () => {
it('goes to external link on click', () => {
Expand Down
1 change: 1 addition & 0 deletions libs/common/fixtures/src/lib/records.fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,6 @@ Ce lot de données produit en 2019, a été numérisé à partir du PCI Vecteur
temporalExtents: [],
status: 'completed',
updateFrequency: 'unknown',
languages: ['fr', 'de'],
},
])
1 change: 1 addition & 0 deletions libs/ui/layout/src/lib/carousel/carousel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
</div>
</div>
<div
*ngIf="steps.length > 1"
class="absolute right-0 top-0 flex flex-row justify-center gap-[10px] p-1"
[ngClass]="stepsContainerClass"
>
Expand Down

0 comments on commit 4434d8e

Please sign in to comment.