-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ drawer improvements to close it when you change page. Slightly bugged as it doesn't play the animation but this is a known bug in vaul-svelte
- Loading branch information
1 parent
0b1c763
commit 54b0989
Showing
14 changed files
with
113 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
PUBLIC_ENABLE_MSW=true | ||
PUBLIC_DAWNSHARD_URL=http://localhost:3001/ | ||
PUBLIC_DAWNSHARD_API_URL=http://localhost:3001/api/ # use Vite proxy | ||
DAWNSHARD_API_URL_SSR=http://localhost:5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Website/tests/__screenshots__/home.test.ts/displays-correctly-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
Website/tests/__screenshots__/home.test.ts/displays-correctly-on-mobile-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
Website/tests/__screenshots__/news.test.ts/displays-correctly-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
Website/tests/__screenshots__/news.test.ts/displays-correctly-on-mobile-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
import { expect, test } from '@playwright/test'; | ||
import { devices, expect, test } from '@playwright/test'; | ||
|
||
test('index page has expected h1', async ({ page }) => { | ||
test('displays correctly', async ({ page }) => { | ||
await page.goto('/'); | ||
|
||
await expect(page.getByRole('heading', { name: 'Dawnshard', exact: true })).toBeVisible(); | ||
await expect(page.getByRole('heading', { name: 'Welcome to Dawnshard' })).toBeVisible(); | ||
|
||
await expect(page).toHaveScreenshot({ fullPage: true }); | ||
}); | ||
|
||
test('displays correctly on mobile', async ({ page }) => { | ||
await page.setViewportSize(devices['iPhone 13'].viewport); | ||
|
||
await page.goto('/'); | ||
|
||
await expect(page.getByRole('heading', { name: 'Dawnshard', exact: true })).toBeVisible(); | ||
await expect(page.getByRole('heading', { name: 'Welcome to Dawnshard' })).toBeVisible(); | ||
|
||
await expect(page).toHaveScreenshot(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { devices, expect, test } from '@playwright/test'; | ||
|
||
test('displays correctly', async ({ page }) => { | ||
await page.goto('/'); | ||
|
||
const newsLink = page.getByRole('link', { name: 'News' }); | ||
await expect(newsLink).toBeVisible(); | ||
await newsLink.click(); | ||
|
||
await expect(page.getByRole('heading', { name: 'News' })).toBeVisible(); | ||
|
||
await expect(page).toHaveScreenshot(); | ||
}); | ||
|
||
test('displays correctly on mobile', async ({ page }) => { | ||
await page.setViewportSize(devices['iPhone 13'].viewport); | ||
|
||
await page.goto('/'); | ||
|
||
await page.getByRole('button', { name: 'Open navigation' }).click(); | ||
await page.getByRole('link', { name: 'News' }).click(); | ||
|
||
await expect(page.getByRole('heading', { name: 'News' })).toBeVisible(); | ||
await expect(page.getByRole('heading', { name: 'Game updated!' })).toBeVisible(); | ||
|
||
await expect(page).toHaveScreenshot(); | ||
}); | ||
|
||
test('change page', async ({ page }) => { | ||
await page.goto('/news/1'); | ||
|
||
await page.getByRole('link', { name: 'Next' }).click(); | ||
|
||
await expect(page.getByRole('heading', { name: 'News' })).toBeVisible(); | ||
await expect(page.getByRole('heading', { name: 'Paging works' })).toBeVisible(); | ||
|
||
await page.getByRole('link', { name: 'Previous' }).click(); | ||
|
||
await expect(page.getByRole('heading', { name: 'News' })).toBeVisible(); | ||
await expect(page.getByRole('heading', { name: 'Game updated!' })).toBeVisible(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters