Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add inline flight response reuse test #34364

Merged
merged 7 commits into from Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
76 changes: 48 additions & 28 deletions test/integration/gssp-redirect-base-path/test/index.test.js
Expand Up @@ -132,8 +132,9 @@ const runTests = (isDev) => {
const browser = await webdriver(
appPort,
`${basePath}/gsp-blog/redirect-dest-_gsp-blog_first`,
true,
true
{
retryWaitHydration: true,
}
)

await browser.waitForElementByCss('#gsp')
Expand All @@ -154,8 +155,9 @@ const runTests = (isDev) => {
const browser = await webdriver(
appPort,
`${basePath}/gsp-blog/redirect-dest-_gsp-blog_first`,
true,
true
{
retryWaitHydration: true,
}
)

await browser.waitForElementByCss('#gsp')
Expand All @@ -178,8 +180,9 @@ const runTests = (isDev) => {
const browser = await webdriver(
appPort,
`${basePath}/gsp-blog/redirect-dest-_`,
true,
true
{
retryWaitHydration: true,
}
)

await browser.waitForElementByCss('#index')
Expand All @@ -194,8 +197,9 @@ const runTests = (isDev) => {
const browser = await webdriver(
appPort,
`${basePath}/gsp-blog/redirect-dest-_`,
true,
true
{
retryWaitHydration: true,
}
)

await browser.waitForElementByCss('#index')
Expand All @@ -210,8 +214,9 @@ const runTests = (isDev) => {
const browser = await webdriver(
appPort,
`${basePath}/gsp-blog/redirect-dest-_missing`,
true,
true
{
retryWaitHydration: true,
}
)

await check(
Expand All @@ -231,8 +236,9 @@ const runTests = (isDev) => {
const browser = await webdriver(
appPort,
`${basePath}/gsp-blog/redirect-dest-external`,
true,
true
{
retryWaitHydration: true,
}
)

await check(
Expand All @@ -248,8 +254,9 @@ const runTests = (isDev) => {
const browser = await webdriver(
appPort,
`${basePath}/gssp-blog/redirect-dest-external`,
true,
true
{
retryWaitHydration: true,
}
)

await check(
Expand Down Expand Up @@ -279,8 +286,9 @@ const runTests = (isDev) => {
const browser = await webdriver(
appPort,
`${basePath}/gssp-blog/redirect-dest-_gssp-blog_first`,
true,
true
{
retryWaitHydration: true,
}
)

await browser.waitForElementByCss('#gssp')
Expand All @@ -294,7 +302,9 @@ const runTests = (isDev) => {
})

it('should apply redirect when GSSP page is navigated to client-side (internal normal)', async () => {
const browser = await webdriver(appPort, `${basePath}`, true, true)
const browser = await webdriver(appPort, `${basePath}`, {
retryWaitHydration: true,
})

await browser.eval(`(function () {
window.next.router.push('/gssp-blog/redirect-dest-_another')
Expand All @@ -307,7 +317,9 @@ const runTests = (isDev) => {
})

it('should apply redirect when GSSP page is navigated to client-side (external)', async () => {
const browser = await webdriver(appPort, `${basePath}`, true, true)
const browser = await webdriver(appPort, `${basePath}`, {
retryWaitHydration: true,
})

await browser.eval(`(function () {
window.next.router.push('/gssp-blog/redirect-dest-_gssp-blog_first')
Expand All @@ -324,7 +336,9 @@ const runTests = (isDev) => {
})

it('should apply redirect when GSP page is navigated to client-side (internal)', async () => {
const browser = await webdriver(appPort, `${basePath}`, true, true)
const browser = await webdriver(appPort, `${basePath}`, {
retryWaitHydration: true,
})

await browser.eval(`(function () {
window.next.router.push('/gsp-blog/redirect-dest-_another')
Expand All @@ -337,7 +351,9 @@ const runTests = (isDev) => {
})

it('should apply redirect when GSP page is navigated to client-side (external)', async () => {
const browser = await webdriver(appPort, `${basePath}`, true, true)
const browser = await webdriver(appPort, `${basePath}`, {
retryWaitHydration: true,
})

await browser.eval(`(function () {
window.next.router.push('/gsp-blog/redirect-dest-_gsp-blog_first')
Expand All @@ -357,8 +373,9 @@ const runTests = (isDev) => {
const browser = await webdriver(
appPort,
`${basePath}/another?mark_as=root`,
true,
true
{
retryWaitHydration: true,
}
)

await browser.eval(`(function () {
Expand All @@ -384,8 +401,9 @@ const runTests = (isDev) => {
const browser = await webdriver(
appPort,
`${basePath}/another?mark_as=root`,
true,
true
{
retryWaitHydration: true,
}
)

await browser.eval(`(function () {
Expand All @@ -411,8 +429,9 @@ const runTests = (isDev) => {
const browser = await webdriver(
appPort,
`${basePath}/another?mark_as=root`,
true,
true
{
retryWaitHydration: true,
}
)

await browser.eval(`(function () {
Expand All @@ -438,8 +457,9 @@ const runTests = (isDev) => {
const browser = await webdriver(
appPort,
`${basePath}/another?mark_as=root`,
true,
true
{
retryWaitHydration: true,
}
)

await browser.eval(`(function () {
Expand Down