feat: configure and display public seller descriptions
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-10 07:40:18 -04:00
parent e630a89e8d
commit 94c37250d1
22 changed files with 158 additions and 6 deletions
@@ -1,5 +1,21 @@
import { expect, within } from '@storybook/test';
import ProductDetailPage from './ProductDetailPage.vue';
export default { title: 'Pages/ProductDetailPage', component: ProductDetailPage };
export const Overview = {};
export const PublicSellerDescription = {
beforeEach: () => {
const originalFetch = globalThis.fetch;
globalThis.fetch = async () => new Response(JSON.stringify({ data: {
id: 'listing-1', name: 'Pikachu', productName: 'Pikachu', status: 'AVAILABLE',
askingPriceMinor: 2500, sellerDisplayName: 'Pika Collectibles',
sellerDescription: 'Independent Pokémon collector.', images: [], tags: [],
} }), { headers: { 'content-type': 'application/json' } });
return () => { globalThis.fetch = originalFetch; };
},
play: async ({ canvasElement }) => {
await expect(await within(canvasElement).findByText('Independent Pokémon collector.')).toBeVisible();
},
};