Refactor to unify scripts/categories as Executable
This commit consolidates scripts and categories under a unified 'Executable' concept. This simplifies the architecture and improves code readability. - Introduce subfolders within `src/domain` to segregate domain elements. - Update class and interface names by removing the 'I' prefix in alignment with new coding standards. - Replace 'Node' with 'Executable' to clarify usage; reserve 'Node' exclusively for the UI's tree component.
This commit is contained in:
@@ -8,7 +8,8 @@ import { ScriptSelectionStub } from '@tests/unit/shared/Stubs/ScriptSelectionStu
|
||||
import type { CategorySelectionChange } from '@/application/Context/State/Selection/Category/CategorySelectionChange';
|
||||
import type { ScriptSelectionChange, ScriptSelectionChangeCommand } from '@/application/Context/State/Selection/Script/ScriptSelectionChange';
|
||||
import { expectExists } from '@tests/shared/Assertions/ExpectExists';
|
||||
import type { ICategory, IScript } from '@/domain/ICategory';
|
||||
import type { Category } from '@/domain/Executables/Category/Category';
|
||||
import type { Script } from '@/domain/Executables/Script/Script';
|
||||
|
||||
describe('ScriptToCategorySelectionMapper', () => {
|
||||
describe('areAllScriptsSelected', () => {
|
||||
@@ -64,8 +65,8 @@ describe('ScriptToCategorySelectionMapper', () => {
|
||||
readonly description: string;
|
||||
readonly changes: readonly CategorySelectionChange[];
|
||||
readonly categories: ReadonlyArray<{
|
||||
readonly categoryId: ICategory['id'],
|
||||
readonly scriptIds: readonly IScript['id'][],
|
||||
readonly categoryId: Category['id'],
|
||||
readonly scriptIds: readonly Script['id'][],
|
||||
}>;
|
||||
readonly expected: readonly ScriptSelectionChange[],
|
||||
}> = [
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { SelectedScript } from '@/application/Context/State/Selection/Scrip
|
||||
import { BatchedDebounceStub } from '@tests/unit/shared/Stubs/BatchedDebounceStub';
|
||||
import type { ScriptSelectionChange, ScriptSelectionChangeCommand } from '@/application/Context/State/Selection/Script/ScriptSelectionChange';
|
||||
import { expectExists } from '@tests/shared/Assertions/ExpectExists';
|
||||
import type { IScript } from '@/domain/IScript';
|
||||
import type { Script } from '@/domain/Executables/Script/Script';
|
||||
import { expectEqualSelectedScripts } from './ExpectEqualSelectedScripts';
|
||||
|
||||
type DebounceArg = ScriptSelectionChangeCommand;
|
||||
@@ -538,7 +538,7 @@ describe('DebouncedScriptSelection', () => {
|
||||
});
|
||||
});
|
||||
|
||||
function createCollectionWithScripts(...scripts: IScript[]): CategoryCollectionStub {
|
||||
function createCollectionWithScripts(...scripts: Script[]): CategoryCollectionStub {
|
||||
const category = new CategoryStub(1).withScripts(...scripts);
|
||||
const collection = new CategoryCollectionStub().withAction(category);
|
||||
return collection;
|
||||
|
||||
Reference in New Issue
Block a user