Skip to content

Commit

Permalink
chore: update test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas committed Aug 30, 2024
1 parent 73f1fc0 commit 3b38d17
Show file tree
Hide file tree
Showing 65 changed files with 16,965 additions and 10,099 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/nextjs-spa/global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

const globlSetup = async () => {
process.env.APPLICATION_URL =
process.env.APPLICATION_URL || "http://localhost:3100"
process.env.APPLICATION_URL || "http://localhost:3300"

process.env.ORY_PROJECT_URL =
process.env.ORY_PROJECT_URL || "http://localhost:4000"
Expand Down
19 changes: 9 additions & 10 deletions examples/nextjs-spa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,24 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"test": "playwright test",
"debug": "playwright test --ui"
},
"dependencies": {
"@next/font": "13.4.13",
"@types/node": "18.16.19",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"eslint": "8.32.0",
"eslint-config-next": "13.1.5",
"next": "14.2.5",
"react": "18.3.1",
"react-dom": "18.3.1",
"typescript": "5.2.2",
"vite": "4.5.2"
"react-dom": "18.3.1"
},
"devDependencies": {
"@ory/elements": "*",
"@ory/elements-test": "*",
"@playwright/test": "1.38.0",
"autoprefixer": "10.4.2"
"autoprefixer": "10.4.2",
"@types/node": "18.16.19",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"eslint-config-next": "13.1.5",
"typescript": "5.2.2",
"vite": "4.5.2"
}
}
11 changes: 7 additions & 4 deletions examples/nextjs-spa/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default defineConfig({
testDir: path.join(__dirname, "e2e"),
/* Maximum time one test can run for. */
timeout: 30 * 1000,
snapshotPathTemplate: "{testDir}/__screenshots__/{testFilePath}/{arg}{ext}",
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
Expand All @@ -36,7 +37,9 @@ export default defineConfig({
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: process.env.CI ? [["github"], ["html"], ["list"]] : "html",
reporter: process.env.CI
? [["github"], ["html", { open: "never" }], ["list"]]
: "html",

/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
Expand All @@ -52,16 +55,16 @@ export default defineConfig({
/* Configure projects for major browsers */
projects: [
{
name: "chromium",
name: "nextjs-spa-chromium",
use: { ...devices["Desktop Chrome"] },
},

{
name: "firefox",
name: "nextjs-spa-firefox",
use: { ...devices["Desktop Firefox"] },
},
{
name: "webkit",
name: "nextjs-spa-webkit",
use: { ...devices["Desktop Safari"] },
},
],
Expand Down
4 changes: 2 additions & 2 deletions examples/nextjs-spa/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions examples/preact-spa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"test": "playwright test",
"debug": "playwright test --ui"
},
"dependencies": {
Expand All @@ -17,9 +15,8 @@
"devDependencies": {
"@ory/elements-preact": "*",
"@ory/elements-test": "*",
"@playwright/test": "1.38.0",
"@playwright/test": "1.46.0",
"@preact/preset-vite": "2.5.0",
"eslint": "8.32.0",
"eslint-config-preact": "1.3.0",
"typescript": "5.2.2",
"vite": "4.5.2"
Expand Down
11 changes: 7 additions & 4 deletions examples/preact-spa/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default defineConfig({
testDir: "./e2e",
/* Maximum time one test can run for. */
timeout: 30 * 1000,
snapshotPathTemplate: "{testDir}/__screenshots__/{testFilePath}/{arg}{ext}",
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
Expand All @@ -35,7 +36,9 @@ export default defineConfig({
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: process.env.CI ? [["github"], ["html"], ["list"]] : "html",
reporter: process.env.CI
? [["github"], ["html", { open: "never" }], ["list"]]
: "html",

/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
Expand All @@ -51,15 +54,15 @@ export default defineConfig({
/* Configure projects for major browsers */
projects: [
{
name: "chromium",
name: "preact-spa-chromium",
use: { ...devices["Desktop Chrome"] },
},
{
name: "firefox",
name: "preact-spa-firefox",
use: { ...devices["Desktop Firefox"] },
},
{
name: "webkit",
name: "preact-spa-webkit",
use: { ...devices["Desktop Safari"] },
},
],
Expand Down
17 changes: 17 additions & 0 deletions examples/preact-spa/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"targets": {
"test": {
"command": "playwright test",
"dependsOn": ["build"],
"options": {
"cwd": "examples/preact-spa"
}
},
"build": {
"command": "tsc && vite build",
"options": {
"cwd": "examples/preact-spa"
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions examples/react-spa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@
"devDependencies": {
"@ory/elements": "*",
"@ory/elements-test": "*",
"@playwright/test": "1.38.0",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@typescript-eslint/eslint-plugin": "5.49.0",
"@vitejs/plugin-react": "4.0.3",
"eslint": "8.33.0",
"eslint-config-standard-with-typescript": "33.0.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-n": "15.6.1",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react": "7.35.0",
"typescript": "5.2.2",
"vite": "4.5.2"
}
Expand Down
Loading

0 comments on commit 3b38d17

Please sign in to comment.