import React from 'react'
import { render, screen } from '@testing-library/react'
import { AutoCompleteExample } from '../autoComplete/AutoCompleteExample'
import { SearchForm, SearchFormDisplay } from '../searchForm'
import { PriceSimulator } from './PriceSimulator'
const component = (
}
terms={
Receive a €25 fuel voucher with BlaBlaCar and €15 fuel voucher with BlaBlaCar daily after
your first trip as a driver with at least a passenger on BlaBlaCar and BlaBlaCar Daily (
terms)
}
>
{}}
initialFrom="Paris"
initialTo="Toulouse"
disabledFrom={false}
disabledTo={false}
autocompleteFromPlaceholder="Leaving From"
autocompleteToPlaceholder="Going to"
renderAutocompleteFrom={props => }
renderAutocompleteTo={props => }
datepickerProps={{
defaultValue: new Date().toISOString(),
format: value => new Date(value).toLocaleDateString(),
}}
stepperProps={{
defaultValue: 1,
min: 1,
max: 8,
title: 'Choose your number of seats',
increaseLabel: 'Increase the number of seats by 1',
decreaseLabel: 'Decrease the number of seats by 1',
format: value => `${value} seat(s)`,
confirmLabel: 'Submit',
}}
submitButtonText="Publish a ride"
display={SearchFormDisplay.SMALL}
showDateField={false}
/>
)
describe('PriceSimulator', () => {
it('should render the PriceSimulator', () => {
render(component)
expect(screen.getByRole('heading')).toHaveTextContent(
'Become a BlaBlaCar driver and save money by sharing your travel fees',
)
})
})