Skip to content

Commit 01bee87

Browse files
committed
tests: added paymentIntent fixture
1 parent df89f77 commit 01bee87

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

cypress/fixtures/paymentIntent.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"id": "seti_1P97rXJOZCx4IFTGW4Lm7LeN",
3+
"object": "setup_intent",
4+
"application": null,
5+
"automatic_payment_methods": null,
6+
"cancellation_reason": null,
7+
"client_secret": "seti_1P97rXJOZCx4IFTGW4Lm7LeN_secret_Pz63WeS9X578bcLAEyvHbsexFSUUk8Z",
8+
"created": 1713972959,
9+
"customer": null,
10+
"description": null,
11+
"flow_directions": null,
12+
"last_setup_error": null,
13+
"latest_attempt": null,
14+
"livemode": false,
15+
"mandate": null,
16+
"metadata": [],
17+
"next_action": null,
18+
"on_behalf_of": null,
19+
"payment_method": null,
20+
"payment_method_configuration_details": null,
21+
"payment_method_options": {
22+
"card": {
23+
"mandate_options": null,
24+
"network": null,
25+
"request_three_d_secure": "automatic"
26+
}
27+
},
28+
"payment_method_types": [
29+
"card"
30+
],
31+
"single_use_mandate": null,
32+
"status": "requires_payment_method",
33+
"usage": "off_session"
34+
}

src/stories/Forms/AddPaymentMethod.stories.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { useUserStore } from "@/stores/user";
55

66
import userFixture from "../../../cypress/fixtures/user.json";
77
import teamsFixture from "../../../cypress/fixtures/teams.json";
8+
import paymentIntent from "../../../cypress/fixtures/paymentIntent.json";
9+
810
import { expect, waitFor, within } from "@storybook/test";
911
import { useTeamStore } from "@/stores/team";
1012

@@ -30,7 +32,7 @@ const meta: Meta<typeof AddPaymentMethod> = {
3032
url: "/user/payment-intent",
3133
method: "GET",
3234
status: 200,
33-
response: null,
35+
response: paymentIntent,
3436
},
3537
],
3638
},

0 commit comments

Comments
 (0)