mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
(Redirect tx with payment-pending to checkout page and clear card paymenterrors from store.)
446 lines
14 KiB
Text
446 lines
14 KiB
Text
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`TransactionPage - Order matches snapshot 1`] = `
|
|
<Page
|
|
scrollingDisabled={false}
|
|
title="TransactionPage.title"
|
|
>
|
|
<LayoutSingleColumn
|
|
className={null}
|
|
rootClassName={null}
|
|
>
|
|
<LayoutWrapperTopbar
|
|
className={null}
|
|
rootClassName={null}
|
|
>
|
|
<withRouter(Connect(TopbarContainerComponent)) />
|
|
</LayoutWrapperTopbar>
|
|
<LayoutWrapperMain
|
|
className={null}
|
|
rootClassName={null}
|
|
>
|
|
<div>
|
|
<InjectIntl(TransactionPanelComponent)
|
|
acceptInProgress={false}
|
|
acceptSaleError={null}
|
|
className=""
|
|
currentUser={
|
|
Object {
|
|
"attributes": Object {
|
|
"banned": false,
|
|
"deleted": false,
|
|
"email": "customer1@example.com",
|
|
"emailVerified": true,
|
|
"profile": Object {
|
|
"abbreviatedName": "customer1 abbreviated name",
|
|
"displayName": "customer1 display name",
|
|
"firstName": "customer1 first name",
|
|
"lastName": "customer1 last name",
|
|
},
|
|
},
|
|
"id": UUID {
|
|
"_sdkType": "UUID",
|
|
"uuid": "customer1",
|
|
},
|
|
"type": "currentUser",
|
|
}
|
|
}
|
|
declineInProgress={false}
|
|
declineSaleError={null}
|
|
fetchMessagesError={null}
|
|
fetchMessagesInProgress={false}
|
|
fetchTimeSlotsError={null}
|
|
initialMessageFailed={false}
|
|
messages={Array []}
|
|
oldestMessagePageFetched={0}
|
|
onAcceptSale={[Function]}
|
|
onDeclineSale={[Function]}
|
|
onSendMessage={[Function]}
|
|
onShowMoreMessages={[Function]}
|
|
onSubmitBookingRequest={[Function]}
|
|
sendMessageError={null}
|
|
sendMessageInProgress={false}
|
|
timeSlots={null}
|
|
totalMessagePages={0}
|
|
transaction={
|
|
Object {
|
|
"attributes": Object {
|
|
"createdAt": 2017-05-01T00:00:00.000Z,
|
|
"lastTransition": "transition/confirm-payment",
|
|
"lastTransitionedAt": 2017-06-01T00:00:00.000Z,
|
|
"lineItems": Array [
|
|
Object {
|
|
"code": "line-item/night",
|
|
"includeFor": Array [
|
|
"customer",
|
|
"provider",
|
|
],
|
|
"lineTotal": Money {
|
|
"_sdkType": "Money",
|
|
"amount": 1000,
|
|
"currency": "USD",
|
|
},
|
|
"quantity": "3",
|
|
"reversal": false,
|
|
"unitPrice": Money {
|
|
"_sdkType": "Money",
|
|
"amount": 333.3333333333333,
|
|
"currency": "USD",
|
|
},
|
|
},
|
|
Object {
|
|
"code": "line-item/provider-commission",
|
|
"includeFor": Array [
|
|
"provider",
|
|
],
|
|
"lineTotal": Money {
|
|
"_sdkType": "Money",
|
|
"amount": -100,
|
|
"currency": "USD",
|
|
},
|
|
"reversal": false,
|
|
"unitPrice": Money {
|
|
"_sdkType": "Money",
|
|
"amount": -100,
|
|
"currency": "USD",
|
|
},
|
|
},
|
|
],
|
|
"payinTotal": Money {
|
|
"_sdkType": "Money",
|
|
"amount": 1000,
|
|
"currency": "USD",
|
|
},
|
|
"payoutTotal": Money {
|
|
"_sdkType": "Money",
|
|
"amount": 900,
|
|
"currency": "USD",
|
|
},
|
|
"transitions": Array [
|
|
Object {
|
|
"by": "customer",
|
|
"createdAt": 2017-05-01T00:00:00.000Z,
|
|
"transition": "transition/request-payment",
|
|
},
|
|
Object {
|
|
"by": "customer",
|
|
"createdAt": 2017-05-01T00:00:01.000Z,
|
|
"transition": "transition/confirm-payment",
|
|
},
|
|
Object {
|
|
"by": "provider",
|
|
"createdAt": 2017-06-01T00:00:00.000Z,
|
|
"transition": "transition/accept",
|
|
},
|
|
],
|
|
},
|
|
"booking": Object {
|
|
"attributes": Object {
|
|
"displayEnd": 2017-06-13T00:00:00.000Z,
|
|
"displayStart": 2017-06-10T00:00:00.000Z,
|
|
"end": 2017-06-13T00:00:00.000Z,
|
|
"start": 2017-06-10T00:00:00.000Z,
|
|
},
|
|
"id": UUID {
|
|
"_sdkType": "UUID",
|
|
"uuid": "booking1",
|
|
},
|
|
"type": "booking",
|
|
},
|
|
"customer": Object {
|
|
"attributes": Object {
|
|
"banned": false,
|
|
"deleted": false,
|
|
"profile": Object {
|
|
"abbreviatedName": "TT",
|
|
"displayName": "customer1 display name",
|
|
},
|
|
},
|
|
"id": UUID {
|
|
"_sdkType": "UUID",
|
|
"uuid": "customer1",
|
|
},
|
|
"type": "user",
|
|
},
|
|
"id": UUID {
|
|
"_sdkType": "UUID",
|
|
"uuid": "tx-order-1",
|
|
},
|
|
"listing": Object {
|
|
"attributes": Object {
|
|
"deleted": false,
|
|
"description": "listing1 description",
|
|
"geolocation": LatLng {
|
|
"_sdkType": "LatLng",
|
|
"lat": 40,
|
|
"lng": 60,
|
|
},
|
|
"price": Money {
|
|
"_sdkType": "Money",
|
|
"amount": 5500,
|
|
"currency": "USD",
|
|
},
|
|
"publicData": Object {},
|
|
"state": "published",
|
|
"title": "listing1 title",
|
|
},
|
|
"id": UUID {
|
|
"_sdkType": "UUID",
|
|
"uuid": "listing1",
|
|
},
|
|
"type": "listing",
|
|
},
|
|
"provider": Object {
|
|
"attributes": Object {
|
|
"banned": false,
|
|
"deleted": false,
|
|
"profile": Object {
|
|
"abbreviatedName": "TT",
|
|
"displayName": "provider1 display name",
|
|
},
|
|
},
|
|
"id": UUID {
|
|
"_sdkType": "UUID",
|
|
"uuid": "provider1",
|
|
},
|
|
"type": "user",
|
|
},
|
|
"reviews": Array [],
|
|
"type": "transaction",
|
|
}
|
|
}
|
|
transactionRole="customer"
|
|
/>
|
|
</div>
|
|
</LayoutWrapperMain>
|
|
<LayoutWrapperFooter
|
|
className={null}
|
|
rootClassName={null}
|
|
>
|
|
<InjectIntl(Footer) />
|
|
</LayoutWrapperFooter>
|
|
</LayoutSingleColumn>
|
|
</Page>
|
|
`;
|
|
|
|
exports[`TransactionPage - Sale matches snapshot 1`] = `
|
|
<Page
|
|
scrollingDisabled={false}
|
|
title="TransactionPage.title"
|
|
>
|
|
<LayoutSingleColumn
|
|
className={null}
|
|
rootClassName={null}
|
|
>
|
|
<LayoutWrapperTopbar
|
|
className={null}
|
|
rootClassName={null}
|
|
>
|
|
<withRouter(Connect(TopbarContainerComponent)) />
|
|
</LayoutWrapperTopbar>
|
|
<LayoutWrapperMain
|
|
className={null}
|
|
rootClassName={null}
|
|
>
|
|
<div>
|
|
<InjectIntl(TransactionPanelComponent)
|
|
acceptInProgress={false}
|
|
acceptSaleError={null}
|
|
className=""
|
|
currentUser={
|
|
Object {
|
|
"attributes": Object {
|
|
"banned": false,
|
|
"deleted": false,
|
|
"email": "provider1@example.com",
|
|
"emailVerified": true,
|
|
"profile": Object {
|
|
"abbreviatedName": "provider1 abbreviated name",
|
|
"displayName": "provider1 display name",
|
|
"firstName": "provider1 first name",
|
|
"lastName": "provider1 last name",
|
|
},
|
|
},
|
|
"id": UUID {
|
|
"_sdkType": "UUID",
|
|
"uuid": "provider1",
|
|
},
|
|
"type": "currentUser",
|
|
}
|
|
}
|
|
declineInProgress={false}
|
|
declineSaleError={null}
|
|
fetchMessagesError={null}
|
|
fetchTimeSlotsError={null}
|
|
initialMessageFailed={false}
|
|
messages={Array []}
|
|
oldestMessagePageFetched={0}
|
|
onAcceptSale={[Function]}
|
|
onDeclineSale={[Function]}
|
|
onSendMessage={[Function]}
|
|
onShowMoreMessages={[Function]}
|
|
onSubmitBookingRequest={[Function]}
|
|
sendMessageError={null}
|
|
sendMessageInProgress={false}
|
|
timeSlots={null}
|
|
totalMessagePages={0}
|
|
transaction={
|
|
Object {
|
|
"attributes": Object {
|
|
"createdAt": 2017-05-01T00:00:00.000Z,
|
|
"lastTransition": "transition/confirm-payment",
|
|
"lastTransitionedAt": 2017-06-01T00:00:00.000Z,
|
|
"lineItems": Array [
|
|
Object {
|
|
"code": "line-item/night",
|
|
"includeFor": Array [
|
|
"customer",
|
|
"provider",
|
|
],
|
|
"lineTotal": Money {
|
|
"_sdkType": "Money",
|
|
"amount": 1000,
|
|
"currency": "USD",
|
|
},
|
|
"quantity": "3",
|
|
"reversal": false,
|
|
"unitPrice": Money {
|
|
"_sdkType": "Money",
|
|
"amount": 333.3333333333333,
|
|
"currency": "USD",
|
|
},
|
|
},
|
|
Object {
|
|
"code": "line-item/provider-commission",
|
|
"includeFor": Array [
|
|
"provider",
|
|
],
|
|
"lineTotal": Money {
|
|
"_sdkType": "Money",
|
|
"amount": -100,
|
|
"currency": "USD",
|
|
},
|
|
"reversal": false,
|
|
"unitPrice": Money {
|
|
"_sdkType": "Money",
|
|
"amount": -100,
|
|
"currency": "USD",
|
|
},
|
|
},
|
|
],
|
|
"payinTotal": Money {
|
|
"_sdkType": "Money",
|
|
"amount": 1000,
|
|
"currency": "USD",
|
|
},
|
|
"payoutTotal": Money {
|
|
"_sdkType": "Money",
|
|
"amount": 900,
|
|
"currency": "USD",
|
|
},
|
|
"transitions": Array [
|
|
Object {
|
|
"by": "customer",
|
|
"createdAt": 2017-05-01T00:00:00.000Z,
|
|
"transition": "transition/request-payment",
|
|
},
|
|
Object {
|
|
"by": "customer",
|
|
"createdAt": 2017-05-01T00:00:01.000Z,
|
|
"transition": "transition/confirm-payment",
|
|
},
|
|
Object {
|
|
"by": "provider",
|
|
"createdAt": 2017-06-01T00:00:00.000Z,
|
|
"transition": "transition/accept",
|
|
},
|
|
],
|
|
},
|
|
"booking": Object {
|
|
"attributes": Object {
|
|
"displayEnd": 2017-06-13T00:00:00.000Z,
|
|
"displayStart": 2017-06-10T00:00:00.000Z,
|
|
"end": 2017-06-13T00:00:00.000Z,
|
|
"start": 2017-06-10T00:00:00.000Z,
|
|
},
|
|
"id": UUID {
|
|
"_sdkType": "UUID",
|
|
"uuid": "booking1",
|
|
},
|
|
"type": "booking",
|
|
},
|
|
"customer": Object {
|
|
"attributes": Object {
|
|
"banned": false,
|
|
"deleted": false,
|
|
"profile": Object {
|
|
"abbreviatedName": "TT",
|
|
"displayName": "customer1 display name",
|
|
},
|
|
},
|
|
"id": UUID {
|
|
"_sdkType": "UUID",
|
|
"uuid": "customer1",
|
|
},
|
|
"type": "user",
|
|
},
|
|
"id": UUID {
|
|
"_sdkType": "UUID",
|
|
"uuid": "tx-sale-1",
|
|
},
|
|
"listing": Object {
|
|
"attributes": Object {
|
|
"deleted": false,
|
|
"description": "listing1 description",
|
|
"geolocation": LatLng {
|
|
"_sdkType": "LatLng",
|
|
"lat": 40,
|
|
"lng": 60,
|
|
},
|
|
"price": Money {
|
|
"_sdkType": "Money",
|
|
"amount": 5500,
|
|
"currency": "USD",
|
|
},
|
|
"publicData": Object {},
|
|
"state": "published",
|
|
"title": "listing1 title",
|
|
},
|
|
"id": UUID {
|
|
"_sdkType": "UUID",
|
|
"uuid": "listing1",
|
|
},
|
|
"type": "listing",
|
|
},
|
|
"provider": Object {
|
|
"attributes": Object {
|
|
"banned": false,
|
|
"deleted": false,
|
|
"profile": Object {
|
|
"abbreviatedName": "TT",
|
|
"displayName": "provider1 display name",
|
|
},
|
|
},
|
|
"id": UUID {
|
|
"_sdkType": "UUID",
|
|
"uuid": "provider1",
|
|
},
|
|
"type": "user",
|
|
},
|
|
"reviews": Array [],
|
|
"type": "transaction",
|
|
}
|
|
}
|
|
transactionRole="provider"
|
|
/>
|
|
</div>
|
|
</LayoutWrapperMain>
|
|
<LayoutWrapperFooter
|
|
className={null}
|
|
rootClassName={null}
|
|
>
|
|
<InjectIntl(Footer) />
|
|
</LayoutWrapperFooter>
|
|
</LayoutSingleColumn>
|
|
</Page>
|
|
`;
|