Skip to content

Commit

Permalink
test(core/tree): remove unexpected any
Browse files Browse the repository at this point in the history
  • Loading branch information
nuke-ellington committed Sep 5, 2024
1 parent 42b4ae5 commit d1ab14e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/core/src/components/tree/test/tree.ct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/
import { expect, Locator, Page } from '@playwright/test';
import { test } from '@utils/test';
import { TreeItem } from '../tree-model';

const defaultModel = {
root: {
Expand Down Expand Up @@ -179,15 +180,16 @@ test('dropdown trigger', async ({ mount, page }) => {
(t) =>
((t as HTMLIxTreeElement).renderItem = (
_index,
item: any,
item,
_dataList,
context,
update
) => {
const el = document.createElement('ix-tree-item');
el.hasChildren = item.hasChildren;
el.context = context[item.id];
el.id = `trigger-${item.id}`;
const treeItem = item as TreeItem<unknown>;
el.hasChildren = treeItem.hasChildren;
el.context = context[treeItem.id];
el.id = `trigger-${treeItem.id}`;

const div = document.createElement('div');
div.style.display = 'flex';
Expand All @@ -196,13 +198,13 @@ test('dropdown trigger', async ({ mount, page }) => {
const dd = document.createElement('ix-dropdown');
const ddItem = document.createElement('ix-dropdown-item');
ddItem.innerHTML = 'Action 1';
dd.trigger = `trigger-${item.id}`;
dd.trigger = `trigger-${treeItem.id}`;

div.appendChild(name);
div.appendChild(dd);
dd.appendChild(ddItem);

name.innerText = item.data.name;
name.innerText = treeItem.id;

el.appendChild(div);

Expand Down

0 comments on commit d1ab14e

Please sign in to comment.