-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix UI not being able to switch OS on tree view
This commit addresses a bug where updating the tree collection before node updates caused rendering errors due to the presence of nodes that no longer exist in the new collection. Changes: - Fix rendering order issue when updating tree collections by manually controlling the rendering process, ensuring that the rendering queue and currently rendered nodes are cleared before updating. This aligns the rendering process with the updated collection, avoiding errors related to outdated node states. - Add Cypress E2E to switch between all operating systems and script views to ensure there are no uncaught errors to avoid regression. - In download URL list view, use unified `getSupportedOsList()` from application instead of hardcoding supported operating systems to prevent duplication and easier future changes. - Rename `initial-nodes` to `nodes` as these nodes are mutable and not necessarily only the "initial" ones. - Refactor to centralize function to render/get operating system names for better re-usability in E2E tests.
- Loading branch information
1 parent
fe3de49
commit 1dd3a46
Showing
14 changed files
with
288 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/presentation/components/Shared/OperatingSystemNames.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { OperatingSystem } from '@/domain/OperatingSystem'; | ||
|
||
export function getOperatingSystemDisplayName(os: OperatingSystem): string { | ||
switch (os) { | ||
case OperatingSystem.Windows: | ||
return 'Windows'; | ||
case OperatingSystem.macOS: | ||
return 'macOS'; | ||
case OperatingSystem.Linux: | ||
return 'Linux (preview)'; | ||
default: | ||
throw new RangeError(`Unsupported operating system ID: ${os}`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.