Repository navigation
Upgrade to SvelteKit 3 #2661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Upgrade to SvelteKit 3 #2661
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c7030e3
Add list query parameters and write onto the live URL
ejsmith 07f2a70
Upgrade to SvelteKit 3 and adapter-static 4
ejsmith e09e040
Move path aliases to # subpath imports
ejsmith 8507049
Expect the not-found page when the open saved view is deleted
ejsmith 816a2cf
Merge main into the SvelteKit 3 upgrade
ejsmith d0cf677
Merge main into the SvelteKit 3 upgrade
ejsmith aed83b7
Keep page state and telemetry on shallow Back and Forward
ejsmith 56d8d0b
Return the client error id without waiting for telemetry
ejsmith File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,8 +1,21 @@ | ||
| // Mock for $env/dynamic/public in Storybook | ||
| export const env = { | ||
| // Filter to only include PUBLIC_ prefixed environment variables | ||
| ...Object.fromEntries(Object.entries(import.meta.env).filter(([key]) => key.startsWith('PUBLIC_'))), | ||
| // Provide a Stripe publishable key so isStripeEnabled() returns true in | ||
| // billing stories. The StripeProvider will fail to init (expected). | ||
| PUBLIC_STRIPE_PUBLISHABLE_KEY: import.meta.env.PUBLIC_STRIPE_PUBLISHABLE_KEY || 'pk_test_storybook_placeholder' | ||
| }; | ||
| // Mock for SvelteKit's $app/env/public in Storybook, which has no SvelteKit server to provide it. | ||
| const env = import.meta.env; | ||
|
|
||
| export const PUBLIC_APP_VERSION = env.PUBLIC_APP_VERSION; | ||
| export const PUBLIC_BASE_URL = env.PUBLIC_BASE_URL; | ||
| export const PUBLIC_ENABLE_ACCOUNT_CREATION = env.PUBLIC_ENABLE_ACCOUNT_CREATION; | ||
| export const PUBLIC_ENABLE_SSL = env.PUBLIC_ENABLE_SSL; | ||
| export const PUBLIC_EXCEPTIONLESS_API_KEY = env.PUBLIC_EXCEPTIONLESS_API_KEY; | ||
| export const PUBLIC_EXCEPTIONLESS_CLIENT_SETUP_SHOW_SERVER_URL = env.PUBLIC_EXCEPTIONLESS_CLIENT_SETUP_SHOW_SERVER_URL; | ||
| export const PUBLIC_EXCEPTIONLESS_SERVER_URL = env.PUBLIC_EXCEPTIONLESS_SERVER_URL; | ||
| export const PUBLIC_EXCEPTIONLESS_TELEMETRY_SERVER_URL = env.PUBLIC_EXCEPTIONLESS_TELEMETRY_SERVER_URL; | ||
| export const PUBLIC_FACEBOOK_APPID = env.PUBLIC_FACEBOOK_APPID; | ||
| export const PUBLIC_GITHUB_APPID = env.PUBLIC_GITHUB_APPID; | ||
| export const PUBLIC_GOOGLE_APPID = env.PUBLIC_GOOGLE_APPID; | ||
| export const PUBLIC_INTERCOM_APPID = env.PUBLIC_INTERCOM_APPID; | ||
| export const PUBLIC_MICROSOFT_APPID = env.PUBLIC_MICROSOFT_APPID; | ||
| export const PUBLIC_SLACK_APPID = env.PUBLIC_SLACK_APPID; | ||
| // Provide a Stripe publishable key so isStripeEnabled() returns true in | ||
| // billing stories. The StripeProvider will fail to init (expected). | ||
| export const PUBLIC_STRIPE_PUBLISHABLE_KEY = env.PUBLIC_STRIPE_PUBLISHABLE_KEY || 'pk_test_storybook_placeholder'; | ||
| export const PUBLIC_SYSTEM_NOTIFICATION_MESSAGE = env.PUBLIC_SYSTEM_NOTIFICATION_MESSAGE; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
38 changes: 38 additions & 0 deletions
38
src/Exceptionless.Web/ClientApp/e2e/tests/premium-notice-navigation.e2e.ts
This file contains hidden or 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,38 @@ | ||
| import { expect, type Page, test } from '@playwright/test'; | ||
|
|
||
| import { mockTablePage } from '../support/table-layout'; | ||
|
|
||
| test.afterEach(async ({ page }) => { | ||
| expect(await page.pageErrors()).toEqual([]); | ||
| }); | ||
|
|
||
| test('the Sessions premium notice stays visible when Back returns to an earlier filter', async ({ page }) => { | ||
| // Arrange | ||
| await page.clock.install(); | ||
| await mockTablePage(page, 0, { hasPremiumFeatures: false }); | ||
| await page.goto('/sessions'); | ||
| const notice = page.getByText('to enable Sessions and other premium features!'); | ||
| await expect(notice).toBeVisible(); | ||
|
|
||
| // Act: each filter change adds a query history entry to the same page, and Back returns to one. | ||
| await selectDateRange(page, 'Last 7 days', 'Last 30 days'); | ||
| // Rapid changes share one entry, so let the first one settle. | ||
| await page.clock.fastForward(250); | ||
| await selectDateRange(page, 'Last 30 days', 'Last 24 hours'); | ||
| await page.goBack(); | ||
|
|
||
| // Assert | ||
| await expect(page).toHaveURL(/[?&]time=30d(?:&|$)/); | ||
| await expect(dateFilter(page, 'Last 30 days')).toBeVisible(); | ||
| await expect(notice).toBeVisible(); | ||
| }); | ||
|
|
||
| function dateFilter(page: Page, range: string) { | ||
| return page.getByRole('button', { exact: true, name: `Date ${range}` }); | ||
| } | ||
|
|
||
| async function selectDateRange(page: Page, from: string, to: string): Promise<void> { | ||
| await dateFilter(page, from).click(); | ||
| await page.getByRole('button', { exact: true, name: to }).click(); | ||
| await expect(dateFilter(page, to)).toBeVisible(); | ||
| } |
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.