Skip to content

Commit

Permalink
Update test files
Browse files Browse the repository at this point in the history
  • Loading branch information
m2rads committed Oct 19, 2024
1 parent e2ba7cb commit 5cfc936
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/(dashboard)/dashboard/log-view.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('LogView', () => {
})

it('renders empty state when no logs are provided', () => {
render(<LogView parsedLogs={undefined} error={undefined} isLoading={false} />)
render(<LogView parsedLogs={[]} error={undefined} isLoading={false} />)
expect(screen.getByText('No logs available.')).toBeInTheDocument()

Check failure on line 79 in app/(dashboard)/dashboard/log-view.test.tsx

View workflow job for this annotation

GitHub Actions / test

app/(dashboard)/dashboard/log-view.test.tsx > LogView > renders empty state when no logs are provided

TestingLibraryElementError: Unable to find an element with the text: No logs available.. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style <body> <div> <div class="bg-gray-900 text-gray-100 rounded-lg overflow-hidden" > <div class="flex items-center justify-between p-2 bg-gray-800" > <h3 class="text-sm font-semibold" > Logs </h3> </div> <div class="h-96 overflow-y-auto p-4 font-mono text-sm" /> </div> </div> </body> ❯ Object.getElementError node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/config.js:37:19 ❯ node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/query-helpers.js:76:38 ❯ node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/query-helpers.js:52:17 ❯ node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/query-helpers.js:95:19 ❯ app/(dashboard)/dashboard/log-view.test.tsx:79:19
})
})

0 comments on commit 5cfc936

Please sign in to comment.