Skip to content

Commit

Permalink
fix e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoinier committed Oct 21, 2024
1 parent fa28b70 commit 4dad7d3
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions apps/datahub-e2e/src/e2e/datasets.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,35 @@ describe('datasets', () => {
})

describe('display of dataset previews', () => {
it('should display a logo for first and a placeholder for second result', () => {
cy.get('@sortBy').selectDropdownOption('desc,createDate') // this makes the order reliable
cy.get('@sampleResult')
it('should display a placeholder for first result and a logo for second result', () => {
cy.get('@sortBy').selectDropdownOption('desc,userSavedCount') // this makes the order reliable
cy.get('@results')
.first()
.find('gn-ui-thumbnail')
.children('div')
.invoke('attr', 'data-cy-is-placeholder')
.should('equal', 'false')
cy.get('@sampleResult')
.should('equal', 'true')
cy.get('@results')
.first()
.find('gn-ui-thumbnail')
.find('img')
.invoke('attr', 'src')
.should(
'eql',
'https://geocat-dev.dev.bgdi.ch/geonetwork/srv/api/records/9e1ea778-d0ce-4b49-90b7-37bc0e448300/attachments/test.png'
)
.should('include', 'data:image/png')
cy.get('@results')
.first()
.eq(1)
.find('gn-ui-thumbnail')
.children('div')
.invoke('attr', 'data-cy-is-placeholder')
.should('equal', 'true')
.should('equal', 'false')
cy.get('@results')
.eq(1)
.find('gn-ui-thumbnail')
.find('img')
.invoke('attr', 'src')
.should(
'eq',
'https://www.geo2france.fr/public/vignettes_geonetwork/part_menage_5ans.jpg'
)
})
it('should display the title', () => {
cy.get('@sampleResult')
Expand Down

0 comments on commit 4dad7d3

Please sign in to comment.