Skip to content

Commit e0a23a8

Browse files
committed
Add E2E test app
1 parent cad1d28 commit e0a23a8

27 files changed

+1165
-593
lines changed

e2e-tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ modifiers that can be used in (`*.test.ts`).
4343
- `modifyFile` - Modifies a file in the test project.
4444

4545
- `checkFileExists` - Checks if a file exists in the test project.
46-
- `checkPackageJson` - Checks if the `@sentry/[integration]` package exists in
46+
- `checkPackageJson` - Checks if the integration's Sentry package exists in
4747
the dependencies of the test project's `package.json`.
4848
- `checkSentryCliConfig` - Checks if the `.sentryclirc` file contains the Sentry
4949
auth token.
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Dependencies
2+
node_modules/
3+
/.pnp
4+
.pnp.*
5+
6+
# Build outputs
7+
/build
8+
/dist
9+
/.react-router
10+
11+
# Environment variables
12+
.env
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
# Logs
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*
22+
pnpm-debug.log*
23+
lerna-debug.log*
24+
25+
# Runtime data
26+
pids
27+
*.pid
28+
*.seed
29+
*.pid.lock
30+
31+
# Coverage directory used by tools like istanbul
32+
coverage/
33+
*.lcov
34+
35+
# nyc test coverage
36+
.nyc_output
37+
38+
# Dependency directories
39+
node_modules/
40+
jspm_packages/
41+
42+
# TypeScript cache
43+
*.tsbuildinfo
44+
45+
# Optional npm cache directory
46+
.npm
47+
48+
# Optional eslint cache
49+
.eslintcache
50+
51+
# Optional stylelint cache
52+
.stylelintcache
53+
54+
# Microbundle cache
55+
.rpt2_cache/
56+
.rts2_cache_cjs/
57+
.rts2_cache_es/
58+
.rts2_cache_umd/
59+
60+
# Optional REPL history
61+
.node_repl_history
62+
63+
# Output of 'npm pack'
64+
*.tgz
65+
66+
# Yarn Integrity file
67+
.yarn-integrity
68+
69+
# parcel-bundler cache (https://parceljs.org/)
70+
.cache
71+
.parcel-cache
72+
73+
# Next.js build output
74+
.next
75+
76+
# Nuxt.js build / generate output
77+
.nuxt
78+
dist
79+
80+
# Storybook build outputs
81+
.out
82+
.storybook-out
83+
84+
# Temporary folders
85+
tmp/
86+
temp/
87+
88+
# Editor directories and files
89+
.vscode/*
90+
!.vscode/extensions.json
91+
.idea
92+
*.suo
93+
*.ntvs*
94+
*.njsproj
95+
*.sln
96+
*.sw?
97+
98+
# OS generated files
99+
.DS_Store
100+
.DS_Store?
101+
._*
102+
.Spotlight-V100
103+
.Trashes
104+
ehthumbs.db
105+
Thumbs.db
106+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import {
2+
Links,
3+
Meta,
4+
Outlet,
5+
Scripts,
6+
ScrollRestoration,
7+
} from "react-router";
8+
9+
export default function App() {
10+
return (
11+
<html lang="en">
12+
<head>
13+
<meta charSet="utf-8" />
14+
<meta name="viewport" content="width=device-width, initial-scale=1" />
15+
<Meta />
16+
<Links />
17+
</head>
18+
<body>
19+
<div className="App">
20+
<nav>
21+
<ul>
22+
<li>
23+
<a href="/">Home</a>
24+
</li>
25+
<li>
26+
<a href="/about">About</a>
27+
</li>
28+
<li>
29+
<a href="/contact">Contact</a>
30+
</li>
31+
</ul>
32+
</nav>
33+
34+
<main>
35+
<Outlet />
36+
</main>
37+
</div>
38+
<ScrollRestoration />
39+
<Scripts />
40+
</body>
41+
</html>
42+
);
43+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { RouteConfig } from "@react-router/dev/routes";
2+
import { index, route } from "@react-router/dev/routes";
3+
4+
export default [
5+
index("routes/home.tsx"),
6+
route("/about", "routes/about.tsx"),
7+
route("/contact", "routes/contact.tsx"),
8+
] satisfies RouteConfig;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default function About() {
2+
return (
3+
<div>
4+
<h1>About</h1>
5+
<p>This is a test application for React Router.</p>
6+
</div>
7+
);
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default function Contact() {
2+
return (
3+
<div>
4+
<h1>Contact</h1>
5+
<p>Contact us for more information.</p>
6+
</div>
7+
);
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default function Home() {
2+
return (
3+
<div>
4+
<h1>Home</h1>
5+
<p>Welcome to the React Router test app!</p>
6+
</div>
7+
);
8+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "react-router-test-app",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"build": "react-router build",
8+
"dev": "react-router dev",
9+
"start": "react-router-serve ./build/server/index.js",
10+
"typecheck": "react-router typegen && tsc"
11+
},
12+
"dependencies": {
13+
"@react-router/dev": "^7.8.2",
14+
"@react-router/node": "^7.8.2",
15+
"@react-router/serve": "^7.8.2",
16+
"isbot": "^4.4.0",
17+
"react": "^18.3.1",
18+
"react-dom": "^18.3.1",
19+
"react-router": "^7.8.2"
20+
},
21+
"devDependencies": {
22+
"@types/react": "^18.3.9",
23+
"@types/react-dom": "^18.3.0",
24+
"typescript": "^5.6.2",
25+
"vite": "^6.0.1"
26+
}
27+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import type { Config } from "@react-router/dev/config";
2+
3+
export default {
4+
// Config options
5+
} satisfies Config;
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"include": [
3+
"**/*.ts",
4+
"**/*.tsx",
5+
"**/.server/**/*.ts",
6+
"**/.server/**/*.tsx",
7+
"**/.client/**/*.ts",
8+
"**/.client/**/*.tsx"
9+
],
10+
"compilerOptions": {
11+
"lib": ["DOM", "DOM.Iterable", "ES6"],
12+
"isolatedModules": true,
13+
"esModuleInterop": true,
14+
"jsx": "react-jsx",
15+
"module": "ESNext",
16+
"moduleResolution": "Bundler",
17+
"resolveJsonModule": true,
18+
"target": "ES2022",
19+
"strict": true,
20+
"allowJs": true,
21+
"skipLibCheck": true,
22+
"forceConsistentCasingInFileNames": true,
23+
"baseUrl": ".",
24+
"paths": {
25+
"~/*": ["./app/*"]
26+
},
27+
28+
// React Router v7 specific options
29+
"types": ["@react-router/dev"]
30+
}
31+
}

0 commit comments

Comments
 (0)