update ScannerConcurrentWorkers.test
This commit is contained in:
parent
23b02e65bd
commit
4aca022b38
|
@ -9,7 +9,7 @@ import {
|
||||||
ScannerConcurrentWorkers,
|
ScannerConcurrentWorkers,
|
||||||
} from './ScannerConcurrentWorkers'
|
} from './ScannerConcurrentWorkers'
|
||||||
|
|
||||||
describe('load correct share page, based on graphql query', () => {
|
test('load ScannerConcurrentWorkers', async () => {
|
||||||
const graphqlMocks = [
|
const graphqlMocks = [
|
||||||
{
|
{
|
||||||
request: {
|
request: {
|
||||||
|
@ -33,22 +33,19 @@ describe('load correct share page, based on graphql query', () => {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
render(
|
||||||
|
<MockedProvider
|
||||||
|
mocks={graphqlMocks}
|
||||||
|
addTypename={false}
|
||||||
|
defaultOptions={{
|
||||||
|
// disable cache, required to make fragments work
|
||||||
|
watchQuery: { fetchPolicy: 'no-cache' },
|
||||||
|
query: { fetchPolicy: 'no-cache' },
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ScannerConcurrentWorkers />
|
||||||
|
</MockedProvider>
|
||||||
|
)
|
||||||
|
|
||||||
test('load media share page', async () => {
|
expect(screen.getByText('Scanner concurrent workers')).toBeInTheDocument()
|
||||||
render(
|
|
||||||
<MockedProvider
|
|
||||||
mocks={graphqlMocks}
|
|
||||||
addTypename={false}
|
|
||||||
defaultOptions={{
|
|
||||||
// disable cache, required to make fragments work
|
|
||||||
watchQuery: { fetchPolicy: 'no-cache' },
|
|
||||||
query: { fetchPolicy: 'no-cache' },
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<ScannerConcurrentWorkers />
|
|
||||||
</MockedProvider>
|
|
||||||
)
|
|
||||||
|
|
||||||
expect(screen.getByText('Scanner concurrent workers')).toBeInTheDocument()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue