Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drawing-app
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sweng-group-15
drawing-app
Commits
1560df11
Commit
1560df11
authored
5 years ago
by
Yuriy Maksymets
Browse files
Options
Downloads
Patches
Plain Diff
Using server host and port in the tests
parent
76deb064
No related branches found
No related tags found
1 merge request
!66
Testcafe testing base
Pipeline
#101172
failed
5 years ago
Stage: fetch
Stage: deps
Stage: check
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
__tests__/e2e/peer1.test.js
+6
-1
6 additions, 1 deletion
__tests__/e2e/peer1.test.js
__tests__/e2e/peer2.test.js
+4
-1
4 additions, 1 deletion
__tests__/e2e/peer2.test.js
with
10 additions
and
2 deletions
__tests__/e2e/peer1.test.js
+
6
−
1
View file @
1560df11
import
{
Selector
}
from
"
testcafe
"
fixture
`Peer 1`
.
page
`localhost:3000`
const
host
=
"
0.0.0.0
"
const
port
=
process
.
env
.
PORT
||
3000
fixture
`Peer 1`
.
page
`
${
host
}
:
${
port
}
`
const
idAppearTimeout
=
1000
const
selectorOptions
=
{
timeout
:
100
}
...
...
@@ -8,6 +11,7 @@ const selectorOptions = { timeout: 100 }
test
(
"
Connection id appears
"
,
async
(
t
)
=>
{
const
userId
=
async
()
=>
await
Selector
(
"
#user-id
"
).
with
(
selectorOptions
).
value
await
t
.
wait
(
idAppearTimeout
)
.
expect
((
await
userId
()).
length
)
...
...
@@ -16,6 +20,7 @@ test("Connection id appears", async (t) => {
test
(
"
Clicking and dragging on whiteboard creates a single child element
"
,
async
(
t
)
=>
{
const
whiteboard
=
Selector
(
"
#whiteboard
"
).
with
(
selectorOptions
)
await
t
.
drag
(
whiteboard
,
10
,
10
)
.
expect
(
whiteboard
.
childElementCount
)
...
...
This diff is collapsed.
Click to expand it.
__tests__/e2e/peer2.test.js
+
4
−
1
View file @
1560df11
import
{
Selector
}
from
"
testcafe
"
fixture
`Peer 2`
.
page
`localhost:3000`
const
host
=
"
0.0.0.0
"
const
port
=
process
.
env
.
PORT
||
3000
fixture
`Peer 2`
.
page
`
${
host
}
:
${
port
}
`
const
selectorOptions
=
{
timeout
:
100
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment