Unverified Commit 1319be65 authored by Hendrik Liebau's avatar Hendrik Liebau Committed by GitHub

Disable `"use cache"` deploy tests (#79586)

parent ad725bf5
...@@ -13,9 +13,16 @@ const GENERIC_RSC_ERROR = ...@@ -13,9 +13,16 @@ const GENERIC_RSC_ERROR =
'An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.' 'An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.'
describe('use-cache', () => { describe('use-cache', () => {
const { next, isNextDev, isNextDeploy, isNextStart } = nextTestSetup({ const { next, isNextDev, isNextDeploy, isNextStart, skipped } = nextTestSetup(
{
files: __dirname, files: __dirname,
}) skipDeployment: true,
}
)
if (skipped) {
return
}
it('should cache results', async () => { it('should cache results', async () => {
const browser = await next.browser(`/?n=1`) const browser = await next.browser(`/?n=1`)
...@@ -158,8 +165,6 @@ describe('use-cache', () => { ...@@ -158,8 +165,6 @@ describe('use-cache', () => {
} }
}) })
// TODO: Enable for deploy tests when upstream changes have been rolled out.
if (!isNextDeploy) {
it('should cache results in route handlers', async () => { it('should cache results in route handlers', async () => {
const response = await next.fetch('/api') const response = await next.fetch('/api')
const { rand1, rand2 } = await response.json() const { rand1, rand2 } = await response.json()
...@@ -198,7 +203,6 @@ describe('use-cache', () => { ...@@ -198,7 +203,6 @@ describe('use-cache', () => {
expect(values).not.toEqual(initialValues) expect(values).not.toEqual(initialValues)
} }
}) })
}
it('should cache results for cached functions imported from client components', async () => { it('should cache results for cached functions imported from client components', async () => {
const browser = await next.browser('/imported-from-client') const browser = await next.browser('/imported-from-client')
...@@ -244,8 +248,6 @@ describe('use-cache', () => { ...@@ -244,8 +248,6 @@ describe('use-cache', () => {
}) })
}) })
// TODO: pending tags handling on deploy
if (!isNextDeploy) {
it('should update after unstable_expireTag correctly', async () => { it('should update after unstable_expireTag correctly', async () => {
const browser = await next.browser('/cache-tag') const browser = await next.browser('/cache-tag')
const initial = await browser.elementByCss('#a').text() const initial = await browser.elementByCss('#a').text()
...@@ -398,7 +400,6 @@ describe('use-cache', () => { ...@@ -398,7 +400,6 @@ describe('use-cache', () => {
expect(await browser.elementByCss('p').text()).not.toBe(value) expect(await browser.elementByCss('p').text()).not.toBe(value)
}) })
}) })
}
it('should revalidate caches during on-demand revalidation', async () => { it('should revalidate caches during on-demand revalidation', async () => {
const browser = await next.browser('/on-demand-revalidate') const browser = await next.browser('/on-demand-revalidate')
...@@ -425,16 +426,10 @@ describe('use-cache', () => { ...@@ -425,16 +426,10 @@ describe('use-cache', () => {
}) })
}) })
// TODO: Enable for deploy tests when upstream changes have been rolled out.
if (!isNextDeploy) {
it('should not use stale caches in server actions that have revalidated', async () => { it('should not use stale caches in server actions that have revalidated', async () => {
const browser = await next.browser('/revalidate-and-use') const browser = await next.browser('/revalidate-and-use')
const useCacheValue1 = await browser const useCacheValue1 = await browser.elementById('use-cache-value-1').text()
.elementById('use-cache-value-1') const useCacheValue2 = await browser.elementById('use-cache-value-2').text()
.text()
const useCacheValue2 = await browser
.elementById('use-cache-value-2')
.text()
const fetchedValue = await browser.elementById('fetched-value').text() const fetchedValue = await browser.elementById('fetched-value').text()
expect(useCacheValue1).toEqual(useCacheValue2) expect(useCacheValue1).toEqual(useCacheValue2)
...@@ -473,7 +468,6 @@ describe('use-cache', () => { ...@@ -473,7 +468,6 @@ describe('use-cache', () => {
newFetchedValue newFetchedValue
) )
}) })
}
if (isNextStart) { if (isNextStart) {
it('should prerender fully cacheable pages as static HTML', async () => { it('should prerender fully cacheable pages as static HTML', async () => {
...@@ -591,8 +585,6 @@ describe('use-cache', () => { ...@@ -591,8 +585,6 @@ describe('use-cache', () => {
}) })
}) })
// TODO(useCache): Re-activate for deploy tests when NAR-85 is resolved.
if (!isNextDeploy) {
it('should be able to revalidate a page using unstable_expireTag', async () => { it('should be able to revalidate a page using unstable_expireTag', async () => {
const browser = await next.browser(`/form`) const browser = await next.browser(`/form`)
const time1 = await browser.waitForElementByCss('#t').text() const time1 = await browser.waitForElementByCss('#t').text()
...@@ -617,7 +609,6 @@ describe('use-cache', () => { ...@@ -617,7 +609,6 @@ describe('use-cache', () => {
// const time4 = await browser.waitForElementByCss('#t').text() // const time4 = await browser.waitForElementByCss('#t').text()
// expect(time4).toBe(time3); // expect(time4).toBe(time3);
}) })
}
it('should use revalidate config in fetch', async () => { it('should use revalidate config in fetch', async () => {
const browser = await next.browser('/fetch-revalidate') const browser = await next.browser('/fetch-revalidate')
......
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