mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-19 13:06:22 +00:00
Migrated ForServerVersion test from enzyme to react testing library
This commit is contained in:
@@ -8,7 +8,9 @@ interface ForServerVersionConnectProps extends ForServerVersionProps {
|
||||
selectedServer: SelectedServer;
|
||||
}
|
||||
|
||||
const ForServerVersion: FC<ForServerVersionConnectProps> = ({ minVersion, maxVersion, selectedServer, children }) => {
|
||||
export const ForServerVersion: FC<ForServerVersionConnectProps> = (
|
||||
{ minVersion, maxVersion, selectedServer, children },
|
||||
) => {
|
||||
if (!isReachableServer(selectedServer)) {
|
||||
return null;
|
||||
}
|
||||
@@ -22,5 +24,3 @@ const ForServerVersion: FC<ForServerVersionConnectProps> = ({ minVersion, maxVer
|
||||
|
||||
return <>{children}</>;
|
||||
};
|
||||
|
||||
export default ForServerVersion;
|
||||
|
||||
@@ -8,7 +8,7 @@ import ImportServersBtn from '../helpers/ImportServersBtn';
|
||||
import { resetSelectedServer, selectServer } from '../reducers/selectedServer';
|
||||
import { createServer, createServers, deleteServer, editServer, setAutoConnect } from '../reducers/servers';
|
||||
import { fetchServers } from '../reducers/remoteServers';
|
||||
import ForServerVersion from '../helpers/ForServerVersion';
|
||||
import { ForServerVersion } from '../helpers/ForServerVersion';
|
||||
import { ServerError } from '../helpers/ServerError';
|
||||
import { ConnectDecorator } from '../../container/types';
|
||||
import { withoutSelectedServer } from '../helpers/withoutSelectedServer';
|
||||
|
||||
Reference in New Issue
Block a user