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
792f2f8c
Commit
792f2f8c
authored
Nov 19, 2019
by
JJ Kasper
Committed by
Joe Haddad
Nov 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for forward nav after reload (#9452)
parent
57fa38a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
index.test.js
test/integration/client-navigation/test/index.test.js
+18
-3
No files found.
test/integration/client-navigation/test/index.test.js
View file @
792f2f8c
...
@@ -78,14 +78,29 @@ describe('Client Navigation', () => {
...
@@ -78,14 +78,29 @@ describe('Client Navigation', () => {
const
browser
=
await
webdriver
(
context
.
appPort
,
'/nav'
)
const
browser
=
await
webdriver
(
context
.
appPort
,
'/nav'
)
await
browser
.
elementByCss
(
'#about-link'
).
click
()
await
browser
.
elementByCss
(
'#about-link'
).
click
()
await
browser
.
waitForElementByCss
(
'.nav-about'
)
await
browser
.
waitForElementByCss
(
'.nav-about'
)
await
browser
.
eval
(
`window.location.href = window.location.href`
)
await
browser
.
refresh
(
)
await
waitFor
(
5
000
)
await
waitFor
(
3
000
)
await
browser
.
eval
(
`window.history.back()`
)
await
browser
.
back
(
)
await
waitFor
(
3000
)
await
waitFor
(
3000
)
const
text
=
await
browser
.
elementsByCss
(
'#about-link'
).
text
()
const
text
=
await
browser
.
elementsByCss
(
'#about-link'
).
text
()
if
(
browser
)
await
browser
.
close
()
expect
(
text
).
toMatch
(
/About/
)
expect
(
text
).
toMatch
(
/About/
)
})
})
it
(
'should navigate forwards after reload'
,
async
()
=>
{
const
browser
=
await
webdriver
(
context
.
appPort
,
'/nav'
)
await
browser
.
elementByCss
(
'#about-link'
).
click
()
await
browser
.
waitForElementByCss
(
'.nav-about'
)
await
browser
.
back
()
await
browser
.
refresh
()
await
waitFor
(
3000
)
await
browser
.
forward
()
await
waitFor
(
3000
)
const
text
=
await
browser
.
elementsByCss
(
'p'
).
text
()
if
(
browser
)
await
browser
.
close
()
expect
(
text
).
toMatch
(
/this is the about page/i
)
})
it
(
'should navigate via the client side'
,
async
()
=>
{
it
(
'should navigate via the client side'
,
async
()
=>
{
const
browser
=
await
webdriver
(
context
.
appPort
,
'/nav'
)
const
browser
=
await
webdriver
(
context
.
appPort
,
'/nav'
)
...
...
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