Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
ce820e2a
Unverified
Commit
ce820e2a
authored
Oct 07, 2022
by
Tim Neutkens
Committed by
GitHub
Oct 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable passing tests (#41241)
parent
b5590022
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
21 deletions
+32
-21
index.test.ts
test/e2e/app-dir/index.test.ts
+32
-21
No files found.
test/e2e/app-dir/index.test.ts
View file @
ce820e2a
...
...
@@ -259,7 +259,7 @@ describe('app dir', () => {
describe
(
'rewrites'
,
()
=>
{
// TODO-APP: rewrite url is broken
it
.
skip
(
'should support rewrites on initial load'
,
async
()
=>
{
it
(
'should support rewrites on initial load'
,
async
()
=>
{
const
browser
=
await
webdriver
(
next
.
url
,
'/rewritten-to-dashboard'
)
expect
(
await
browser
.
elementByCss
(
'h1'
).
text
()).
toBe
(
'Dashboard'
)
expect
(
await
browser
.
url
()).
toBe
(
`
${
next
.
url
}
/rewritten-to-dashboard`
)
...
...
@@ -826,7 +826,7 @@ describe('app dir', () => {
describe
(
'next/router'
,
()
=>
{
// `useRouter` should not be accessible in server components.
it
.
skip
(
'should always return null when accessed from /app'
,
async
()
=>
{
it
(
'should always return null when accessed from /app'
,
async
()
=>
{
const
browser
=
await
webdriver
(
next
.
url
,
'/old-router'
)
try
{
...
...
@@ -1436,31 +1436,42 @@ describe('app dir', () => {
})
// TODO-APP: disable failing test and investigate later
it
.
skip
(
'should render the template that is a server component and rerender on navigation'
,
async
()
=>
{
const
browser
=
await
webdriver
(
next
.
url
,
'/template/servercomponent'
)
expect
(
await
browser
.
elementByCss
(
'h1'
).
text
()).
toStartWith
(
'Template'
)
;(
isDev
?
it
.
skip
:
it
)(
'should render the template that is a server component and rerender on navigation'
,
async
()
=>
{
const
browser
=
await
webdriver
(
next
.
url
,
'/template/servercomponent'
)
// eslint-disable-next-line jest/no-standalone-expect
expect
(
await
browser
.
elementByCss
(
'h1'
).
text
()).
toStartWith
(
'Template'
)
const
currentTime
=
await
browser
.
elementByCss
(
'#performance-now'
)
.
text
()
const
currentTime
=
await
browser
.
elementByCss
(
'#performance-now'
)
.
text
()
await
browser
.
elementByCss
(
'#link'
).
click
()
await
browser
.
waitForElementByCss
(
'#other-page'
)
await
browser
.
elementByCss
(
'#link'
).
click
()
await
browser
.
waitForElementByCss
(
'#other-page'
)
expect
(
await
browser
.
elementByCss
(
'h1'
).
text
()).
toStartWith
(
'Template'
)
// eslint-disable-next-line jest/no-standalone-expect
expect
(
await
browser
.
elementByCss
(
'h1'
).
text
()).
toStartWith
(
'Template'
)
// template should rerender on navigation even when it's a server component
expect
(
await
browser
.
elementByCss
(
'#performance-now'
).
text
()).
toBe
(
currentTime
)
// template should rerender on navigation even when it's a server component
// eslint-disable-next-line jest/no-standalone-expect
expect
(
await
browser
.
elementByCss
(
'#performance-now'
).
text
()).
toBe
(
currentTime
)
await
browser
.
elementByCss
(
'#link'
).
click
()
await
browser
.
waitForElementByCss
(
'#page'
)
await
browser
.
elementByCss
(
'#link'
).
click
()
await
browser
.
waitForElementByCss
(
'#page'
)
expect
(
await
browser
.
elementByCss
(
'#performance-now'
).
text
()).
toBe
(
currentTime
)
})
// eslint-disable-next-line jest/no-standalone-expect
expect
(
await
browser
.
elementByCss
(
'#performance-now'
).
text
()).
toBe
(
currentTime
)
}
)
})
// TODO-APP: This is disabled for development as the error overlay needs to be reworked.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment