@bytebrand/fe-ui-core 4.8.46 → 4.8.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bytebrand-fe-ui-core-4.8.47.tgz +0 -0
- package/media/locales/de/promoSlider.json +0 -1
- package/media/locales/en/promoSlider.json +0 -1
- package/package.json +5 -3
- package/source/components/AccordionWidget/AccordionWidget.styl +0 -1
- package/source/components/AccordionWidget/AccordionWidget.tsx +4 -8
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +11 -23
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +6 -1
- package/source/components/VehicleDetailedSlider/partials/PriceData.tsx +9 -8
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +0 -5
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +1 -3
- package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.styl +1 -1
- package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +11 -24
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +2 -3
- package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.styl +1 -4
- package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.tsx +2 -3
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +1 -1
- package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +6 -15
- package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.styled.tsx +1 -4
- package/source/components/_common/withStats/withStats.styl +21 -0
- package/source/components/_common/withStats/withStats.tsx +21 -4
- package/source/framework/DataTransformers.ts +0 -1
- package/source/framework/constants/common.ts +4 -8
- package/source/framework/types/types.ts +0 -1
- package/source/framework/vehiclesProps/decoratedLightProps.tsx +12 -48
- package/source/framework/vehiclesProps/decoratedProps.tsx +8 -35
- package/source/locales/data.ts +5 -4
- package/.husky/pre-push +0 -4
- package/.storybook/addons.js +0 -4
- package/.storybook/config.js +0 -64
- package/.storybook/postcss.config.js +0 -6
- package/.storybook/preview-head.html +0 -10
- package/.storybook/webpack.config.js +0 -130
- package/__tests__/components/Checkout/OrderOverviewItem/OrderOverviewItem.test.tsx +0 -42
- package/__tests__/components/Checkout/PaymentTypeCard/PaymentTypeCard.test.tsx +0 -50
- package/__tests__/components/Checkout/RadioGroup.test.tsx +0 -95
- package/__tests__/components/Checkout/ServiceCardWrapper.test.tsx +0 -53
- package/__tests__/components/Checkout/Switcher.test.tsx +0 -43
- package/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +0 -613
- package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +0 -335
- package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/AdditionalOrderInfo.test.tsx +0 -127
- package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCar.test.tsx +0 -58
- package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCard.test.tsx +0 -74
- package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusSection.test.tsx +0 -62
- package/__tests__/components/UserDasboardPage/sections/RequestedCarsSection/RequestedCarsSection.test.tsx +0 -117
- package/__tests__/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.test.tsx +0 -58
- package/__tests__/components/VehicleSmallCard/VehicleInfo.test.tsx +0 -88
- package/__tests__/components/VehicleSmallCard/VehicleTitle.test.tsx +0 -91
- package/__tests__/components/_common/Badge/Badge.test.tsx +0 -15
- package/__tests__/components/_common/IconSVG/IconSVG.test.tsx +0 -23
- package/__tests__/components/_common/Image/Image.test.tsx +0 -82
- package/__tests__/components/_common/MaterialAutocomplete/MaterialAutocomplete.test.tsx +0 -49
- package/__tests__/components/_common/MaterialDatePicker/MaterialDatePicker.test.tsx +0 -54
- package/__tests__/components/_common/MaterialField/MaterialField.test.tsx +0 -58
- package/__tests__/components/_common/StarButton/StarButton.test.tsx +0 -46
- package/__tests__/mockedData/financingConfig.js +0 -202
- package/__tests__/mockedData/mockedPendingRequestedCar.js +0 -69
- package/__tests__/utils/CommonUtils/addPrefixToKeys.test.ts +0 -18
- package/__tests__/utils/CommonUtils/arrToObj.test.js +0 -32
- package/__tests__/utils/CommonUtils/checkRangeValuesOnEqual.test.ts +0 -17
- package/__tests__/utils/CommonUtils/fixNumber.test.ts +0 -20
- package/__tests__/utils/CommonUtils/formatMileage.test.ts +0 -8
- package/__tests__/utils/CommonUtils/getChipFilterValue.test.ts +0 -22
- package/__tests__/utils/CommonUtils/getFormattedNumber.test.ts +0 -19
- package/__tests__/utils/CommonUtils/getFormattedPrice.test.ts +0 -19
- package/__tests__/utils/CommonUtils/getGroupValuesForQuery.test.ts +0 -51
- package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +0 -64
- package/__tests__/utils/CommonUtils/getPriceRating.test.ts +0 -26
- package/__tests__/utils/CommonUtils/getPriceRatingConfig.test.ts +0 -33
- package/__tests__/utils/CommonUtils/preloadNearbyImages.test.ts +0 -9
- package/__tests__/utils/CommonUtils/sliceLessThan.test.ts +0 -23
- package/__tests__/utils/CommonUtils/sliceMoreThan.test.ts +0 -23
- package/source/components/AdvantageItem/AdvantageItem.story.js +0 -23
- package/source/components/Alternative/Dealer.story.js +0 -32
- package/source/components/Alternative/Dealer.story.styl +0 -3
- package/source/components/Breadcrumbs/Breadcrumbs.story.js +0 -40
- package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.story.js +0 -45
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.js +0 -243
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.styl +0 -21
- package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.js +0 -105
- package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.styl +0 -37
- package/source/components/Checkout/Switcher/Switcher.story.js +0 -41
- package/source/components/Checkout/Switcher/Switcher.story.styl +0 -2
- package/source/components/CompactSearchWidget/CompactSearchWidget.story.js +0 -187
- package/source/components/ContactForm/ContactForm.story.js +0 -94
- package/source/components/ContactForm/ContactForm.story.styl +0 -0
- package/source/components/ContactInfo/ContactInfo.story.js +0 -58
- package/source/components/CustomerQuote/CustomerQuote.story.js +0 -41
- package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.js +0 -73
- package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.styl +0 -5
- package/source/components/FormattedNumber/FormattedNumber.story.js +0 -114
- package/source/components/InfoBlocks/InfoBlockWrapper.story.js +0 -101
- package/source/components/InfoBlocks/InfoBlockWrapper.story.styl +0 -46
- package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.story.js +0 -97
- package/source/components/OfferPanel/OfferPanel.story.js +0 -139
- package/source/components/OfferPanel/RangeGroup/RangeGroup.story.js +0 -35
- package/source/components/OfferPanel/RangeGroup/RangeGroup.story.styl +0 -3
- package/source/components/PriceRating/PriceRating.story.js +0 -39
- package/source/components/PriceRating/PriceRating.story.styl +0 -2
- package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.js +0 -78
- package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.styl +0 -11
- package/source/components/RateSearchValue/RateSearchValue.story.js +0 -78
- package/source/components/RateSearchValue/RateSearchValue.story.styl +0 -2
- package/source/components/RateSearchWidget/RateSearchWidget.story.js +0 -57
- package/source/components/RateSearchWidget/RateSearchWidget.story.styl +0 -12
- package/source/components/SearchFilters/FiltersFactory.story.js +0 -273
- package/source/components/SearchPage/Filters/MakeModel/MakeModel.story.js +0 -12
- package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.js +0 -834
- package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.styl +0 -40
- package/source/components/SearchWidget/SearchWidget.story.js +0 -191
- package/source/components/SearchWidget/SearchWidget.story.styl +0 -6
- package/source/components/Stepper/Stepper.story.js +0 -119
- package/source/components/Stepper/Stepper.story.styl +0 -41
- package/source/components/Theme.story.js +0 -36
- package/source/components/Theme.story.styl +0 -85
- package/source/components/TickerText/TickerText.story.js +0 -17
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.story.js +0 -95
- package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.story.js +0 -97
- package/source/components/Vehicle/VehicleConsumption/VehicleConsumption.story.js +0 -31
- package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.story.js +0 -247
- package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.story.js +0 -30
- package/source/components/VehicleCompared/ComparePrice/ComparePrice.story.js +0 -18
- package/source/components/VehicleCompared/CompareTitle/CompareTitle.story.js +0 -19
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.story.js +0 -44
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.story.js +0 -120
- package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.story.js +0 -42
- package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.story.js +0 -62
- package/source/components/VehiclePromoSlider/VehiclePromoSlider.story.js +0 -42
- package/source/components/VehicleSmallCard/VehicleSmallCard.story.js +0 -412
- package/source/components/VehicleSmallCard/VehicleSmallCard.story.styl +0 -56
- package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.js +0 -199
- package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.styl +0 -40
- package/source/components/_common/Accordion/Accordion.story.js +0 -36
- package/source/components/_common/Badge/Badge.story.js +0 -27
- package/source/components/_common/Badge/Badge.story.styl +0 -5
- package/source/components/_common/Bubble/Bubble.story.js +0 -52
- package/source/components/_common/Button/Button.story.js +0 -52
- package/source/components/_common/Button/Button.story.styl +0 -5
- package/source/components/_common/ButtonOld/Button.story.js +0 -54
- package/source/components/_common/ButtonOld/Button.story.styl +0 -5
- package/source/components/_common/Checkbox/Checkbox.story.js +0 -85
- package/source/components/_common/Checkbox/Checkbox.story.styl +0 -14
- package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.js +0 -126
- package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.styl +0 -14
- package/source/components/_common/Chip/Chip.story.js +0 -43
- package/source/components/_common/ChipList/ChipList.story.js +0 -36
- package/source/components/_common/DropDown/DropDown.story.js +0 -35
- package/source/components/_common/ExpandablePanel/ExpandablePanel.story.js +0 -41
- package/source/components/_common/Histogram/Histogram.story.js +0 -51
- package/source/components/_common/IconSVG/IconSVG.story.js +0 -21
- package/source/components/_common/IconSVG/IconSVG.story.styl +0 -25
- package/source/components/_common/Image/Image.story.js +0 -142
- package/source/components/_common/Image/Image.story.styl +0 -18
- package/source/components/_common/ImagesSet/ImagesSet.story.js +0 -34
- package/source/components/_common/ImagesSet/ImagesSet.story.styl +0 -4
- package/source/components/_common/Loader/Loader.story.js +0 -21
- package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.story.js +0 -49
- package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.js +0 -45
- package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.styl +0 -6
- package/source/components/_common/MaterialField/MaterialField.story.js +0 -87
- package/source/components/_common/MaterialField/MaterialField.story.styl +0 -34
- package/source/components/_common/MaterialSelect/MaterialSelect.story.js +0 -52
- package/source/components/_common/MaterialSelect/MaterialSelect.story.styl +0 -6
- package/source/components/_common/MaterialStepButton/MaterialStepButton.story.js +0 -47
- package/source/components/_common/MaterialStepButton/MaterialStepButton.story.styl +0 -6
- package/source/components/_common/MaterialSwitch/MaterialSwitch.story.js +0 -17
- package/source/components/_common/MaterialTooltip/MaterialTooltip.story.js +0 -10
- package/source/components/_common/Modal/Modal.story.js +0 -37
- package/source/components/_common/MuiGroupedSelect/MuiGroupedSelect.story.js +0 -21
- package/source/components/_common/PropertySelector/PSGroup.story.js +0 -93
- package/source/components/_common/PropertySelector/PSGroup.story.styl +0 -25
- package/source/components/_common/PropertySelector/ProperySelector.story.js +0 -83
- package/source/components/_common/Radio/FormRadioGroup.story.js +0 -28
- package/source/components/_common/Radio/FormRadioGroup.story.styl +0 -2
- package/source/components/_common/Radio/Radio.story.js +0 -54
- package/source/components/_common/Radio/RadioGroup.story.js +0 -90
- package/source/components/_common/Radio/RadioGroup.story.styl +0 -39
- package/source/components/_common/Range/Range.story.js +0 -46
- package/source/components/_common/Range/Range.story.styl +0 -5
- package/source/components/_common/SliderArrow/SliderArrow.story.js +0 -18
- package/source/components/_common/Tabs/Tabs.story.js +0 -56
- package/source/components/_common/TimePicker/TimePicker.story.js +0 -37
- package/source/components/_common/Tooltip/Tooltip.story.js +0 -28
- package/source/components/_common/UserMenu/MaterialMenu.story.js +0 -73
- package/source/components/_common/VehicleSlider/VehicleSlider.story.js +0 -99
- package/source/components/_common/VehicleSlider/VehicleSlider.story.styl +0 -0
- package/source/components/_common/withLabel/withLabel.story.js +0 -62
- package/source/components/_common/withPopover/withPopover.story.js +0 -48
- package/source/components/_common/withPopover/withPopover.story.styl +0 -54
- package/source/components/_common/withStats/withStats.story.js +0 -75
package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx
DELETED
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import FavoriteSection from '../../../../../source/components/UserDashboardPage/sections/FavoriteSection/FavoriteSection';
|
|
4
|
-
import { observable } from 'mobx';
|
|
5
|
-
import qs from 'qs';
|
|
6
|
-
|
|
7
|
-
const t = (phrase: string | string[], options: object) => {
|
|
8
|
-
if (options) {
|
|
9
|
-
const value = Object.values(options).map((option) => option);
|
|
10
|
-
return `${phrase} ${value}`;
|
|
11
|
-
}
|
|
12
|
-
return phrase;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
interface IWithRouter {
|
|
16
|
-
children?: JSX.Element;
|
|
17
|
-
link?: string;
|
|
18
|
-
}
|
|
19
|
-
const LinkRouter = ({ children, link }: IWithRouter) => {
|
|
20
|
-
return (
|
|
21
|
-
<a href={link} >
|
|
22
|
-
{children}
|
|
23
|
-
</a>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
const favoriteCars = [
|
|
27
|
-
{
|
|
28
|
-
parkedFor: 'N/A',
|
|
29
|
-
id: 'c4c9141a-5e4c-4d75-9d0f-c2f1b8f31241',
|
|
30
|
-
mainImageId: ' ',
|
|
31
|
-
imagesCount: ' ',
|
|
32
|
-
hasInteriorExteriorPhoto: ' ',
|
|
33
|
-
title: {
|
|
34
|
-
make: 'Volkswagen',
|
|
35
|
-
model: 'Polo',
|
|
36
|
-
subModel: '1.0 TSI Style',
|
|
37
|
-
option: '',
|
|
38
|
-
to: ''
|
|
39
|
-
},
|
|
40
|
-
showNewLabel: false,
|
|
41
|
-
info: {
|
|
42
|
-
regDate: ' ',
|
|
43
|
-
mileage: 0,
|
|
44
|
-
gearbox: 'selector_gearbox_manualShift',
|
|
45
|
-
numberOfPreviousOwners: 0,
|
|
46
|
-
usageType: 'selector_unknown',
|
|
47
|
-
condition: 'selector_condition_new',
|
|
48
|
-
damaged: false,
|
|
49
|
-
driveType: 'selector_driveType_frontWheelDrive'
|
|
50
|
-
},
|
|
51
|
-
location: {
|
|
52
|
-
city: 't',
|
|
53
|
-
street: 't',
|
|
54
|
-
zipCode: 12345
|
|
55
|
-
},
|
|
56
|
-
consumption: {
|
|
57
|
-
fuel: 'selector_fuel_petrol',
|
|
58
|
-
consumptionCombined: 5.2,
|
|
59
|
-
consumptionPowerCombined: ' '
|
|
60
|
-
},
|
|
61
|
-
engineData: {
|
|
62
|
-
powerKW: 70,
|
|
63
|
-
powerPS: 70
|
|
64
|
-
},
|
|
65
|
-
environmentEmissions: {
|
|
66
|
-
co2: 118
|
|
67
|
-
},
|
|
68
|
-
offer: {
|
|
69
|
-
offerId: ' ',
|
|
70
|
-
autoDeOfferId: ' ',
|
|
71
|
-
offerFrom: 'selector_unknown',
|
|
72
|
-
offerSource: ' ',
|
|
73
|
-
offerAvailability: 'selector_unknown',
|
|
74
|
-
offerDescription: '',
|
|
75
|
-
deliveryDate: 1698969600,
|
|
76
|
-
deliveryPeriod: 'selector_deliveryPeriod_days270',
|
|
77
|
-
dealerHomepage: ' ',
|
|
78
|
-
closedDomain: ' ',
|
|
79
|
-
export: ' ',
|
|
80
|
-
commercial: ' ',
|
|
81
|
-
warranty: false,
|
|
82
|
-
rentingPossible: ' ',
|
|
83
|
-
newHuAu: true,
|
|
84
|
-
internalNumber: '118_92436S/3243',
|
|
85
|
-
availabilityMode: 'selector_availabilityMode_fromDate',
|
|
86
|
-
mobileDeOfferId: ' ',
|
|
87
|
-
as24DeOfferId: ' ',
|
|
88
|
-
elnOfferId: 'bd11b00a8d643e16b69c308360e5236b'
|
|
89
|
-
},
|
|
90
|
-
price: {
|
|
91
|
-
offerIndex: 0,
|
|
92
|
-
isStrike: false,
|
|
93
|
-
comparable: {
|
|
94
|
-
annualMileage: 10000,
|
|
95
|
-
firstInstallment: ' ',
|
|
96
|
-
paybackPeriod: 48,
|
|
97
|
-
withAddServices: ' ',
|
|
98
|
-
withTransportation: ' '
|
|
99
|
-
},
|
|
100
|
-
checkout: {
|
|
101
|
-
warrantyRates: [
|
|
102
|
-
0,
|
|
103
|
-
0,
|
|
104
|
-
0
|
|
105
|
-
],
|
|
106
|
-
warrantyPackage: 0,
|
|
107
|
-
warrantyPeriod: 1,
|
|
108
|
-
admissionService: 0,
|
|
109
|
-
licensePlateFee: 0
|
|
110
|
-
},
|
|
111
|
-
common: {
|
|
112
|
-
firstRegistration: ' ',
|
|
113
|
-
mileage: 0,
|
|
114
|
-
currentSalesPrice: 30666,
|
|
115
|
-
highestPrice: 34232,
|
|
116
|
-
isStrikeShown: true,
|
|
117
|
-
isHybridOrElectric: false
|
|
118
|
-
},
|
|
119
|
-
financing: {
|
|
120
|
-
grossLoanAmountWithoutFinalInstallment: 0,
|
|
121
|
-
purchasePrice: 0,
|
|
122
|
-
hasPaymentProtection: false,
|
|
123
|
-
paymentProtectionInsurance: 0,
|
|
124
|
-
monthlyInstallment: 142,
|
|
125
|
-
oldMonthlyInstallment: 180,
|
|
126
|
-
annualMileage: 25000,
|
|
127
|
-
firstInstallment: 11900,
|
|
128
|
-
withTransportation: false,
|
|
129
|
-
withAddServices: true,
|
|
130
|
-
addServicesCostRaw: 799,
|
|
131
|
-
addServicesCost: 799,
|
|
132
|
-
transportationCostRaw: 499,
|
|
133
|
-
transportationCost: 499,
|
|
134
|
-
withFinalInstallment: true,
|
|
135
|
-
paybackPeriod: 72,
|
|
136
|
-
rawPaybackPeriod: 72,
|
|
137
|
-
nominalInterestRate: 3.92,
|
|
138
|
-
annualPercentageRate: 6.99,
|
|
139
|
-
financialInstitution: 'Santander Consumer Bank AG, Santander-Platz 1, 41061 Mönchengladbach',
|
|
140
|
-
periodInterestRate: [
|
|
141
|
-
{
|
|
142
|
-
duration: 12,
|
|
143
|
-
recommended: 70,
|
|
144
|
-
current: 88,
|
|
145
|
-
inEUR: ' ',
|
|
146
|
-
value: 18766,
|
|
147
|
-
highestValue: 30124.16
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
duration: 24,
|
|
151
|
-
recommended: 66,
|
|
152
|
-
current: 77,
|
|
153
|
-
inEUR: ' ',
|
|
154
|
-
value: 18766,
|
|
155
|
-
highestValue: 26358.64
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
duration: 36,
|
|
159
|
-
recommended: 60,
|
|
160
|
-
current: 66,
|
|
161
|
-
inEUR: ' ',
|
|
162
|
-
value: 18766,
|
|
163
|
-
highestValue: 22593.12
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
duration: 48,
|
|
167
|
-
recommended: 50,
|
|
168
|
-
current: 60,
|
|
169
|
-
inEUR: ' ',
|
|
170
|
-
value: 17920.2,
|
|
171
|
-
highestValue: 20539.2
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
duration: 60,
|
|
175
|
-
recommended: 40,
|
|
176
|
-
current: 50,
|
|
177
|
-
inEUR: ' ',
|
|
178
|
-
value: 14933.5,
|
|
179
|
-
highestValue: 17116
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
duration: 72,
|
|
183
|
-
recommended: 30,
|
|
184
|
-
current: 40,
|
|
185
|
-
inEUR: ' ',
|
|
186
|
-
value: 11946.8,
|
|
187
|
-
highestValue: 13692.8
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
duration: 84,
|
|
191
|
-
recommended: 20,
|
|
192
|
-
current: 30,
|
|
193
|
-
inEUR: ' ',
|
|
194
|
-
value: 8960.1,
|
|
195
|
-
highestValue: 10269.6
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
duration: 96,
|
|
199
|
-
recommended: 10,
|
|
200
|
-
current: 20,
|
|
201
|
-
inEUR: ' ',
|
|
202
|
-
value: 5973.4,
|
|
203
|
-
highestValue: 6846.4
|
|
204
|
-
}
|
|
205
|
-
],
|
|
206
|
-
closingCosts: 0,
|
|
207
|
-
offersFinancing: true,
|
|
208
|
-
rateMode: 'dealer'
|
|
209
|
-
},
|
|
210
|
-
buy: {
|
|
211
|
-
withTransportation: false,
|
|
212
|
-
withAddServices: true,
|
|
213
|
-
withoutAddServices: true,
|
|
214
|
-
transportationCost: 499,
|
|
215
|
-
addServicesCost: 799,
|
|
216
|
-
currentSalesPriceExtra: 30666,
|
|
217
|
-
highestPriceExtra: 34232,
|
|
218
|
-
extraCost: 0
|
|
219
|
-
},
|
|
220
|
-
leasing: {
|
|
221
|
-
RWG: 7,
|
|
222
|
-
maxAge: 24,
|
|
223
|
-
maxMileage: 1000000,
|
|
224
|
-
isActive: true,
|
|
225
|
-
withTransportation: false,
|
|
226
|
-
withAddServices: false,
|
|
227
|
-
addServicesCostRaw: 799,
|
|
228
|
-
transportationCostRaw: 499,
|
|
229
|
-
addServicesCost: 799,
|
|
230
|
-
transportationCost: 499,
|
|
231
|
-
monthlyAddServices: 0,
|
|
232
|
-
monthlyTransportation: 0,
|
|
233
|
-
monthlyInstallment: 441,
|
|
234
|
-
oldMonthlyInstallment: 526,
|
|
235
|
-
firstInstallment: 20,
|
|
236
|
-
firstInstallmentMax: 2000,
|
|
237
|
-
annualMileage: 10000,
|
|
238
|
-
paybackPeriodRange: [
|
|
239
|
-
30,
|
|
240
|
-
36,
|
|
241
|
-
42,
|
|
242
|
-
48,
|
|
243
|
-
54,
|
|
244
|
-
60
|
|
245
|
-
],
|
|
246
|
-
paybackPeriod: 48,
|
|
247
|
-
santanderPayBackMin: 250,
|
|
248
|
-
nominalInterestRate: 6.78,
|
|
249
|
-
financialInstitution: 'Santander Consumer Bank AG, Santander-Platz 1, 41061 Mönchengladbach',
|
|
250
|
-
grossLoanAmountWithoutFinalInstallment: 0,
|
|
251
|
-
hasPaymentProtection: false,
|
|
252
|
-
paymentProtectionInsurance: 1100,
|
|
253
|
-
leasingMode: 'default',
|
|
254
|
-
currentSalesPrice: 30666
|
|
255
|
-
},
|
|
256
|
-
abo: {
|
|
257
|
-
paybackPeriod: 6,
|
|
258
|
-
annualMileage: 10000
|
|
259
|
-
},
|
|
260
|
-
firstRegistration: ' ',
|
|
261
|
-
mileage: 0,
|
|
262
|
-
currentSalesPrice: 30666,
|
|
263
|
-
highestPrice: 34232,
|
|
264
|
-
isStrikeShown: true,
|
|
265
|
-
carId: 'c4c9141a-5e4c-4d75-9d0f-c2f1b8f31241',
|
|
266
|
-
offerName: 'financing',
|
|
267
|
-
vehicleId: 'c4c9141a-5e4c-4d75-9d0f-c2f1b8f31241',
|
|
268
|
-
vatRate: 19,
|
|
269
|
-
mlCurrentSalesPricePredicted: ' ',
|
|
270
|
-
historyPriceDifference: 3566,
|
|
271
|
-
historyPriceDifferencePerCent: 10,
|
|
272
|
-
margin: 30666,
|
|
273
|
-
toRound: false
|
|
274
|
-
},
|
|
275
|
-
internalNumber: '118_92436S/3243',
|
|
276
|
-
vin: '',
|
|
277
|
-
isOnline: true,
|
|
278
|
-
firstIsOnline: 1675668230,
|
|
279
|
-
url: '/search/vehicle/c4c9141a-5e4c-4d75-9d0f-c2f1b8f31241',
|
|
280
|
-
relativeScore: 0,
|
|
281
|
-
baseUrl: '',
|
|
282
|
-
offerSource: '',
|
|
283
|
-
crawledAt: '',
|
|
284
|
-
ownerName: 'Guardian of Auto.de',
|
|
285
|
-
modificationDate: '18.05.2023',
|
|
286
|
-
seoText: ''
|
|
287
|
-
}
|
|
288
|
-
];
|
|
289
|
-
const favoritesIDs = [
|
|
290
|
-
'b359d74f-bb96-4fca-9539-579792fe7c36'
|
|
291
|
-
];
|
|
292
|
-
const getFavoriteCarsMock = jest.fn();
|
|
293
|
-
|
|
294
|
-
const aggStatsData = observable({
|
|
295
|
-
'b359d74f-bb96-4fca-9539-579792fe7c36': {
|
|
296
|
-
carId: 'b359d74f-bb96-4fca-9539-579792fe7c36',
|
|
297
|
-
totalFavCount: 3,
|
|
298
|
-
totalCarImpCount: 7399,
|
|
299
|
-
slidingCarImpCount: 10
|
|
300
|
-
},
|
|
301
|
-
get() {
|
|
302
|
-
return {
|
|
303
|
-
'b359d74f-bb96-4fca-9539-579792fe7c36': {
|
|
304
|
-
carId: 'b359d74f-bb96-4fca-9539-579792fe7c36',
|
|
305
|
-
totalFavCount: 3,
|
|
306
|
-
totalCarImpCount: 7399,
|
|
307
|
-
slidingCarImpCount: 10
|
|
308
|
-
}
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
|
-
const mockProps = {
|
|
313
|
-
t,
|
|
314
|
-
LinkRouter,
|
|
315
|
-
favoriteCars,
|
|
316
|
-
PLACEHOLDER_IMAGE_SMALL_URL: 'PLACEHOLDER_IMAGE_SMALL_URL',
|
|
317
|
-
favoriteStore: { favoriteCars, favoritesIDs, showList: true, getFavouriteCars: getFavoriteCarsMock, getFavoritesIDs: jest.fn() },
|
|
318
|
-
appStore: {},
|
|
319
|
-
carsStore: { aggStatsData, getAggStatsData: jest.fn() },
|
|
320
|
-
imagesStore: { getSupportedImageFormat: jest.fn() }
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
describe('FavoriteSection', () => {
|
|
324
|
-
test('calls getFavouriteCars when component is mounted', () => {
|
|
325
|
-
const { container } = render(<FavoriteSection {...mockProps as any} />);
|
|
326
|
-
expect(container).toBeInTheDocument();
|
|
327
|
-
// expect(mockProps.favoriteStore.getFavouriteCars).toHaveBeenCalledTimes(1);
|
|
328
|
-
});
|
|
329
|
-
test('should display correct car data', () => {
|
|
330
|
-
const { container } = render(<FavoriteSection {...mockProps as any} />);
|
|
331
|
-
mockProps.favoriteCars.forEach((element:any) => {
|
|
332
|
-
expect(container).toHaveTextContent(element.title.make);
|
|
333
|
-
});
|
|
334
|
-
});
|
|
335
|
-
});
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react'
|
|
3
|
-
import AdditionalOrderInfo from '../../../../../source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo';
|
|
4
|
-
import { getFormattedPrice } from '../../../../../source/framework/utils/CommonUtils';
|
|
5
|
-
|
|
6
|
-
const t = (phrase: string | string[], options?: object): string | string[] => {
|
|
7
|
-
if (options) {
|
|
8
|
-
const value = Object.values(options).map((option) => option)
|
|
9
|
-
return `${phrase} ${value}`;
|
|
10
|
-
}
|
|
11
|
-
return phrase;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const commonProps = {
|
|
15
|
-
t,
|
|
16
|
-
redirectToUrl: () => {},
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const additionalOrderData = (buyingType: 'buy' | 'leasing' | 'financing', objectData: any) => {
|
|
20
|
-
const {
|
|
21
|
-
customerFirstname,
|
|
22
|
-
customerLastname,
|
|
23
|
-
currentSalesPrice,
|
|
24
|
-
preparationCost,
|
|
25
|
-
registrationCost,
|
|
26
|
-
licensePlateCost,
|
|
27
|
-
transportationCost,
|
|
28
|
-
monthlyInstallment,
|
|
29
|
-
paybackPeriod,
|
|
30
|
-
deposit
|
|
31
|
-
} = objectData;
|
|
32
|
-
return {
|
|
33
|
-
addressData: [
|
|
34
|
-
{ label: 'Billing address:', value: `${customerFirstname} ${customerLastname}` },
|
|
35
|
-
{ label: 'Vehicle delivery:', value: 'Hannes Käther, Wittenberger Str. 81, 04129 Leipzig' }
|
|
36
|
-
],
|
|
37
|
-
carPriceData: [
|
|
38
|
-
{ label: 'Car price', value: getFormattedPrice(currentSalesPrice, '$,.2f', ' €') },
|
|
39
|
-
{ label: 'Preparation cost', value: getFormattedPrice(preparationCost, '$,.2f', ' €')},
|
|
40
|
-
{ label: 'vehicle registration', value: getFormattedPrice(registrationCost, '$,.2f', ' €') },
|
|
41
|
-
{ label: 'license plates', value: getFormattedPrice(licensePlateCost, '$,.2f', ' €') },
|
|
42
|
-
{ label: 'Delivery', value: getFormattedPrice(transportationCost, '$,.2f', ' €') },
|
|
43
|
-
...(buyingType !== 'buy') ? [
|
|
44
|
-
{ label: `${buyingType} rate`, value: `${getFormattedPrice(monthlyInstallment, '$,.2f', '', '€')} per month` },
|
|
45
|
-
{ label: 'Running time (months)', value: `${paybackPeriod} months` },
|
|
46
|
-
{ label: 'Deposit', value: getFormattedPrice(deposit, '$,.2f', ' €') }
|
|
47
|
-
] : []
|
|
48
|
-
],
|
|
49
|
-
overallRate: {
|
|
50
|
-
label: 'Your overall rate',
|
|
51
|
-
value: buyingType === 'buy' ? currentSalesPrice : monthlyInstallment
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
describe('AdditionalOrderInfo', () => {
|
|
57
|
-
it('renders AdditionalOrderInfo component without error', () => {
|
|
58
|
-
const objectData = {
|
|
59
|
-
customerFirstname: 'firstName',
|
|
60
|
-
customerLastname: 'lastName',
|
|
61
|
-
currentSalesPrice: 12000,
|
|
62
|
-
preparationCost: 1200,
|
|
63
|
-
registrationCost: 1000,
|
|
64
|
-
licensePlateCost: 1200,
|
|
65
|
-
transportationCost: 3000,
|
|
66
|
-
monthlyInstallment: 1000,
|
|
67
|
-
paybackPeriod: 48,
|
|
68
|
-
deposit: 5000
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const additionalOrderInfoProps = {
|
|
72
|
-
...commonProps,
|
|
73
|
-
buyingType: 'leasing',
|
|
74
|
-
additionalOrderData: additionalOrderData('leasing', objectData)
|
|
75
|
-
}
|
|
76
|
-
const { container } = render(<AdditionalOrderInfo {...additionalOrderInfoProps} />);
|
|
77
|
-
expect(container).toBeInTheDocument();
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
it('renders AdditionalOrderInfo component without some data', () => {
|
|
81
|
-
const objectData = {
|
|
82
|
-
customerFirstname: 'firstName',
|
|
83
|
-
customerLastname: 'lastName',
|
|
84
|
-
currentSalesPrice: 12000,
|
|
85
|
-
preparationCost: 1200,
|
|
86
|
-
registrationCost: 1000
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const additionalOrderInfoProps = {
|
|
90
|
-
...commonProps,
|
|
91
|
-
buyingType: 'leasing',
|
|
92
|
-
additionalOrderData: additionalOrderData('leasing', objectData)
|
|
93
|
-
}
|
|
94
|
-
const { container } = render(<AdditionalOrderInfo {...additionalOrderInfoProps} />);
|
|
95
|
-
expect(container).toBeInTheDocument();
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
it('renders AdditionalOrderInfo component with "buy" buying type', () => {
|
|
99
|
-
const objectData = {
|
|
100
|
-
customerFirstname: 'firstName',
|
|
101
|
-
customerLastname: 'lastName',
|
|
102
|
-
currentSalesPrice: 12000,
|
|
103
|
-
preparationCost: 1200,
|
|
104
|
-
registrationCost: 1000
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const additionalOrderInfoProps = {
|
|
108
|
-
...commonProps,
|
|
109
|
-
buyingType: 'buy',
|
|
110
|
-
additionalOrderData: additionalOrderData('buy', objectData)
|
|
111
|
-
}
|
|
112
|
-
const { container } = render(<AdditionalOrderInfo {...additionalOrderInfoProps} />);
|
|
113
|
-
expect(container).toBeInTheDocument();
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
it('renders AdditionalOrderInfo component without any data', () => {
|
|
117
|
-
const objectData = {};
|
|
118
|
-
|
|
119
|
-
const additionalOrderInfoProps = {
|
|
120
|
-
...commonProps,
|
|
121
|
-
buyingType: 'leasing',
|
|
122
|
-
additionalOrderData: additionalOrderData('leasing', objectData)
|
|
123
|
-
}
|
|
124
|
-
const { container } = render(<AdditionalOrderInfo {...additionalOrderInfoProps} />);
|
|
125
|
-
expect(container).toBeInTheDocument();
|
|
126
|
-
});
|
|
127
|
-
});
|
package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCar.test.tsx
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, fireEvent } from '@testing-library/react';
|
|
3
|
-
import OrderStatusCar from '../../../../../source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCar';
|
|
4
|
-
|
|
5
|
-
const t = (phrase: string | string[], options?: object): string | string[] => {
|
|
6
|
-
if (options) {
|
|
7
|
-
const value = Object.values(options).map((option) => option)
|
|
8
|
-
return `${phrase} ${value}`;
|
|
9
|
-
}
|
|
10
|
-
return phrase;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const mockProps = {
|
|
14
|
-
t,
|
|
15
|
-
make: 'Test Make',
|
|
16
|
-
model: 'Test Model',
|
|
17
|
-
subModel: 'test car',
|
|
18
|
-
buyingType: 'buy',
|
|
19
|
-
imageUrl: 'https://images.autode-dev.de/carimage/28121b1a-398c-4e9c-9097-51be545817c5/RQ_mHNek5hIk/small-cached.webp',
|
|
20
|
-
selfPickup: false,
|
|
21
|
-
paybackPeriod: 12,
|
|
22
|
-
monthlyInstallment: 2000,
|
|
23
|
-
status: 'selector_status_order_received',
|
|
24
|
-
request: '1234abcd',
|
|
25
|
-
registration: false,
|
|
26
|
-
currentSalesPrice: 30000,
|
|
27
|
-
onClick: jest.fn()
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
describe('OrderStatusCar', () => {
|
|
31
|
-
it('renders OrderStatusCar component without error', () => {
|
|
32
|
-
const { container } = render(<OrderStatusCar {...mockProps} />);
|
|
33
|
-
expect(container).toBeInTheDocument();
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it('should display correct car make and model', () => {
|
|
37
|
-
const { getByText } = render(<OrderStatusCar {...mockProps} />);
|
|
38
|
-
expect(getByText(`${mockProps.make} ${mockProps.model}`)).toBeInTheDocument();
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it('should display correct car characteristics', () => {
|
|
42
|
-
const { getByText } = render(<OrderStatusCar {...mockProps} />);
|
|
43
|
-
expect(getByText(mockProps.subModel)).toBeInTheDocument();
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
it('should display correct car image', () => {
|
|
47
|
-
const { getByTestId } = render(<OrderStatusCar {...mockProps}/>);
|
|
48
|
-
const carImage = getByTestId('car-image');
|
|
49
|
-
expect(carImage).toHaveAttribute('src', mockProps.imageUrl);
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it('should call onClick function when user clicks on the car card', () => {
|
|
53
|
-
const { getByTestId } = render(<OrderStatusCar {...mockProps} />);
|
|
54
|
-
const carCard = getByTestId('car-card');
|
|
55
|
-
fireEvent.click(carCard);
|
|
56
|
-
expect(mockProps.onClick).toHaveBeenCalled();
|
|
57
|
-
});
|
|
58
|
-
});
|
package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCard.test.tsx
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import OrderStatusCard from '../../../../../source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCard';
|
|
4
|
-
|
|
5
|
-
describe('OrderStatusCard', () => {
|
|
6
|
-
const icon = 'orderReceivedDashboard';
|
|
7
|
-
const title = 'Test title';
|
|
8
|
-
const description = 'Test description';
|
|
9
|
-
it('render container without errors', () => {
|
|
10
|
-
const { container } = render(
|
|
11
|
-
<OrderStatusCard
|
|
12
|
-
icon={icon}
|
|
13
|
-
title={title}
|
|
14
|
-
description={description}
|
|
15
|
-
/>
|
|
16
|
-
);
|
|
17
|
-
expect(container).toBeInTheDocument();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('renders a card with title, description, and icon', () => {
|
|
21
|
-
const { getByText, container, debug } = render(
|
|
22
|
-
<OrderStatusCard
|
|
23
|
-
icon={icon}
|
|
24
|
-
title={title}
|
|
25
|
-
description={description}
|
|
26
|
-
/>
|
|
27
|
-
);
|
|
28
|
-
const cardTitle = getByText(title);
|
|
29
|
-
expect(cardTitle).toBeInTheDocument();
|
|
30
|
-
const cardDescription = getByText(description);
|
|
31
|
-
expect(cardDescription).toBeInTheDocument();
|
|
32
|
-
const svgElement = container.querySelector('svg');
|
|
33
|
-
expect(svgElement).toBeInTheDocument();
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it('adds "notReachedTitle" class for title when "isDisabled" prop is set', () => {
|
|
37
|
-
const { getByTestId, debug } = render(
|
|
38
|
-
<OrderStatusCard
|
|
39
|
-
icon={icon}
|
|
40
|
-
title={title}
|
|
41
|
-
description={description}
|
|
42
|
-
isDisabled={true}
|
|
43
|
-
/>
|
|
44
|
-
);
|
|
45
|
-
const cardTitle = getByTestId('cardTitle');
|
|
46
|
-
expect(cardTitle).toHaveClass('notReachedTitle');
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('adds "isDoneTitle" class for title when "isDone" prop is set', () => {
|
|
50
|
-
const { getByTestId, debug } = render(
|
|
51
|
-
<OrderStatusCard
|
|
52
|
-
icon={icon}
|
|
53
|
-
title={title}
|
|
54
|
-
description={description}
|
|
55
|
-
isDone={true}
|
|
56
|
-
/>
|
|
57
|
-
);
|
|
58
|
-
const cardTitle = getByTestId('cardTitle');
|
|
59
|
-
expect(cardTitle).toHaveClass('isDoneTitle');
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it('adds "cardInProgress" class for card when "isActive" prop is set', () => {
|
|
63
|
-
const { getByTestId, debug } = render(
|
|
64
|
-
<OrderStatusCard
|
|
65
|
-
icon={icon}
|
|
66
|
-
title={title}
|
|
67
|
-
description={description}
|
|
68
|
-
isActive={true}
|
|
69
|
-
/>
|
|
70
|
-
);
|
|
71
|
-
const orderStatusCard = getByTestId('orderStatusCard');
|
|
72
|
-
expect(orderStatusCard).toHaveClass('cardInProgress');
|
|
73
|
-
});
|
|
74
|
-
});
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react'
|
|
3
|
-
import OrderStatusSection from '../../../../../source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection';
|
|
4
|
-
import { car } from '../../../../mockedData/mockedPendingRequestedCar';
|
|
5
|
-
|
|
6
|
-
const t = (phrase: string | string[], options?: object): string | string[] => {
|
|
7
|
-
if (options) {
|
|
8
|
-
const value = Object.values(options).map((option) => option)
|
|
9
|
-
return `${phrase} ${value}`;
|
|
10
|
-
}
|
|
11
|
-
return phrase;
|
|
12
|
-
}
|
|
13
|
-
const leasingCar = car;
|
|
14
|
-
const financingCar = { ...car, buyingType: 'financing' };
|
|
15
|
-
const buyCar = { ...car, buyingType: 'buy' };
|
|
16
|
-
|
|
17
|
-
const commonProps = {
|
|
18
|
-
t,
|
|
19
|
-
isFetching: false,
|
|
20
|
-
getSupportedImageFormat: () => {
|
|
21
|
-
return 'https://images.autode-dev.de/carimage/28121b1a-398c-4e9c-9097-51be545817c5/RQ_mHNek5hIk/small-cached.webp'
|
|
22
|
-
},
|
|
23
|
-
redirectToUrl: () => {},
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
describe('OrderStatusSection', () => {
|
|
27
|
-
it('renders OrderStatusSection component without error', () => {
|
|
28
|
-
const orderStatusSectionProps = {
|
|
29
|
-
...commonProps,
|
|
30
|
-
orderedCars: [
|
|
31
|
-
leasingCar,
|
|
32
|
-
financingCar,
|
|
33
|
-
buyCar
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
const { container } = render(<OrderStatusSection {...orderStatusSectionProps} />);
|
|
37
|
-
expect(container).toBeInTheDocument();
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('renders OrderStatusSection component without cars', () => {
|
|
41
|
-
const orderStatusSectionProps = {
|
|
42
|
-
...commonProps,
|
|
43
|
-
orderedCars: [] as any[]
|
|
44
|
-
}
|
|
45
|
-
const { container } = render(<OrderStatusSection {...orderStatusSectionProps} />);
|
|
46
|
-
expect(container).toBeInTheDocument();
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('renders OrderStatusSection component with additional data', () => {
|
|
50
|
-
const orderStatusSectionProps = {
|
|
51
|
-
...commonProps,
|
|
52
|
-
withAdditionalData: true,
|
|
53
|
-
orderedCars: [
|
|
54
|
-
leasingCar,
|
|
55
|
-
financingCar,
|
|
56
|
-
buyCar
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
const { container } = render(<OrderStatusSection {...orderStatusSectionProps} />);
|
|
60
|
-
expect(container).toBeInTheDocument();
|
|
61
|
-
});
|
|
62
|
-
});
|