Skip to content

Commit 5dd8f4c

Browse files
authored
add test for 219 (#304)
1 parent 4d6bf1b commit 5dd8f4c

25 files changed

+21334
-58
lines changed

examples/bugs/gh-219/.dev.vars

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NEXTJS_ENV=development

examples/bugs/gh-219/.gitignore

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts
42+
43+
# Firebase
44+
.firebase/
45+
firebase-debug.log
46+
.env
47+
.env.local
48+
.env.development
49+
.env.test
50+
.env.production
51+
52+
# playwright
53+
/test-results/
54+
/playwright-report/
55+
/blob-report/
56+
/playwright/.cache/

examples/bugs/gh-219/README.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
# or
12+
pnpm dev
13+
# or
14+
bun dev
15+
```
16+
17+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18+
19+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20+
21+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22+
23+
## Learn More
24+
25+
To learn more about Next.js, take a look at the following resources:
26+
27+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29+
30+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31+
32+
## Deploy on Vercel
33+
34+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35+
36+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
37+
38+
# opentelemetry-issue

examples/bugs/gh-219/e2e/base.spec.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { test, expect } from "@playwright/test";
2+
3+
test("the index page of the application shows the Next.js logo", async ({ page }) => {
4+
await page.goto("/");
5+
await expect(page.getByAltText("Next.js logo")).toBeVisible();
6+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { defineConfig, devices } from "@playwright/test";
2+
import type nodeProcess from "node:process";
3+
4+
declare const process: typeof nodeProcess;
5+
6+
/**
7+
* See https://playwright.dev/docs/test-configuration.
8+
*/
9+
export default defineConfig({
10+
testDir: "./",
11+
/* Run tests in files in parallel */
12+
fullyParallel: true,
13+
/* Fail the build on CI if you accidentally left test.only in the source code. */
14+
forbidOnly: !!process.env.CI,
15+
/* Retry on CI only */
16+
retries: process.env.CI ? 2 : 0,
17+
/* Opt out of parallel tests on CI. */
18+
workers: process.env.CI ? 1 : undefined,
19+
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
20+
reporter: "html",
21+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
22+
use: {
23+
/* Base URL to use in actions like `await page.goto('/')`. */
24+
baseURL: "http://localhost:8751",
25+
26+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
27+
trace: "on-first-retry",
28+
},
29+
30+
/* Configure projects for major browsers */
31+
projects: [
32+
{
33+
name: "chromium",
34+
use: { ...devices["Desktop Chrome"] },
35+
},
36+
],
37+
38+
/* Run your local dev server before starting the tests */
39+
webServer: {
40+
command: "pnpm preview",
41+
url: "http://localhost:8751",
42+
reuseExistingServer: !process.env.CI,
43+
timeout: 500_000,
44+
},
45+
});
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { dirname } from "path";
2+
import { fileURLToPath } from "url";
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
});
11+
12+
const eslintConfig = [...compat.extends("next/core-web-vitals", "next/typescript")];
13+
14+
export default eslintConfig;

examples/bugs/gh-219/next.config.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { NextConfig } from "next";
2+
3+
const nextConfig: NextConfig = {
4+
/* config options here */
5+
};
6+
7+
export default nextConfig;
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import type { OpenNextConfig } from "@opennextjs/aws/types/open-next.js";
2+
3+
const config: OpenNextConfig = {
4+
default: {
5+
override: {
6+
wrapper: "cloudflare-node",
7+
converter: "edge",
8+
// Unused implementation
9+
incrementalCache: "dummy",
10+
tagCache: "dummy",
11+
queue: "dummy",
12+
},
13+
},
14+
15+
middleware: {
16+
external: true,
17+
override: {
18+
wrapper: "cloudflare-edge",
19+
converter: "edge",
20+
proxyExternalRequest: "fetch",
21+
},
22+
},
23+
};
24+
25+
export default config;

0 commit comments

Comments
 (0)