Skip to content

Commit 941a34e

Browse files
committed
test: update tests with new odb headers
1 parent 2546f2c commit 941a34e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cypress/integration/default/dynamic-routes.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('Static Routing', () => {
1616
it('renders correct page via ODB on a static route', () => {
1717
cy.request('/getStaticProps/with-revalidate/').then((res) => {
1818
expect(res.status).to.eq(200)
19-
expect(res.headers).to.have.property('x-render-mode', 'isr')
19+
expect(res.headers).to.have.property('x-render-mode', 'odb ttl=60')
2020
expect(res.body).to.contain('Dancing with the Stars')
2121
})
2222
})
@@ -84,7 +84,7 @@ describe('Dynamic Routing', () => {
8484
it('renders correct page via ODB on a prerendered dynamic route with revalidate and fallback: false', () => {
8585
cy.request('/getStaticProps/withRevalidate/1/').then((res) => {
8686
expect(res.status).to.eq(200)
87-
expect(res.headers).to.have.property('x-render-mode', 'isr')
87+
expect(res.headers).to.have.property('x-render-mode', 'odb ttl=60')
8888
expect(res.body).to.contain('Under the Dome')
8989
})
9090
})
@@ -98,29 +98,29 @@ describe('Dynamic Routing', () => {
9898
it('renders correct page via ODB on a prerendered dynamic route with revalidate and fallback: true', () => {
9999
cy.request('/getStaticProps/withRevalidate/withFallback/1/').then((res) => {
100100
expect(res.status).to.eq(200)
101-
expect(res.headers).to.have.property('x-render-mode', 'isr')
101+
expect(res.headers).to.have.property('x-render-mode', 'odb ttl=60')
102102
expect(res.body).to.contain('Under the Dome')
103103
})
104104
})
105105
it('renders fallback page via ODB on a non-prerendered dynamic route with revalidate and fallback: true', () => {
106106
cy.request('/getStaticProps/withRevalidate/withFallback/3/').then((res) => {
107107
expect(res.status).to.eq(200)
108-
expect(res.headers).to.have.property('x-render-mode', 'isr')
108+
expect(res.headers).to.have.property('x-render-mode', 'odb ttl=60')
109109
// expect 'Bitten' until https://github.com/netlify/pillar-runtime/issues/438 is fixed
110110
expect(res.body).to.contain('Bitten')
111111
})
112112
})
113113
it('renders correct page via ODB on a prerendered dynamic route with revalidate and fallback: blocking', () => {
114114
cy.request('/getStaticProps/withRevalidate/withFallbackBlocking/1/').then((res) => {
115115
expect(res.status).to.eq(200)
116-
expect(res.headers).to.have.property('x-render-mode', 'isr')
116+
expect(res.headers).to.have.property('x-render-mode', 'odb ttl=60')
117117
expect(res.body).to.contain('Under the Dome')
118118
})
119119
})
120120
it('renders correct page via ODB on a non-prerendered dynamic route with revalidate and fallback: blocking', () => {
121121
cy.request('/getStaticProps/withRevalidate/withFallbackBlocking/3/').then((res) => {
122122
expect(res.status).to.eq(200)
123-
expect(res.headers).to.have.property('x-render-mode', 'isr')
123+
expect(res.headers).to.have.property('x-render-mode', 'odb ttl=60')
124124
expect(res.body).to.contain('Bitten')
125125
})
126126
})

0 commit comments

Comments
 (0)