(
config: {
nodes?: TestTreeNode[];
value?: string[];
disabled?: boolean;
orientation?: 'horizontal' | 'vertical';
multi?: boolean;
wrap?: boolean;
softDisabled?: boolean;
focusMode?: 'roving' | 'activedescendant';
selectionMode?: 'follow' | 'explicit';
nav?: boolean;
currentType?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';
tabIndex?: number;
} = {},
)
| 80 | } |
| 81 | |
| 82 | async function updateTree( |
| 83 | config: { |
| 84 | nodes?: TestTreeNode[]; |
| 85 | value?: string[]; |
| 86 | disabled?: boolean; |
| 87 | orientation?: 'horizontal' | 'vertical'; |
| 88 | multi?: boolean; |
| 89 | wrap?: boolean; |
| 90 | softDisabled?: boolean; |
| 91 | focusMode?: 'roving' | 'activedescendant'; |
| 92 | selectionMode?: 'follow' | 'explicit'; |
| 93 | nav?: boolean; |
| 94 | currentType?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'; |
| 95 | tabIndex?: number; |
| 96 | } = {}, |
| 97 | ) { |
| 98 | if (config.nodes !== undefined) testComponent.nodes.set(config.nodes); |
| 99 | if (config.value !== undefined) treeInstance.value.set(config.value); |
| 100 | if (config.disabled !== undefined) testComponent.disabled.set(config.disabled); |
| 101 | if (config.orientation !== undefined) testComponent.orientation.set(config.orientation); |
| 102 | if (config.multi !== undefined) testComponent.multi.set(config.multi); |
| 103 | if (config.wrap !== undefined) testComponent.wrap.set(config.wrap); |
| 104 | if (config.softDisabled !== undefined) testComponent.softDisabled.set(config.softDisabled); |
| 105 | if (config.focusMode !== undefined) testComponent.focusMode.set(config.focusMode); |
| 106 | if (config.selectionMode !== undefined) testComponent.selectionMode.set(config.selectionMode); |
| 107 | if (config.nav !== undefined) testComponent.nav.set(config.nav); |
| 108 | if (config.currentType !== undefined) testComponent.currentType.set(config.currentType); |
| 109 | if (config.tabIndex !== undefined) testComponent.tabIndex.set(config.tabIndex); |
| 110 | |
| 111 | await fixture.whenStable(); |
| 112 | defineTestVariables(); |
| 113 | } |
| 114 | |
| 115 | async function updateTreeItemByValue(value: string, config: Partial<TestTreeNode<string>>) { |
| 116 | const newNodes = JSON.parse(JSON.stringify(testComponent.nodes())); |
no test coverage detected
searching dependent graphs…