Unverified Commit ec6cdb39 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update flakey app-actions deploy tests (#49667)

We'll need to investigate these flakes more but skipping so other tests
can run properly.

x-ref:
https://github.com/vercel/next.js/actions/runs/4944133723/jobs/8839614011
parent 5781401d
...@@ -12,7 +12,7 @@ createNextDescribe( ...@@ -12,7 +12,7 @@ createNextDescribe(
{ {
files: __dirname, files: __dirname,
}, },
({ next, isNextDev, isNextStart }) => { ({ next, isNextDev, isNextStart, isNextDeploy }) => {
it('should handle basic actions correctly', async () => { it('should handle basic actions correctly', async () => {
const browser = await next.browser('/server') const browser = await next.browser('/server')
...@@ -72,13 +72,19 @@ createNextDescribe( ...@@ -72,13 +72,19 @@ createNextDescribe(
const browser = await next.browser('/client') const browser = await next.browser('/client')
await browser.elementByCss('#get-header').click() await browser.elementByCss('#get-header').click()
await check(() => {
return logs.some((log) => // we don't have access to runtime logs on deploy
log.includes('accept header: text/x-component') if (!isNextDeploy) {
) await check(() => {
? 'yes' return logs.some((log) =>
: '' log.includes('accept header: text/x-component')
}, 'yes') )
? 'yes'
: ''
}, 'yes')
}
await check(() => browser.eval('document.cookie'), /test-cookie/)
expect( expect(
await browser.eval('+document.cookie.match(/test-cookie=(\\d+)/)[1]') await browser.eval('+document.cookie.match(/test-cookie=(\\d+)/)[1]')
...@@ -161,11 +167,16 @@ createNextDescribe( ...@@ -161,11 +167,16 @@ createNextDescribe(
await browser.elementByCss('#upload').click() await browser.elementByCss('#upload').click()
await check(() => { // we don't have access to runtime logs on deploy
return logs.some((log) => log.includes('File name: hello.txt size: 5')) if (!isNextDeploy) {
? 'yes' await check(() => {
: '' return logs.some((log) =>
}, 'yes') log.includes('File name: hello.txt size: 5')
)
? 'yes'
: ''
}, 'yes')
}
}) })
it('should support hoc auth wrappers', async () => { it('should support hoc auth wrappers', async () => {
...@@ -389,21 +400,24 @@ createNextDescribe( ...@@ -389,21 +400,24 @@ createNextDescribe(
await browser.elementByCss('#revalidate-justputit').click() await browser.elementByCss('#revalidate-justputit').click()
await check(async () => { // TODO: investigate flakiness when deployed
const newRandomNumber = await browser if (!isNextDeploy) {
.elementByCss('#random-number') await check(async () => {
.text() const newRandomNumber = await browser
const newJustPutIt = await browser.elementByCss('#justputit').text() .elementByCss('#random-number')
const newThankYouNext = await browser .text()
.elementByCss('#thankyounext') const newJustPutIt = await browser.elementByCss('#justputit').text()
.text() const newThankYouNext = await browser
.elementByCss('#thankyounext')
return newRandomNumber !== randomNumber && .text()
justPutIt !== newJustPutIt &&
thankYouNext === newThankYouNext expect(newRandomNumber).not.toBe(randomNumber)
? 'success' expect(newJustPutIt).not.toBe(justPutIt)
: 'failure' expect(newThankYouNext).toBe(thankYouNext)
}, 'success')
return 'success'
}, 'success')
}
}) })
it('should handle revalidateTag + redirect', async () => { it('should handle revalidateTag + redirect', async () => {
...@@ -423,23 +437,27 @@ createNextDescribe( ...@@ -423,23 +437,27 @@ createNextDescribe(
.elementByCss('#thankyounext') .elementByCss('#thankyounext')
.text() .text()
return newRandomNumber === randomNumber && expect(newRandomNumber).toBe(randomNumber)
justPutIt !== newJustPutIt && expect(newJustPutIt).not.toBe(justPutIt)
thankYouNext === newThankYouNext expect(newThankYouNext).toBe(thankYouNext)
? 'success'
: 'failure' return 'success'
}, 'success') }, 'success')
}) })
it('should store revalidation data in the prefetch cache', async () => { it('should store revalidation data in the prefetch cache', async () => {
const browser = await next.browser('/client') const browser = await next.browser('/revalidate')
await browser.elementByCss('#navigate-revalidate').click()
const justPutIt = await browser.elementByCss('#justputit').text() const justPutIt = await browser.elementByCss('#justputit').text()
await browser.elementByCss('#revalidate-justputit').click() await browser.elementByCss('#revalidate-justputit').click()
await check(async () => {
const newJustPutIt = await browser.elementByCss('#justputit').text() // TODO: investigate flakiness when deployed
return newJustPutIt !== justPutIt ? 'success' : 'failure' if (!isNextDeploy) {
}, 'success') await check(async () => {
const newJustPutIt = await browser.elementByCss('#justputit').text()
expect(newJustPutIt).not.toBe(justPutIt)
return 'success'
}, 'success')
}
const newJustPutIt = await browser.elementByCss('#justputit').text() const newJustPutIt = await browser.elementByCss('#justputit').text()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment