Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
638178dd
Commit
638178dd
authored
Feb 19, 2021
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed failing tests
parent
7dee925e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
testFunction.ts
apps/remix-ide-e2e/src/commands/testFunction.ts
+12
-2
recorder.test.ts
apps/remix-ide-e2e/src/tests/recorder.test.ts
+1
-3
No files found.
apps/remix-ide-e2e/src/commands/testFunction.ts
View file @
638178dd
...
...
@@ -7,7 +7,9 @@ class TestFunction extends EventEmitter {
command
(
this
:
NightwatchBrowser
,
txHash
:
string
,
expectedValue
:
NightwatchTestFunctionExpectedInput
):
NightwatchBrowser
{
const
browser
=
this
.
api
const
logs
=
{}
const
setLog
=
(
index
:
number
,
value
:
string
)
=>
{
logs
[
Object
.
keys
(
logs
)[
index
]]
=
typeof
value
===
'string'
?
value
.
trim
()
:
value
}
const
setLog
=
(
index
:
number
,
value
:
string
)
=>
{
logs
[
Object
.
keys
(
logs
)[
index
]]
=
typeof
value
===
'string'
?
value
.
indexOf
(
'Copy value to clipboard'
)
?
value
.
split
(
'
\
n'
).
shift
().
trim
():
value
.
trim
()
:
value
}
browser
.
waitForElementVisible
(
`[data-id="block_tx
${
txHash
}
"]`
)
...
...
@@ -45,7 +47,15 @@ class TestFunction extends EventEmitter {
browser
.
perform
(()
=>
{
Object
.
keys
(
expectedValue
).
forEach
(
key
=>
{
const
equal
:
boolean
=
deepequal
(
logs
[
key
],
expectedValue
[
key
])
let
equal
=
false
try
{
const
receivedValue
=
JSON
.
parse
(
logs
[
key
])
equal
=
deepequal
(
receivedValue
,
expectedValue
[
key
])
}
catch
(
err
)
{
equal
=
deepequal
(
logs
[
key
],
expectedValue
[
key
])
}
if
(
!
equal
)
{
browser
.
assert
.
fail
(
`Expected
${
JSON
.
stringify
(
expectedValue
[
key
])}
but got
${
JSON
.
stringify
(
logs
[
key
])}
`
)
...
...
apps/remix-ide-e2e/src/tests/recorder.test.ts
View file @
638178dd
...
...
@@ -14,9 +14,7 @@ module.exports = {
'Test Recorder'
:
function
(
browser
:
NightwatchBrowser
)
{
let
addressRef
browser
.
pause
(
50000
)
.
addFile
(
'scenario.json'
,
{
content
:
records
})
browser
.
addFile
(
'scenario.json'
,
{
content
:
records
})
.
pause
(
5000
)
.
clickLaunchIcon
(
'udapp'
)
.
selectAccount
(
'0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'
)
// this account will be used for this test suite
...
...
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