Skip to content

Commit d89001f

Browse files
committed
chore: run skipped tests
1 parent 7da0018 commit d89001f

File tree

6 files changed

+26
-19
lines changed

6 files changed

+26
-19
lines changed

.github/workflows/e2e-next.yml

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
CHUNKS: ${{ needs.setup.outputs['test-chunks'] }}
5555
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_BOT_AUTH_TOKEN }}
5656
NETLIFY_SITE_ID: 1d5a5c76-d445-4ae5-b694-b0d3f2e2c395
57+
RUN_ALL_TESTS: true
5758
- uses: phoenix-actions/test-reporting@v10
5859
if: ${{ always() }}
5960
name: Report Test Results

test/e2e/modified-tests/edge-compiler-can-import-blob-assets/index.test.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { promises as fs } from 'fs'
66
import { readJson } from 'fs-extra'
77
import type { MiddlewareManifest } from 'next/build/webpack/plugins/middleware-plugin'
88

9+
const mostlySkip = process.env.RUN_ALL_TESTS === 'true' ? it : it.skip
10+
911
describe('Edge Compiler can import asset assets', () => {
1012
let next: NextInstance
1113

@@ -22,14 +24,14 @@ describe('Edge Compiler can import asset assets', () => {
2224
})
2325
afterAll(() => next.destroy())
2426
// NTL Fail
25-
it.skip('allows to fetch a remote URL', async () => {
27+
mostlySkip('allows to fetch a remote URL', async () => {
2628
const response = await fetchViaHTTP(next.url, '/api/edge', {
2729
handler: 'remote-full',
2830
})
2931
expect(await response.text()).toContain('Example Domain')
3032
})
3133
// NTL Fail
32-
it.skip('allows to fetch a remote URL with a path and basename', async () => {
34+
mostlySkip('allows to fetch a remote URL with a path and basename', async () => {
3335
const response = await fetchViaHTTP(
3436
next.url,
3537
'/api/edge',
@@ -50,7 +52,7 @@ describe('Edge Compiler can import asset assets', () => {
5052
expect(html).toContain('Hello, from text-file.txt!')
5153
})
5254
// NTL Fail
53-
it.skip('allows to fetch image assets', async () => {
55+
mostlySkip('allows to fetch image assets', async () => {
5456
const response = await fetchViaHTTP(next.url, '/api/edge', {
5557
handler: 'image-file',
5658
})

test/e2e/modified-tests/middleware-general/test/index.test.ts

+9-8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import webdriver from 'next-webdriver'
66
import { NextInstance } from 'test/lib/next-modes/base'
77
import { check, fetchViaHTTP, waitFor } from 'next-test-utils'
88
import { createNext, FileRef } from 'e2e-utils'
9+
const mostlySkip = process.env.RUN_ALL_TESTS === 'true' ? it : it.skip
910

1011
const urlsError = 'Please use only absolute URLs'
1112

@@ -140,7 +141,7 @@ describe('Middleware Runtime', () => {
140141
})
141142
}
142143
// NTL Fail
143-
it.skip('passes search params with rewrites', async () => {
144+
mostlySkip('passes search params with rewrites', async () => {
144145
const response = await fetchViaHTTP(next.url, `/api/edge-search-params`, {
145146
a: 'b',
146147
})
@@ -258,7 +259,7 @@ describe('Middleware Runtime', () => {
258259
expect(await browser.elementByCss('#as-path').text()).toBe('/rewrite-to-config-rewrite')
259260
})
260261
// NTL Fail
261-
it.skip('should have correct route params for rewrite from config dynamic route', async () => {
262+
mostlySkip('should have correct route params for rewrite from config dynamic route', async () => {
262263
const browser = await webdriver(next.url, '/')
263264
await browser.eval('window.beforeNav = 1')
264265
await browser.eval('window.next.router.push("/rewrite-3")')
@@ -275,7 +276,7 @@ describe('Middleware Runtime', () => {
275276
expect(await browser.elementByCss('#as-path').text()).toBe('/rewrite-3')
276277
})
277278
// NTL Fail
278-
it.skip('should have correct route params for rewrite from config non-dynamic route', async () => {
279+
mostlySkip('should have correct route params for rewrite from config non-dynamic route', async () => {
279280
const browser = await webdriver(next.url, '/')
280281
await browser.eval('window.beforeNav = 1')
281282
await browser.eval('window.next.router.push("/rewrite-1")')
@@ -287,7 +288,7 @@ describe('Middleware Runtime', () => {
287288
})
288289
})
289290
// NTL Fail
290-
it.skip('should redirect the same for direct visit and client-transition', async () => {
291+
mostlySkip('should redirect the same for direct visit and client-transition', async () => {
291292
const res = await fetchViaHTTP(next.url, `/redirect-1`, undefined, {
292293
redirect: 'manual',
293294
})
@@ -302,7 +303,7 @@ describe('Middleware Runtime', () => {
302303
}, 'success')
303304
})
304305
// NTL Fail
305-
it.skip('should rewrite the same for direct visit and client-transition', async () => {
306+
mostlySkip('should rewrite the same for direct visit and client-transition', async () => {
306307
const res = await fetchViaHTTP(next.url, `/rewrite-1`)
307308
expect(res.status).toBe(200)
308309
expect(await res.text()).toContain('Hello World')
@@ -317,7 +318,7 @@ describe('Middleware Runtime', () => {
317318
expect(await browser.eval('window.beforeNav')).toBe(1)
318319
})
319320
// NTL Fail
320-
it.skip('should rewrite correctly for non-SSG/SSP page', async () => {
321+
mostlySkip('should rewrite correctly for non-SSG/SSP page', async () => {
321322
const res = await fetchViaHTTP(next.url, `/rewrite-2`)
322323
expect(res.status).toBe(200)
323324
expect(await res.text()).toContain('AboutA')
@@ -351,7 +352,7 @@ describe('Middleware Runtime', () => {
351352
})
352353
}
353354
// NTL Fail
354-
it.skip('should contain process polyfill', async () => {
355+
mostlySkip('should contain process polyfill', async () => {
355356
const res = await fetchViaHTTP(next.url, `/global`)
356357
expect(readMiddlewareJSON(res)).toEqual({
357358
process: {
@@ -389,7 +390,7 @@ describe('Middleware Runtime', () => {
389390
})
390391
}
391392
// Fail
392-
it.skip(`should allow to abort a fetch request`, async () => {
393+
mostlySkip(`should allow to abort a fetch request`, async () => {
393394
const response = await fetchViaHTTP(next.url, '/abort-controller')
394395
const payload = readMiddlewareJSON(response)
395396
expect('error' in payload).toBe(true)

test/e2e/modified-tests/middleware-rewrites/test/index.test.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { NextInstance } from 'test/lib/next-modes/base'
77
import { check, fetchViaHTTP } from 'next-test-utils'
88
import { createNext, FileRef } from 'e2e-utils'
99
import escapeStringRegexp from 'escape-string-regexp'
10+
const mostlySkip = process.env.RUN_ALL_TESTS === 'true' ? it : it.skip
1011

1112
describe('Middleware Rewrite', () => {
1213
let next: NextInstance
@@ -56,7 +57,7 @@ describe('Middleware Rewrite', () => {
5657
})
5758

5859
// NTL Fail
59-
it.skip('should have props for afterFiles rewrite to SSG page', async () => {
60+
mostlySkip('should have props for afterFiles rewrite to SSG page', async () => {
6061
let browser = await webdriver(next.url, '/')
6162
await browser.eval(`next.router.push("/afterfiles-rewrite-ssg")`)
6263

@@ -78,7 +79,7 @@ describe('Middleware Rewrite', () => {
7879
})
7980

8081
// TODO: middleware effect headers aren't available here
81-
it.skip('includes the locale in rewrites by default', async () => {
82+
mostlySkip('includes the locale in rewrites by default', async () => {
8283
const res = await fetchViaHTTP(next.url, `/rewrite-me-to-about`)
8384
expect(res.headers.get('x-middleware-rewrite')?.endsWith('/en/about')).toEqual(true)
8485
})
@@ -189,7 +190,7 @@ describe('Middleware Rewrite', () => {
189190
await check(() => browser.eval('document.documentElement.innerHTML'), /Example Domain/)
190191
})
191192
// NTL Fail
192-
it.skip('should rewrite to fallback: true page successfully', async () => {
193+
mostlySkip('should rewrite to fallback: true page successfully', async () => {
193194
const randomSlug = `another-${Date.now()}`
194195
const res2 = await fetchViaHTTP(next.url, `/to-blog/${randomSlug}`)
195196
expect(res2.status).toBe(200)

test/e2e/modified-tests/skip-trailing-slash-redirect/index.test.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { NextInstance } from 'test/lib/next-modes/base'
33
import { check, fetchViaHTTP } from 'next-test-utils'
44
import { join } from 'path'
55
import webdriver from 'next-webdriver'
6+
const mostlySkip = process.env.RUN_ALL_TESTS === 'true' ? it : it.skip
67

78
describe('skip-trailing-slash-redirect', () => {
89
let next: NextInstance
@@ -47,15 +48,15 @@ describe('skip-trailing-slash-redirect', () => {
4748
expect(await res.text()).toBe('hello from middleware')
4849
})
4950
// NTL Skip
50-
it.skip('should merge cookies from middleware and API routes correctly', async () => {
51+
mostlySkip('should merge cookies from middleware and API routes correctly', async () => {
5152
const res = await fetchViaHTTP(next.url, '/api/test-cookie', undefined, {
5253
redirect: 'manual',
5354
})
5455
expect(res.status).toBe(200)
5556
expect(res.headers.get('set-cookie')).toEqual('from-middleware=1; Path=/, hello=From API')
5657
})
5758
// NTL Skip
58-
it.skip('should merge cookies from middleware and edge API routes correctly', async () => {
59+
mostlySkip('should merge cookies from middleware and edge API routes correctly', async () => {
5960
const res = await fetchViaHTTP(next.url, '/api/test-cookie-edge', undefined, {
6061
redirect: 'manual',
6162
})
@@ -117,7 +118,7 @@ describe('skip-trailing-slash-redirect', () => {
117118
expect(await res.text()).toContain('another page')
118119
})
119120
// NTL Skip
120-
it.skip('should not apply trailing slash redirect (with slash)', async () => {
121+
mostlySkip('should not apply trailing slash redirect (with slash)', async () => {
121122
const res = await fetchViaHTTP(next.url, '/another/', undefined, {
122123
redirect: 'manual',
123124
})

test/e2e/modified-tests/streaming-ssr/index.test.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const react18Deps = {
77
react: '^18.0.0',
88
'react-dom': '^18.0.0',
99
}
10+
const mostlySkip = process.env.RUN_ALL_TESTS === 'true' ? it : it.skip
1011

1112
const isNextProd = !(global as any).isNextDev && !(global as any).isNextDeploy
1213

@@ -30,7 +31,7 @@ describe('react 18 streaming SSR with custom next configs', () => {
3031
})
3132
afterAll(() => next.destroy())
3233
// NTL Skip
33-
it.skip('should match more specific route along with dynamic routes', async () => {
34+
mostlySkip('should match more specific route along with dynamic routes', async () => {
3435
const res1 = await fetchViaHTTP(next.url, '/api/user/login')
3536
const res2 = await fetchViaHTTP(next.url, '/api/user/any')
3637
expect(await res1.text()).toBe('login')
@@ -42,7 +43,7 @@ describe('react 18 streaming SSR with custom next configs', () => {
4243
expect(html).toContain('color:blue')
4344
})
4445
// NTL Skip
45-
it.skip('should redirect paths without trailing-slash and render when slash is appended', async () => {
46+
mostlySkip('should redirect paths without trailing-slash and render when slash is appended', async () => {
4647
const page = '/hello'
4748
const redirectRes = await fetchViaHTTP(next.url, page, {}, { redirect: 'manual' })
4849
const res = await fetchViaHTTP(next.url, page + '/')

0 commit comments

Comments
 (0)