diff --git a/client/src/components/Header/styles.tsx b/client/src/components/Header/styles.tsx index 139c69c29..298b6a1bc 100644 --- a/client/src/components/Header/styles.tsx +++ b/client/src/components/Header/styles.tsx @@ -4,7 +4,6 @@ import { Theme } from '@mui/material/styles'; import { makeStyles } from 'tss-react/mui'; -import lightTheme from '~/styles/theme'; export default makeStyles()((theme: Theme) => ({ appbar: { @@ -36,7 +35,7 @@ export default makeStyles()((theme: Theme) => ({ fontStyle: 'italic', }, homeLink: { - color: lightTheme.palette.common.orangeDarker, + color: theme.palette.common.orangeDarker, textDecoration: 'none', }, })); diff --git a/client/src/components/SuiteOptionsPage/SuiteOptionsPage.tsx b/client/src/components/SuiteOptionsPage/SuiteOptionsPage.tsx index 6c0f1bf11..65c06f047 100644 --- a/client/src/components/SuiteOptionsPage/SuiteOptionsPage.tsx +++ b/client/src/components/SuiteOptionsPage/SuiteOptionsPage.tsx @@ -36,6 +36,7 @@ const SuiteOptionsPage: FC = ({ testSuite }) => { initialSelectedSuiteOptions || [] ); const [descriptionWidth, setDescriptionWidth] = React.useState(''); + const [showPage, setShowPage] = React.useState(false); const selectionPanel = useRef(null); useEffect(() => { @@ -45,12 +46,15 @@ const SuiteOptionsPage: FC = ({ testSuite }) => { (!testSuite?.suite_options || testSuite?.suite_options.length === 0) ) { createTestSession(null); + } else { + setShowPage(true); + getDescriptionWidth(); } }, []); useEffect(() => { getDescriptionWidth(); - }, [windowIsSmall]); + }, [windowIsSmall, selectionPanel.current]); const getDescriptionWidth = () => { if (windowIsSmall) { @@ -96,6 +100,11 @@ const SuiteOptionsPage: FC = ({ testSuite }) => { ); }; + if (!showPage) { + // 432px = 400 (default width of SelectionPanel Paper component) + 16px margin on each side + return ; + } + return ( = ({ }, [testSession]); useEffect(() => { - let waitingTestId = null; + let waitingId = null; if (testRun?.status === 'waiting') { resultsMap.forEach((result) => { if (result.test_id && result.result === 'wait') { - waitingTestId = result.test_id; + waitingId = result.test_id; } }); } - setWaitingTestId(waitingTestId); + setWaitingTestId(waitingId); }, [resultsMap]); // when leaving the TestSession, we want to cancel the poller @@ -411,7 +411,7 @@ const TestSessionComponent: FC = ({