Do not inject servers state or actions

This commit is contained in:
Alejandro Celaya
2025-11-14 19:23:48 +01:00
parent ae7aea0e2c
commit a7f2d3224b
38 changed files with 292 additions and 375 deletions

View File

@@ -2,18 +2,17 @@ import { screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { MemoryRouter } from 'react-router';
import type { NonReachableServer, NotFoundServer, SelectedServer } from '../../../src/servers/data';
import { ServerErrorFactory } from '../../../src/servers/helpers/ServerError';
import { ServerError } from '../../../src/servers/helpers/ServerError';
import { checkAccessibility } from '../../__helpers__/accessibility';
import { renderWithStore } from '../../__helpers__/setUpTest';
describe('<ServerError />', () => {
const ServerError = ServerErrorFactory(fromPartial({ DeleteServerButton: () => null }));
const setUp = (selectedServer: SelectedServer) => renderWithStore(
<MemoryRouter>
<ServerError servers={{}} />
<ServerError />
</MemoryRouter>,
{
initialState: { selectedServer },
initialState: { selectedServer, servers: {} },
},
);