From 5f47170c724bcaa31a83f0298782f7d0ce32d859 Mon Sep 17 00:00:00 2001
From: clesausse-pass <187269096+clesausse-pass@users.noreply.github.com>
Date: Mon, 10 Feb 2025 13:47:05 +0100
Subject: [PATCH] (PC-32105) feat(offer): change venue button icon (#7655)
---
.../OfferVenueButton.native.test.tsx | 16 +++++++++-------
.../OfferVenueButton/OfferVenueButton.tsx | 4 ++--
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/src/features/offer/components/OfferVenueButton/OfferVenueButton.native.test.tsx b/src/features/offer/components/OfferVenueButton/OfferVenueButton.native.test.tsx
index 6c1093002cb..c38d76115b5 100644
--- a/src/features/offer/components/OfferVenueButton/OfferVenueButton.native.test.tsx
+++ b/src/features/offer/components/OfferVenueButton/OfferVenueButton.native.test.tsx
@@ -5,7 +5,11 @@ import { OfferVenueResponse } from 'api/gen'
import { OfferVenueButton } from 'features/offer/components/OfferVenueButton/OfferVenueButton'
import { offerResponseSnap } from 'features/offer/fixtures/offerResponse'
import { analytics } from 'libs/analytics/provider'
-import { fireEvent, render, screen, waitFor } from 'tests/utils'
+import { render, screen, userEvent } from 'tests/utils'
+
+const user = userEvent.setup()
+
+jest.useFakeTimers()
describe('', () => {
it('should display public name when informed', () => {
@@ -63,17 +67,15 @@ describe('', () => {
it('should redirect to venue page when pressing button', async () => {
render()
- fireEvent.press(screen.getByTestId('Accéder à la page du lieu PATHE BEAUGRENELLE'))
+ await user.press(screen.getByTestId('Accéder à la page du lieu PATHE BEAUGRENELLE'))
- await waitFor(() =>
- expect(navigate).toHaveBeenCalledWith('Venue', { id: offerResponseSnap.venue.id })
- )
+ expect(navigate).toHaveBeenCalledWith('Venue', { id: offerResponseSnap.venue.id })
})
- it('should track the venue redirection when the pressing button', () => {
+ it('should track the venue redirection when the pressing button', async () => {
render()
- fireEvent.press(screen.getByTestId('Accéder à la page du lieu PATHE BEAUGRENELLE'))
+ await user.press(screen.getByTestId('Accéder à la page du lieu PATHE BEAUGRENELLE'))
expect(analytics.logConsultVenue).toHaveBeenCalledWith({
venueId: offerResponseSnap.venue.id,
diff --git a/src/features/offer/components/OfferVenueButton/OfferVenueButton.tsx b/src/features/offer/components/OfferVenueButton/OfferVenueButton.tsx
index d6150c4cf0c..4d056a97556 100644
--- a/src/features/offer/components/OfferVenueButton/OfferVenueButton.tsx
+++ b/src/features/offer/components/OfferVenueButton/OfferVenueButton.tsx
@@ -5,7 +5,7 @@ import styled from 'styled-components/native'
import { OfferVenueResponse } from 'api/gen'
import { analytics } from 'libs/analytics/provider'
import { HeroButtonList } from 'ui/components/buttons/HeroButtonList'
-import { LocationPointer } from 'ui/svg/icons/LocationPointer'
+import { LocationBuildingFilled } from 'ui/svg/icons/LocationBuildingFilled'
import { TypoDS } from 'ui/theme'
interface Props {
@@ -22,7 +22,7 @@ export function OfferVenueButton({ venue }: Readonly) {
Subtitle={
venue.city ? {venue.city} : undefined
}
- Icon={}
+ Icon={}
navigateTo={{ screen: 'Venue', params: { id: venue.id } }}
onBeforeNavigate={() => analytics.logConsultVenue({ venueId: venue.id, from: 'offer' })}
accessibilityLabel={`Accéder à la page du lieu ${venueName}`}