Add private tag into integration-test list

pull/2529/head
Jérémy Rialland 2023-03-02 15:33:39 +01:00 committed by Johan Girod
parent 968f61239b
commit 48fcd735a9
1 changed files with 14 additions and 4 deletions

View File

@ -11,12 +11,19 @@ export default function IntegrationTest() {
const integrableModuleNames = useMemo(
() =>
Object.values(simulators)
.map((s) => 'iframePath' in s && s.iframePath)
.map((s) =>
'iframePath' in s
? {
iframePath: s.iframePath,
private: 'private' in s ? s.private : false,
}
: false
)
.filter(((el) => Boolean(el)) as <T>(x: T | false) => x is T),
[simulators]
)
const [currentModule, setCurrentModule] = useState<string>(
integrableModuleNames[0]
integrableModuleNames[0]?.iframePath
)
const [color, setColor] = useState('#005aa1')
const [version, setVersion] = useState(0)
@ -38,8 +45,11 @@ export default function IntegrationTest() {
<>
<H2>Quel module ?</H2>
<select onChange={(event) => setCurrentModule(event.target.value)}>
{integrableModuleNames.map((name) => (
<option key={name}>{name}</option>
{integrableModuleNames.map((el) => (
<option key={el.iframePath} value={el.iframePath}>
{el.iframePath}
{el.private ? ' [private]' : ''}
</option>
))}
</select>