test(seller): add MSW handler and story for transfers

This commit is contained in:
senke 2026-02-23 22:57:35 +01:00
parent fdd750d772
commit 5835469ef2
2 changed files with 30 additions and 0 deletions

View file

@ -28,6 +28,9 @@ export const Default: Story = {};
/** Balance card shows available/pending when Stripe Connect is connected */
export const WithBalance: Story = {};
/** Transfer history card visible with mock transfers */
export const WithTransfers: Story = {};
/** Balance card shows "Configurer les paiements" when not yet onboarded */
export const NotConnected: Story = {
parameters: {

View file

@ -76,6 +76,33 @@ export const handlersMarketplace = [
});
}),
// v0.603: Seller transfer history
http.get('*/api/v1/sell/transfers', () => {
return HttpResponse.json({
success: true,
data: [
{
id: 'tr-1',
order_id: 'ord-1',
amount_cents: 2699,
platform_fee_cents: 300,
currency: 'EUR',
status: 'completed',
created_at: new Date().toISOString(),
},
{
id: 'tr-2',
order_id: 'ord-2',
amount_cents: 1799,
platform_fee_cents: 200,
currency: 'EUR',
status: 'completed',
created_at: new Date(Date.now() - 86400000).toISOString(),
},
],
});
}),
http.get('*/api/v1/sell/sales', () => {
return HttpResponse.json({
success: true,