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
eb4ef544
Commit
eb4ef544
authored
May 15, 2017
by
Arunoda Susiripala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Possible fix for dynamic import test in travis.
parent
737c283b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
browser.js
test/integration/static/test/browser.js
+8
-1
No files found.
test/integration/static/test/browser.js
View file @
eb4ef544
/* global describe, it, expect */
/* global describe, it, expect */
import
webdriver
from
'next-webdriver'
import
webdriver
from
'next-webdriver'
import
{
waitFor
}
from
'next-test-utils'
export
default
function
(
context
)
{
export
default
function
(
context
)
{
describe
(
'Render via browser'
,
()
=>
{
describe
(
'Render via browser'
,
()
=>
{
...
@@ -95,9 +96,15 @@ export default function (context) {
...
@@ -95,9 +96,15 @@ export default function (context) {
it
(
'should render dynamic import components in the client'
,
async
()
=>
{
it
(
'should render dynamic import components in the client'
,
async
()
=>
{
const
browser
=
await
webdriver
(
context
.
port
,
'/'
)
const
browser
=
await
webdriver
(
context
.
port
,
'/'
)
const
text
=
await
browser
await
browser
.
elementByCss
(
'#dynamic-imports-page'
).
click
()
.
elementByCss
(
'#dynamic-imports-page'
).
click
()
.
waitForElementByCss
(
'#dynamic-imports-page'
)
.
waitForElementByCss
(
'#dynamic-imports-page'
)
// Wait until browser loads the dynamic import chunk
// TODO: We may need to find a better way to do this
await
waitFor
(
5000
)
const
text
=
await
browser
.
elementByCss
(
'#dynamic-imports-page p'
).
text
()
.
elementByCss
(
'#dynamic-imports-page p'
).
text
()
expect
(
text
).
toBe
(
'Welcome to dynamic imports.'
)
expect
(
text
).
toBe
(
'Welcome to dynamic imports.'
)
...
...
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