-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import '@testing-library/jest-dom/vitest'; | ||
import { test, expect } from 'vitest'; | ||
import { fireEvent, render, screen, within } from '@testing-library/svelte'; | ||
Check failure on line 3 in packages/frontend/src/lib/NavPage.spec.ts GitHub Actions / linter, formatters and unit tests / windows-2022
Check failure on line 3 in packages/frontend/src/lib/NavPage.spec.ts GitHub Actions / linter, formatters and unit tests / windows-2022
Check failure on line 3 in packages/frontend/src/lib/NavPage.spec.ts GitHub Actions / linter, formatters and unit tests / ubuntu-22.04
Check failure on line 3 in packages/frontend/src/lib/NavPage.spec.ts GitHub Actions / linter, formatters and unit tests / ubuntu-22.04
Check failure on line 3 in packages/frontend/src/lib/NavPage.spec.ts GitHub Actions / linter, formatters and unit tests / macos-12
|
||
import NavPage from '/@/lib/NavPage.svelte'; | ||
|
||
test('NavPage should have linear progress', async () => { | ||
// render the component | ||
render(NavPage, {loading: true, title: 'dummy'}); | ||
|
||
const content = await screen.findByLabelText('content'); | ||
expect(content).toBeDefined(); | ||
expect(content.firstChild?.nodeName).toBe('PROGRESS'); | ||
}); | ||
|
||
test('NavPage should not have linear progress', async () => { | ||
// render the component | ||
render(NavPage, {title: 'dummy'},); | ||
Check warning on line 17 in packages/frontend/src/lib/NavPage.spec.ts GitHub Actions / linter, formatters and unit tests / windows-2022
Check warning on line 17 in packages/frontend/src/lib/NavPage.spec.ts GitHub Actions / linter, formatters and unit tests / ubuntu-22.04
|
||
|
||
const content = await screen.findByLabelText('content'); | ||
expect(content).toBeDefined(); | ||
expect(content.firstChild).toBeNull(); // no slot content provided | ||
}); |