Bugfix storybook now works with live API data or with built tests
This commit is contained in:
@@ -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([]);
|
||||
}),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user