chore: now actually runs tests

This commit is contained in:
JobvAlewijk
2026-01-06 15:19:49 +01:00
parent 15c9fc6f4d
commit 2ecb33dcde
3 changed files with 180 additions and 87 deletions

View File

@@ -140,7 +140,7 @@ function VisualProgrammingUI() {
}
// currently outputs the prepared program to the console
function runProgramm() {
function runProgram() {
const phases = graphReducer();
const program = {phases}
console.log(JSON.stringify(program, null, 2));
@@ -183,11 +183,11 @@ function VisProgPage() {
const [showSimpleProgram, setShowSimpleProgram] = useState(false);
const setProgramState = useProgramStore((state) => state.setProgramState);
const runProgram = () => {
const onClick = () => {
const phases = graphReducer(); // reduce graph
setProgramState({ phases }); // <-- save to store
setShowSimpleProgram(true); // show SimpleProgram
runProgramm(); // send to backend if needed
runProgram(); // send to backend if needed
};
if (showSimpleProgram) {
@@ -204,7 +204,7 @@ function VisProgPage() {
return (
<>
<VisualProgrammingUI/>
<button onClick={runProgram}>run program</button>
<button onClick={onClick}>run program</button>
</>
)
}