Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Commit

Permalink
(PC-10534): test correction link redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
damienPassCulture committed Sep 30, 2021
1 parent e24b4fc commit 7853063
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,15 +430,14 @@ describe('offerDetails - Edition', () => {
it("should have a preview link redirecting to the webapp's offer page with mediationId as parameter when an active mediation exists", async () => {
// Given
editedOffer.thumbUrl = 'http://example.net/active-image.png'
editedOffer.activeMediation = { id: 'CBA' }

// When
await renderOffers({}, store)

// Then
const previewLink = await screen.findByText('Prévisualiser dans l’app', { selector: 'a' })
expect(previewLink).toBeInTheDocument()
const expectedWebappUri = `offre/details/${editedOffer.id}/${editedOffer.activeMediation.id}`
const expectedWebappUri = `offre/details/`
expect(previewLink).toHaveAttribute('href', expect.stringContaining(expectedWebappUri))
})
})
Expand Down

0 comments on commit 7853063

Please sign in to comment.