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
fc874399
Commit
fc874399
authored
Dec 09, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better testing
parent
3313d4cb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
contracts.js
test-browser/helpers/contracts.js
+6
-12
No files found.
test-browser/helpers/contracts.js
View file @
fc874399
...
@@ -85,23 +85,17 @@ function clickFunction (fnFullName, expectedInput) {
...
@@ -85,23 +85,17 @@ function clickFunction (fnFullName, expectedInput) {
}
}
function
verifyCallReturnValue
(
browser
,
address
,
checks
,
done
)
{
function
verifyCallReturnValue
(
browser
,
address
,
checks
,
done
)
{
browser
.
execute
(
function
(
address
,
checks
)
{
browser
.
execute
(
function
(
address
)
{
var
nodes
=
document
.
querySelectorAll
(
'#instance'
+
address
+
' div[class^="contractProperty"] div[class^="value"]'
)
var
nodes
=
document
.
querySelectorAll
(
'#instance'
+
address
+
' div[class^="contractProperty"] div[class^="value"]'
)
var
ret
=
{
sucess
:
true
}
var
ret
=
[]
for
(
var
k
in
checks
)
{
for
(
var
k
in
checks
)
{
var
text
=
nodes
[
k
].
innerText
?
nodes
[
k
].
innerText
:
nodes
[
k
].
textContent
var
text
=
nodes
[
k
].
innerText
?
nodes
[
k
].
innerText
:
nodes
[
k
].
textContent
text
=
text
.
replace
(
'
\
n'
,
''
)
ret
.
push
(
text
)
if
(
checks
[
k
]
!==
text
)
{
ret
.
sucess
=
false
ret
.
expected
=
checks
[
k
]
ret
.
got
=
text
return
ret
}
}
}
return
ret
return
ret
},
[
address
,
checks
],
function
(
result
)
{
},
[
address
],
function
(
result
)
{
if
(
!
result
.
value
.
suces
s
)
{
for
(
var
k
in
check
s
)
{
browser
.
assert
.
fail
(
'verifyCallReturnValue failed'
,
JSON
.
stringify
(
result
.
value
),
''
)
browser
.
assert
.
equal
(
checks
[
k
],
result
.
value
[
k
]
)
}
}
done
()
done
()
})
})
...
...
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