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
f5c8b428
Unverified
Commit
f5c8b428
authored
May 18, 2020
by
Joe Haddad
Committed by
GitHub
May 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stabilize test for Windows (#13050)
parent
5cdb408e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
index.test.js
test/integration/getserversideprops/test/index.test.js
+7
-2
index.test.js
test/integration/prerender/test/index.test.js
+14
-4
No files found.
test/integration/getserversideprops/test/index.test.js
View file @
f5c8b428
...
@@ -387,8 +387,13 @@ const runTests = (dev = false) => {
...
@@ -387,8 +387,13 @@ const runTests = (dev = false) => {
await
waitFor
(
500
)
await
waitFor
(
500
)
await
browser
.
eval
(
'window.beforeClick = "abc"'
)
await
browser
.
eval
(
'window.beforeClick = "abc"'
)
await
browser
.
elementByCss
(
'#broken-post'
).
click
()
await
browser
.
elementByCss
(
'#broken-post'
).
click
()
await
waitFor
(
1000
)
expect
(
expect
(
await
browser
.
eval
(
'window.beforeClick'
)).
not
.
toBe
(
'abc'
)
await
check
(()
=>
browser
.
eval
(
'window.beforeClick'
),
{
test
(
v
)
{
return
v
!==
'abc'
},
})
).
toBe
(
true
)
})
})
it
(
'should always call getServerSideProps without caching'
,
async
()
=>
{
it
(
'should always call getServerSideProps without caching'
,
async
()
=>
{
...
...
test/integration/prerender/test/index.test.js
View file @
f5c8b428
...
@@ -382,8 +382,13 @@ const runTests = (dev = false, looseMode = false) => {
...
@@ -382,8 +382,13 @@ const runTests = (dev = false, looseMode = false) => {
const
browser
=
await
webdriver
(
appPort
,
'/'
)
const
browser
=
await
webdriver
(
appPort
,
'/'
)
await
browser
.
eval
(
'window.beforeClick = "abc"'
)
await
browser
.
eval
(
'window.beforeClick = "abc"'
)
await
browser
.
elementByCss
(
'#broken-post'
).
click
()
await
browser
.
elementByCss
(
'#broken-post'
).
click
()
await
waitFor
(
1000
)
expect
(
expect
(
await
browser
.
eval
(
'window.beforeClick'
)).
not
.
toBe
(
'abc'
)
await
check
(()
=>
browser
.
eval
(
'window.beforeClick'
),
{
test
(
v
)
{
return
v
!==
'abc'
},
})
).
toBe
(
true
)
})
})
// TODO: dev currently renders this page as blocking, meaning it shows the
// TODO: dev currently renders this page as blocking, meaning it shows the
...
@@ -393,8 +398,13 @@ const runTests = (dev = false, looseMode = false) => {
...
@@ -393,8 +398,13 @@ const runTests = (dev = false, looseMode = false) => {
const
browser
=
await
webdriver
(
appPort
,
'/'
)
const
browser
=
await
webdriver
(
appPort
,
'/'
)
await
browser
.
eval
(
'window.beforeClick = "abc"'
)
await
browser
.
eval
(
'window.beforeClick = "abc"'
)
await
browser
.
elementByCss
(
'#broken-at-first-post'
).
click
()
await
browser
.
elementByCss
(
'#broken-at-first-post'
).
click
()
await
waitFor
(
3000
)
expect
(
expect
(
await
browser
.
eval
(
'window.beforeClick'
)).
not
.
toBe
(
'abc'
)
await
check
(()
=>
browser
.
eval
(
'window.beforeClick'
),
{
test
(
v
)
{
return
v
!==
'abc'
},
})
).
toBe
(
true
)
const
text
=
await
browser
.
elementByCss
(
'#params'
).
text
()
const
text
=
await
browser
.
elementByCss
(
'#params'
).
text
()
expect
(
text
).
toMatch
(
/post.*
?
post-999/
)
expect
(
text
).
toMatch
(
/post.*
?
post-999/
)
...
...
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