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
fdf51b0d
Unverified
Commit
fdf51b0d
authored
Jun 25, 2019
by
yann300
Committed by
GitHub
Jun 25, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2110 from ethereum/refactorBrowserTests
Refactor browser tests
parents
a4e5feb1
9248da33
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
+10
-4
clickFunction.js
test-browser/commands/clickFunction.js
+1
-1
renameFile.js
test-browser/commands/renameFile.js
+1
-0
signMessage.js
test-browser/commands/signMessage.js
+2
-2
generalTests.js
test-browser/tests/generalTests.js
+6
-1
No files found.
test-browser/commands/clickFunction.js
View file @
fdf51b0d
...
...
@@ -14,7 +14,7 @@ class ClickFunction extends EventEmitter {
})
})
.
click
(
'.instance button[title="'
+
fnFullName
+
'"]'
)
.
pause
(
5
00
)
.
pause
(
20
00
)
.
perform
(()
=>
{
this
.
emit
(
'complete'
)
})
...
...
test-browser/commands/renameFile.js
View file @
fdf51b0d
...
...
@@ -41,6 +41,7 @@ function renameFile (browser, path, newFileName, renamedPath, done) {
})
.
click
(
'body'
)
// blur
.
waitForElementVisible
(
'#modal-footer-ok'
,
2000
)
.
pause
(
2000
)
.
click
(
'#modal-footer-ok'
)
.
waitForElementNotPresent
(
'[data-path="'
+
path
+
'"]'
)
.
waitForElementPresent
(
'[data-path="'
+
renamedPath
+
'"]'
)
...
...
test-browser/commands/signMessage.js
View file @
fdf51b0d
...
...
@@ -22,12 +22,12 @@ function signMsg (browser, msg, cb) {
.
setValue
(
'textarea[id="prompt_text"]'
,
msg
,
()
=>
{
browser
.
modalFooterOKClick
().
perform
(
(
client
,
done
)
=>
{
browser
.
getText
(
'span[id="remixRunSignMsgHash"]'
,
(
v
)
=>
{
hash
=
v
;
done
()
})
browser
.
waitForElementPresent
(
'span[id="remixRunSignMsgHash"]'
).
getText
(
'span[id="remixRunSignMsgHash"]'
,
(
v
)
=>
{
hash
=
v
;
done
()
})
}
)
.
perform
(
(
client
,
done
)
=>
{
browser
.
getText
(
'span[id="remixRunSignMsgSignature"]'
,
(
v
)
=>
{
signature
=
v
;
done
()
})
browser
.
waitForElementPresent
(
'span[id="remixRunSignMsgSignature"]'
).
getText
(
'span[id="remixRunSignMsgSignature"]'
,
(
v
)
=>
{
signature
=
v
;
done
()
})
}
)
.
modalFooterOKClick
()
...
...
test-browser/tests/generalTests.js
View file @
fdf51b0d
...
...
@@ -75,6 +75,8 @@ module.exports = {
browser
.
signMessage
(
'test message'
,
(
h
,
s
)
=>
{
hash
=
h
signature
=
s
console
.
log
(
'hash'
,
hash
)
console
.
log
(
'signature'
,
signature
)
browser
.
assert
.
ok
(
typeof
hash
.
value
===
'string'
,
'type of hash.value must be String'
)
browser
.
assert
.
ok
(
typeof
signature
.
value
===
'string'
,
'type of signature.value must be String'
)
})
...
...
@@ -89,7 +91,10 @@ module.exports = {
// skip 'instance' part of e.g. 'instance0x692a70d2e424a56d2c6c27aa97d1a86395877b3a'
const
address
=
result
.
value
.
slice
(
'instance'
.
length
)
console
.
log
(
'Test Signature'
,
result
)
browser
.
clickFunction
(
'ecrecovery - call'
,
{
types
:
'bytes32 hash, bytes sig'
,
values
:
`"
${
hash
.
value
}
","
${
signature
.
value
}
"`
})
var
inputs
=
`"
${
hash
.
value
}
","
${
signature
.
value
}
"`
console
.
log
(
'Test Signature Input'
,
inputs
)
browser
.
clickFunction
(
'ecrecovery - call'
,
{
types
:
'bytes32 hash, bytes sig'
,
values
:
inputs
})
.
pause
(
5000
)
.
verifyCallReturnValue
(
address
,
[
'0: address: 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'
])
...
...
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