-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
major: React Router v7 support (#49)
* feat: React Router v7 support BREAKING CHANGE: React Router migration
- Loading branch information
1 parent
291e79a
commit 5721278
Showing
63 changed files
with
8,397 additions
and
8,936 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
18 | ||
20 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json", | ||
"formatter": { | ||
"indentStyle": "tab", | ||
"indentWidth": 2, | ||
"lineWidth": 100, | ||
"formatWithErrors": true | ||
}, | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true | ||
} | ||
}, | ||
"javascript": { | ||
"jsxRuntime": "transparent", | ||
"formatter": { | ||
"trailingCommas": "all", | ||
"semicolons": "always" | ||
} | ||
}, | ||
"vcs": { | ||
"clientKind": "git", | ||
"enabled": true, | ||
"useIgnoreFile": true | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,46 @@ | ||
import { type Page, expect, test } from "@playwright/test"; | ||
|
||
test("toggling the theme", async ({ page }) => { | ||
await page.goto("/"); | ||
|
||
const html = () => page.locator("html"); | ||
|
||
const themeAttribute = "data-theme"; | ||
const initialTheme = await html().getAttribute(themeAttribute); | ||
const oppositeTheme = initialTheme === "light" ? "dark" : "light"; | ||
|
||
await page.locator("select").selectOption({ | ||
value: oppositeTheme, | ||
}); | ||
|
||
await page.waitForTimeout(1000); | ||
|
||
expect(html()).toHaveAttribute(themeAttribute, oppositeTheme); | ||
|
||
await page.reload(); | ||
|
||
await expect(page.locator("select")).toBeVisible(); | ||
|
||
await expect(html()).toHaveAttribute(themeAttribute, oppositeTheme); | ||
}); | ||
|
||
test("sync between tabs when theme change", async ({ context }) => { | ||
const pageOne = await context.newPage(); | ||
const pageTwo = await context.newPage(); | ||
|
||
await pageOne.goto("/"); | ||
await pageTwo.goto("/"); | ||
|
||
const html = (page: Page) => page.locator("html"); | ||
|
||
const themeAttribute = "data-theme"; | ||
const initialTheme = await html(pageOne).getAttribute(themeAttribute); | ||
const oppositeTheme = initialTheme === "light" ? "dark" : "light"; | ||
|
||
await pageOne.locator("select").selectOption({ value: oppositeTheme }); | ||
|
||
await pageOne.waitForTimeout(1000); | ||
|
||
await expect(html(pageOne)).toHaveAttribute(themeAttribute, oppositeTheme); | ||
await expect(html(pageTwo)).toHaveAttribute(themeAttribute, oppositeTheme); | ||
}); |
Oops, something went wrong.