Skip to content

Commit a3ea2a3

Browse files
authored
Merge pull request #3560 from farodin91/frontend--Make-the-ServiceDetails-test-more-realistic
frontend: Make the ServiceDetails test more realistic
2 parents 6098129 + bc4649f commit a3ea2a3

File tree

3 files changed

+437
-93
lines changed

3 files changed

+437
-93
lines changed

frontend/src/components/service/ServiceDetails.stories.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,18 @@ Default.parameters = {
112112
},
113113
};
114114

115-
export const Error = Template.bind({});
116-
Error.parameters = {
115+
export const ErrorWithEndpoints = Template.bind({});
116+
ErrorWithEndpoints.parameters = {
117117
msw: {
118118
handlers: {
119119
story: [
120-
http.get('http://localhost:4466/api/v1/namespaces/default/services', () =>
120+
http.get('http://localhost:4466/api/v1/namespaces/default/services/example-service', () =>
121121
HttpResponse.json(serviceMock)
122122
),
123+
124+
http.get('http://localhost:4466/api/v1/namespaces/default/endpoints', () =>
125+
HttpResponse.error()
126+
),
123127
],
124128
},
125129
},

frontend/src/components/service/__snapshots__/ServiceDetails.Error.stories.storyshot

Lines changed: 0 additions & 90 deletions
This file was deleted.

0 commit comments

Comments
 (0)