Gas Station Feature

This commit is contained in:
Eric Gullickson
2025-11-04 18:46:46 -06:00
parent d8d0ada83f
commit 5dc58d73b9
61 changed files with 12952 additions and 52 deletions

View File

@@ -0,0 +1,95 @@
/**
* @ai-summary Mock Google Places API responses for tests
*/
import { GooglePlacesResponse } from '../../external/google-maps/google-maps.types';
export const mockGoogleNearbySearchResponse: GooglePlacesResponse = {
results: [
{
geometry: {
location: {
lat: 37.7749,
lng: -122.4194
}
},
name: 'Shell Gas Station - Downtown',
place_id: 'ChIJN1blFMzZrIEElx_JXUzRLdc',
vicinity: '123 Main St, San Francisco, CA 94105',
rating: 4.2,
photos: [
{
photo_reference: 'photo_ref_1'
}
],
opening_hours: {
open_now: true
},
types: ['gas_station', 'point_of_interest', 'establishment']
},
{
geometry: {
location: {
lat: 37.7923,
lng: -122.3989
}
},
name: 'Chevron Station - Financial District',
place_id: 'ChIJN1blFMzZrIEElx_JXUzRLde',
vicinity: '456 Market St, San Francisco, CA 94102',
rating: 4.5,
photos: [
{
photo_reference: 'photo_ref_2'
}
],
opening_hours: {
open_now: true
},
types: ['gas_station', 'point_of_interest', 'establishment']
}
],
status: 'OK'
};
export const mockGooglePlaceDetailsResponse = {
result: {
geometry: {
location: {
lat: 37.7749,
lng: -122.4194
}
},
name: 'Shell Gas Station - Downtown',
place_id: 'ChIJN1blFMzZrIEElx_JXUzRLdc',
formatted_address: '123 Main St, San Francisco, CA 94105',
rating: 4.2,
user_ratings_total: 150,
formatted_phone_number: '+1 (415) 555-0100',
website: 'https://www.shell.com',
opening_hours: {
weekday_text: [
'Monday: 12:00 AM 11:59 PM',
'Tuesday: 12:00 AM 11:59 PM'
]
},
photos: [
{
photo_reference: 'photo_ref_1'
}
],
types: ['gas_station', 'point_of_interest', 'establishment']
},
status: 'OK'
};
export const mockGoogleErrorResponse = {
results: [],
status: 'ZERO_RESULTS'
};
export const mockGoogleApiErrorResponse = {
results: [],
status: 'REQUEST_DENIED',
error_message: 'Invalid API key'
};