From 58dbb79cb8882db5e7d8377550480c9249ecd008 Mon Sep 17 00:00:00 2001 From: Brian Lam Date: Wed, 23 Sep 2026 12:24:22 -0700 Subject: [PATCH] fix(vscode): remove .NET 8 custom code creation Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../__test__/dotNetFrameworkStep.test.tsx | 29 +++++++------------ .../steps/dotNetFrameworkStep.tsx | 5 ---- 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/apps/vs-code-react/src/app/createWorkspace/steps/__test__/dotNetFrameworkStep.test.tsx b/apps/vs-code-react/src/app/createWorkspace/steps/__test__/dotNetFrameworkStep.test.tsx index 0142773da10..385532c9724 100644 --- a/apps/vs-code-react/src/app/createWorkspace/steps/__test__/dotNetFrameworkStep.test.tsx +++ b/apps/vs-code-react/src/app/createWorkspace/steps/__test__/dotNetFrameworkStep.test.tsx @@ -97,25 +97,25 @@ describe('DotNetFrameworkStep', () => { expect(screen.getByRole('combobox')).toBeInTheDocument(); }); - it('should render .NET 8 and .NET 10 options on non-Windows', () => { + it('should render only .NET 10 on non-Windows', () => { renderWithStore({ logicAppType: ProjectType.customCode, platform: null }); const combobox = screen.getByRole('combobox'); fireEvent.click(combobox); - expect(screen.getByText('.NET 8')).toBeInTheDocument(); expect(screen.getByText('.NET 10')).toBeInTheDocument(); + expect(screen.queryByText('.NET 8')).not.toBeInTheDocument(); }); it('should also render .NET Framework option on Windows', () => { renderWithStore({ logicAppType: ProjectType.customCode, platform: 'win32' as any }); const combobox = screen.getByRole('combobox'); fireEvent.click(combobox); - // Positive Windows case: the dropdown must expose exactly the three correct options. + // Positive Windows case: the dropdown must expose exactly the two supported options. expect(screen.getByText('.NET Framework')).toBeInTheDocument(); - expect(screen.getByText('.NET 8')).toBeInTheDocument(); expect(screen.getByText('.NET 10')).toBeInTheDocument(); + expect(screen.queryByText('.NET 8')).not.toBeInTheDocument(); const options = screen.getAllByRole('option'); - expect(options).toHaveLength(3); - expect(options.map((option) => option.textContent)).toEqual(['.NET Framework', '.NET 8', '.NET 10']); + expect(options).toHaveLength(2); + expect(options.map((option) => option.textContent)).toEqual(['.NET Framework', '.NET 10']); }); it('should not render .NET Framework option on non-Windows', () => { @@ -130,10 +130,10 @@ describe('DotNetFrameworkStep', () => { const combobox = screen.getByRole('combobox'); fireEvent.click(combobox); expect(screen.queryByText('.NET Framework')).not.toBeInTheDocument(); - expect(screen.getByText('.NET 8')).toBeInTheDocument(); expect(screen.getByText('.NET 10')).toBeInTheDocument(); + expect(screen.queryByText('.NET 8')).not.toBeInTheDocument(); const options = screen.getAllByRole('option'); - expect(options.map((option) => option.textContent)).toEqual(['.NET 8', '.NET 10']); + expect(options.map((option) => option.textContent)).toEqual(['.NET 10']); }); it('should not render .NET Framework option when platform is not yet initialized (null)', () => { @@ -141,10 +141,10 @@ describe('DotNetFrameworkStep', () => { const combobox = screen.getByRole('combobox'); fireEvent.click(combobox); expect(screen.queryByText('.NET Framework')).not.toBeInTheDocument(); - expect(screen.getByText('.NET 8')).toBeInTheDocument(); expect(screen.getByText('.NET 10')).toBeInTheDocument(); + expect(screen.queryByText('.NET 8')).not.toBeInTheDocument(); const options = screen.getAllByRole('option'); - expect(options.map((option) => option.textContent)).toEqual(['.NET 8', '.NET 10']); + expect(options.map((option) => option.textContent)).toEqual(['.NET 10']); }); }); @@ -158,15 +158,6 @@ describe('DotNetFrameworkStep', () => { expect(combobox).toHaveTextContent('.NET 10'); }); - it('should show .NET 8 label when net8 is selected', () => { - renderWithStore({ - logicAppType: ProjectType.customCode, - targetFramework: 'net8', - }); - const combobox = screen.getByRole('combobox'); - expect(combobox).toHaveTextContent('.NET 8'); - }); - it('should show description text when a framework is selected', () => { renderWithStore({ logicAppType: ProjectType.customCode, diff --git a/apps/vs-code-react/src/app/createWorkspace/steps/dotNetFrameworkStep.tsx b/apps/vs-code-react/src/app/createWorkspace/steps/dotNetFrameworkStep.tsx index 8194f30d6ab..95a32973cf2 100644 --- a/apps/vs-code-react/src/app/createWorkspace/steps/dotNetFrameworkStep.tsx +++ b/apps/vs-code-react/src/app/createWorkspace/steps/dotNetFrameworkStep.tsx @@ -56,11 +56,6 @@ export const DotNetFrameworkStep: React.FC = () => { }, ] : []), - { - value: TargetFramework.Net8, - label: intlText.DOTNET_8, - description: intlText.DOTNET_8_DESCRIPTION, - }, { value: TargetFramework.Net10, label: intlText.DOTNET_10,