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
c755c05f
Commit
c755c05f
authored
May 28, 2021
by
aniket-engg
Committed by
Aniket
May 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
consider hash from web3 provider
parent
c0474406
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
getLastTransactionHash.ts
apps/remix-ide-e2e/src/commands/getLastTransactionHash.ts
+2
-1
ballot.test.ts
apps/remix-ide-e2e/src/tests/ballot.test.ts
+8
-3
No files found.
apps/remix-ide-e2e/src/commands/getLastTransactionHash.ts
View file @
c755c05f
...
@@ -21,7 +21,8 @@ function getLastTransactionHash (browser: NightwatchBrowser, callback: (hash: st
...
@@ -21,7 +21,8 @@ function getLastTransactionHash (browser: NightwatchBrowser, callback: (hash: st
for
(
let
i
=
deployedContracts
.
length
-
1
;
i
>=
0
;
i
--
)
{
for
(
let
i
=
deployedContracts
.
length
-
1
;
i
>=
0
;
i
--
)
{
const
current
=
deployedContracts
[
i
]
const
current
=
deployedContracts
[
i
]
const
attr
=
current
.
getAttribute
(
'data-id'
)
const
attr
=
current
.
getAttribute
(
'data-id'
)
if
(
attr
&&
attr
.
replace
(
'block_tx'
,
''
).
startsWith
(
'0x'
))
{
// For web3 provider, a contract call simulates a tx hash starting with 'block_txcall'
if
(
attr
&&
(
attr
.
replace
(
'block_tx'
,
''
).
startsWith
(
'0x'
)
||
attr
.
replace
(
'block_txcall'
,
''
).
startsWith
(
'0x'
)))
{
return
attr
.
replace
(
'block_tx'
,
''
)
return
attr
.
replace
(
'block_tx'
,
''
)
}
}
}
}
...
...
apps/remix-ide-e2e/src/tests/ballot.test.ts
View file @
c755c05f
...
@@ -43,7 +43,7 @@ module.exports = {
...
@@ -43,7 +43,7 @@ module.exports = {
to
:
'Ballot.winnerName() 0x692a70D2e424a56D2C6C27aA97D1a86395877b3A'
,
to
:
'Ballot.winnerName() 0x692a70D2e424a56D2C6C27aA97D1a86395877b3A'
,
'decoded output'
:
{
0
:
'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'
}
'decoded output'
:
{
0
:
'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'
}
})
})
// Test in Udapp UI
// Test in Udapp UI
, treeViewDiv0 shows returned value on method click
.
assert
.
containsText
(
'*[data-id="treeViewDiv0"]'
,
'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'
)
.
assert
.
containsText
(
'*[data-id="treeViewDiv0"]'
,
'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'
)
},
},
...
@@ -93,16 +93,21 @@ module.exports = {
...
@@ -93,16 +93,21 @@ module.exports = {
.
clickFunction
(
'delegate - transact (not payable)'
,
{
types
:
'address to'
,
values
:
'0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'
})
.
clickFunction
(
'delegate - transact (not payable)'
,
{
types
:
'address to'
,
values
:
'0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'
})
.
journalLastChildIncludes
(
'Ballot.delegate(address)'
)
.
journalLastChildIncludes
(
'Ballot.delegate(address)'
)
.
journalLastChildIncludes
(
'data: 0x5c1...a733c'
)
.
journalLastChildIncludes
(
'data: 0x5c1...a733c'
)
},
'Call method from Ballot to check return value using external web3'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
clickFunction
(
'winnerName - call'
)
.
clickFunction
(
'winnerName - call'
)
// Test in terminal
// Test in terminal
.
journalLastChildIncludes
(
'Ballot.winnerName()'
)
.
testFunction
(
'last'
,
.
testFunction
(
'last'
,
{
{
'decoded output'
:
{
0
:
'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'
}
'decoded output'
:
{
0
:
'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'
}
})
})
// Test in Udapp UI
// Test in Udapp UI
, treeViewDiv0 shows returned value on method click
.
assert
.
containsText
(
'*[data-id="treeViewDiv0"]'
,
'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'
)
.
assert
.
containsText
(
'*[data-id="treeViewDiv0"]'
,
'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'
)
.
end
()
.
end
()
}
}
,
}
}
const
localsCheck
=
{
const
localsCheck
=
{
...
...
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