Bugfix storybook now works with live API data or with built tests

This commit is contained in:
2026-06-17 16:06:53 -07:00
parent f944c3aac6
commit 345152b548
5 changed files with 50 additions and 16 deletions
@@ -35,7 +35,7 @@ export const Populated = {
msw: {
handlers: [
// Intercept the exact URL your component is trying to fetch
http.get('*/api/v2/dvar_vaa', () => {
http.get('*/api/v2/comm_coor_vaa', () => {
// Return a 200 OK with the mock JSON
return HttpResponse.json(mockData);
}),
@@ -49,7 +49,7 @@ export const ServerCrash = {
parameters: {
msw: {
handlers: [
http.get('*/api/v2/dvar_vaa', () => {
http.get('*/api/v2/comm_coor_vaa', () => {
// Return a 500 Error
return new HttpResponse(null, { status: 500 });
}),
@@ -63,7 +63,7 @@ export const EmptyData = {
parameters: {
msw: {
handlers: [
http.get('*/api/v2/dvar_vaa', () => {
http.get('*/api/v2/comm_coor_vaa', () => {
return HttpResponse.json([]);
}),
],