From cc2a0336bc8701d6a1644adb2c795c8f15de47fe Mon Sep 17 00:00:00 2001 From: ponnexcodev Date: Wed, 23 Oct 2024 12:07:04 +0800 Subject: [PATCH] Update test --- .../toniq-list-table/toniq-list-table.element.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/design-system/src/elements/toniq-list-table/toniq-list-table.element.test.ts b/packages/design-system/src/elements/toniq-list-table/toniq-list-table.element.test.ts index 72d0518..4ddf246 100644 --- a/packages/design-system/src/elements/toniq-list-table/toniq-list-table.element.test.ts +++ b/packages/design-system/src/elements/toniq-list-table/toniq-list-table.element.test.ts @@ -44,9 +44,9 @@ describe(ToniqListTable.tagName, () => { <${ToniqListTable.assign(testCase.inputs)}> `); assertInstanceOf(renderedToniqListTable, ToniqListTable); - const renderedRows = renderedToniqListTable.shadowRoot.querySelectorAll( - '.column-wrapper.column-content', - ); + const renderedRows = renderedToniqListTable.shadowRoot + .querySelector('.column-wrapper') + ?.querySelectorAll('.column-content'); if (testCase.inputs.pagination) { assertInstanceOf(renderedToniqListTable, ToniqListTable); @@ -58,7 +58,7 @@ describe(ToniqListTable.tagName, () => { return { // Minus the header row - row: renderedRows.length - 1, + row: renderedRows ? renderedRows.length - 1 : 0, }; }