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
012bc7ed
Unverified
Commit
012bc7ed
authored
Apr 24, 2020
by
yann300
Committed by
GitHub
Apr 24, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2767 from ethereum/ipfs-checkbox
Ipfs Checkbox Fix & E2E Tests
parents
4d5159fe
95f2c605
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
6 deletions
+27
-6
contractDropdown.js
src/app/tabs/runTab/contractDropdown.js
+5
-5
publishContract.js
test-browser/tests/publishContract.js
+22
-1
No files found.
src/app/tabs/runTab/contractDropdown.js
View file @
012bc7ed
...
...
@@ -71,7 +71,7 @@ class ContractDropdownUI {
setCheckedState
(
value
)
{
value
=
value
===
'true'
?
true
:
value
===
'false'
?
false
:
value
this
.
ipfsCheckedState
=
value
document
.
getElementById
(
'deployAndRunPublishToIPFS'
)
.
checked
=
value
if
(
this
.
ipfsCheckbox
)
this
.
ipfsCheckbox
.
checked
=
value
}
toggleCheckedState
()
{
...
...
@@ -92,13 +92,13 @@ class ContractDropdownUI {
const
savedConfig
=
window
.
localStorage
.
getItem
(
`ipfs/
${
this
.
exEnvironment
}
/
${
this
.
networkName
}
`
)
this
.
ipfsCheckedState
=
savedConfig
===
'true'
?
true
:
false
// eslint-disable-line
const
ipfsCheckbox
=
this
.
ipfsCheckedState
===
true
?
yo
`<input id="deployAndRunPublishToIPFS" class="mr-2" checked type="checkbox" onchange=
${
this
.
toggleCheckedState
.
bind
(
this
)}
>`
:
yo
`<input id="deployAndRunPublishToIPFS" class="mr-2" type="checkbox" onchange=
${
this
.
toggleCheckedState
.
bind
(
this
)}
>`
this
.
ipfsCheckbox
=
this
.
ipfsCheckedState
===
true
?
yo
`<input id="deployAndRunPublishToIPFS"
data-id="contractDropdownIpfsCheckbox"
class="mr-2" checked type="checkbox" onchange=
${
this
.
toggleCheckedState
.
bind
(
this
)}
>`
:
yo
`<input id="deployAndRunPublishToIPFS"
data-id="contractDropdownIpfsCheckbox"
class="mr-2" type="checkbox" onchange=
${
this
.
toggleCheckedState
.
bind
(
this
)}
>`
this
.
deployCheckBox
=
yo
`
<div class="mt-2 d-flex align-items-start">
${
ipfsCheckbox
}
${
this
.
ipfsCheckbox
}
<label
for="deployAndRunPublishToIPFS"
class="p-0 m-0"
...
...
test-browser/tests/publishContract.js
View file @
012bc7ed
...
...
@@ -22,7 +22,6 @@ module.exports = {
done
()
})
.
modalFooterOKClick
()
.
end
()
},
'Publish on Swarm'
:
''
+
function
(
browser
)
{
browser
...
...
@@ -32,6 +31,28 @@ module.exports = {
if
(
value
.
indexOf
(
'bzz'
)
===
-
1
)
browser
.
assert
.
fail
(
'swarm deploy failed'
,
''
,
''
)
done
()
})
.
modalFooterOKClick
()
},
'Should publish contract metadata to ipfs on deploy'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'#icon-panel'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
switchFile
(
'browser/1_Storage.sol'
)
.
clickLaunchIcon
(
'udapp'
)
.
waitForElementVisible
(
'*[data-id="contractDropdownIpfsCheckbox"]'
)
.
click
(
'*[data-id="contractDropdownIpfsCheckbox"]'
)
.
click
(
'*[data-id="Deploy - transact (not payable)"]'
)
.
pause
(
5000
)
.
assert
.
containsText
(
'*[data-id="modalDialogModalBody"]'
,
'Metadata of "storage" was published successfully.'
)
.
modalFooterOKClick
()
},
'Should remember choice after page refresh'
:
function
(
browser
)
{
browser
.
refresh
()
.
switchFile
(
'browser/1_Storage.sol'
)
.
clickLaunchIcon
(
'udapp'
)
.
waitForElementVisible
(
'*[data-id="contractDropdownIpfsCheckbox"]'
)
.
verify
.
elementPresent
(
'*[data-id="contractDropdownIpfsCheckbox"]:checked'
)
.
end
()
},
tearDown
:
sauce
...
...
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