|
4 | 4 | import React from 'react'; |
5 | 5 | import { render, waitFor } from '@testing-library/react'; |
6 | 6 | import { MockedProvider } from '@apollo/client/testing'; |
7 | | -import { InMemoryCache } from '@apollo/client'; |
8 | 7 | import BotRunTestStatusList from '../components/BotRunTestStatusList'; |
9 | 8 | import { TEST_PLAN_RUNS_TEST_RESULTS_QUERY } from '../components/BotRunTestStatusList/queries'; |
10 | 9 | import '@testing-library/jest-dom'; |
@@ -42,7 +41,7 @@ test('correctly displays statuses for single COMPLETED test run', async () => { |
42 | 41 | const mocks = getMocks(testPlanRuns); |
43 | 42 |
|
44 | 43 | const screen = render( |
45 | | - <MockedProvider mocks={mocks} cache={new InMemoryCache()}> |
| 44 | + <MockedProvider mocks={mocks} addTypename={false}> |
46 | 45 | <BotRunTestStatusList testPlanReportId="1" /> |
47 | 46 | </MockedProvider> |
48 | 47 | ); |
@@ -80,7 +79,7 @@ test('correctly ignores test results from a human-submitted test plan run', asyn |
80 | 79 | const mocks = getMocks(testPlanRuns); |
81 | 80 |
|
82 | 81 | const { getByText } = render( |
83 | | - <MockedProvider mocks={mocks} cache={new InMemoryCache()}> |
| 82 | + <MockedProvider mocks={mocks} addTypename={false}> |
84 | 83 | <BotRunTestStatusList testPlanReportId="1" /> |
85 | 84 | </MockedProvider> |
86 | 85 | ); |
@@ -126,7 +125,7 @@ test('correctly ignores test results from a human-submitted test plan run with a |
126 | 125 | const mocks = getMocks(testPlanRuns); |
127 | 126 |
|
128 | 127 | const { getByText } = render( |
129 | | - <MockedProvider mocks={mocks} cache={new InMemoryCache()}> |
| 128 | + <MockedProvider mocks={mocks} addTypename={false}> |
130 | 129 | <BotRunTestStatusList testPlanReportId="1" /> |
131 | 130 | </MockedProvider> |
132 | 131 | ); |
@@ -157,7 +156,7 @@ test('correctly displays statuses for CANCELLED test run', async () => { |
157 | 156 | const mocks = getMocks(testPlanRuns); |
158 | 157 |
|
159 | 158 | const { getByText } = render( |
160 | | - <MockedProvider mocks={mocks} cache={new InMemoryCache()}> |
| 159 | + <MockedProvider mocks={mocks} addTypename={false}> |
161 | 160 | <BotRunTestStatusList testPlanReportId="1" /> |
162 | 161 | </MockedProvider> |
163 | 162 | ); |
@@ -202,7 +201,7 @@ test('correctly displays statuses for multiple RUNNING and QUEUED test runs', as |
202 | 201 | const mocks = getMocks(testPlanRuns); |
203 | 202 |
|
204 | 203 | const { getByText } = render( |
205 | | - <MockedProvider mocks={mocks} cache={new InMemoryCache()}> |
| 204 | + <MockedProvider mocks={mocks} addTypename={false}> |
206 | 205 | <BotRunTestStatusList testPlanReportId="1" /> |
207 | 206 | </MockedProvider> |
208 | 207 | ); |
|
0 commit comments