From 60381e0a8bf3e9a3e6431dfdd1a5a8c28b077dd9 Mon Sep 17 00:00:00 2001 From: Zenkoh1 <76705864+Zenkoh1@users.noreply.github.com> Date: Fri, 9 Feb 2024 16:49:19 +0800 Subject: [PATCH] Enable Stepper for Typed Variant (#2766) * Enable Stepper for Typed Variant * Fix format * Modify CI tests, enabling Stepper tool for Typed Variant --------- Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> --- src/commons/application/ApplicationTypes.ts | 3 ++- src/commons/application/__tests__/ApplicationTypes.ts | 8 ++++++-- .../__tests__/__snapshots__/ApplicationTypes.ts.snap | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/commons/application/ApplicationTypes.ts b/src/commons/application/ApplicationTypes.ts index b1f9895c09..2abb76b065 100644 --- a/src/commons/application/ApplicationTypes.ts +++ b/src/commons/application/ApplicationTypes.ts @@ -232,7 +232,8 @@ export const sourceLanguages: SALanguage[] = sourceSubLanguages.map(sublang => { // Enable Subst Visualizer only for default Source 1 & 2 supportedFeatures.substVisualizer = - chapter <= Chapter.SOURCE_2 && (variant === Variant.DEFAULT || variant === Variant.NATIVE); + chapter <= Chapter.SOURCE_2 && + (variant === Variant.DEFAULT || variant === Variant.NATIVE || variant === Variant.TYPED); // Enable Env Visualizer for Source Chapter 3 and above supportedFeatures.envVisualizer = diff --git a/src/commons/application/__tests__/ApplicationTypes.ts b/src/commons/application/__tests__/ApplicationTypes.ts index 846d72cb22..176a61b636 100644 --- a/src/commons/application/__tests__/ApplicationTypes.ts +++ b/src/commons/application/__tests__/ApplicationTypes.ts @@ -25,7 +25,7 @@ describe('available Source language configurations', () => { const expectedSourceConfigs = [ // Source 1 { chapter: Chapter.SOURCE_1, variant: Variant.DEFAULT, supports: { substVisualizer: true } }, - { chapter: Chapter.SOURCE_1, variant: Variant.TYPED }, + { chapter: Chapter.SOURCE_1, variant: Variant.TYPED, supports: { substVisualizer: true } }, { chapter: Chapter.SOURCE_1, variant: Variant.WASM }, { chapter: Chapter.SOURCE_1, variant: Variant.LAZY }, { chapter: Chapter.SOURCE_1, variant: Variant.NATIVE, supports: { substVisualizer: true } }, @@ -35,7 +35,11 @@ describe('available Source language configurations', () => { variant: Variant.DEFAULT, supports: { dataVisualizer: true, substVisualizer: true } }, - { chapter: Chapter.SOURCE_2, variant: Variant.TYPED, supports: { dataVisualizer: true } }, + { + chapter: Chapter.SOURCE_2, + variant: Variant.TYPED, + supports: { dataVisualizer: true, substVisualizer: true } + }, { chapter: Chapter.SOURCE_2, variant: Variant.LAZY, supports: { dataVisualizer: true } }, { chapter: Chapter.SOURCE_2, diff --git a/src/commons/application/__tests__/__snapshots__/ApplicationTypes.ts.snap b/src/commons/application/__tests__/__snapshots__/ApplicationTypes.ts.snap index aad93f66e4..b00c66abc1 100644 --- a/src/commons/application/__tests__/__snapshots__/ApplicationTypes.ts.snap +++ b/src/commons/application/__tests__/__snapshots__/ApplicationTypes.ts.snap @@ -88,7 +88,7 @@ Array [ "envVisualizer": false, "multiFile": false, "repl": true, - "substVisualizer": false, + "substVisualizer": true, }, "variant": "typed", }, @@ -153,7 +153,7 @@ Array [ "envVisualizer": false, "multiFile": true, "repl": true, - "substVisualizer": false, + "substVisualizer": true, }, "variant": "typed", },