Skip to content

Commit 144f26b

Browse files
committed
fix(multiple): linted and unit tests
1 parent ed1c999 commit 144f26b

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/aria/combobox/combobox.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,13 @@ describe('Combobox', () => {
780780

781781
it('should select and commit on click', () => {
782782
click(inputElement);
783+
784+
// Iterate to the parent node and expand it so the child is visible
785+
down(); // Winter
786+
down(); // Spring
787+
right(); // Expand Spring
788+
fixture.detectChanges();
789+
783790
const item = getTreeItem('April')!;
784791
click(item);
785792
fixture.detectChanges();

src/aria/private/behaviors/tree/tree.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
import {signal, SignalLike, WritableSignalLike} from '../signal-like/signal-like';
9+
import {signal, WritableSignalLike} from '../signal-like/signal-like';
1010
import {Tree, TreeInputs, TreeItem} from './tree';
1111

1212
interface TestItem<V = number> extends TreeItem<V, TestItem<V>> {
@@ -356,7 +356,7 @@ describe('Tree Behavior', () => {
356356
it('should not navigate to first child if no children', () => {
357357
const {tree, items} = getDefaultPatterns();
358358
tree.goto(items[0]);
359-
const success = tree.firstChild();
359+
tree.firstChild();
360360
expect(tree.inputs.activeItem()).toBe(items[0]); // Stays same
361361
});
362362

@@ -385,7 +385,7 @@ describe('Tree Behavior', () => {
385385
});
386386

387387
it('should select an item when navigating with selectOne:true', () => {
388-
const {tree, items} = getTreeAndItems([0, 1], {values: signal([]), multi: signal(false)});
388+
const {tree} = getTreeAndItems([0, 1], {values: signal([]), multi: signal(false)});
389389

390390
tree.next({selectOne: true});
391391
expect(tree.inputs.values()).toEqual([1]);
@@ -464,7 +464,7 @@ describe('Tree Behavior', () => {
464464
});
465465

466466
it('should not wrap when range selecting', () => {
467-
const {tree, items} = getDefaultPatterns({values: signal([]), multi: signal(true)});
467+
const {tree} = getDefaultPatterns({values: signal([]), multi: signal(true)});
468468
tree.anchor(0);
469469
tree.prev({selectRange: true});
470470
expect(tree.inputs.activeItem()).toBe(tree.inputs.items()[0]);

0 commit comments

Comments
 (0)