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
4826172c
Commit
4826172c
authored
Feb 14, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix import
parent
1fe61b28
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
2 deletions
+49
-2
company.sol
contracts/src/gmbh/company.sol
+1
-0
app.js
src/app.js
+1
-1
simpleContract.js
test-browser/tests/simpleContract.js
+47
-1
No files found.
contracts/src/gmbh/company.sol
View file @
4826172c
import "./contract.sol";
contract Assets {
function add(uint8 _numProposals) {
...
...
src/app.js
View file @
4826172c
...
...
@@ -221,7 +221,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
if
(
exist
)
{
return
provider
.
get
(
url
,
cb
)
}
else
{
return
cb
(
'
f
ile not found'
)
return
cb
(
'
Unable to import "'
+
url
+
'": F
ile not found'
)
}
})
}
else
{
...
...
test-browser/tests/simpleContract.js
View file @
4826172c
...
...
@@ -28,7 +28,8 @@ function runTests (browser) {
async
.
waterfall
([
function
(
callback
)
{
callback
(
null
,
browser
)
},
testSimpleContract
,
testSuccessImport
,
testFailedImport
/* testGitHubImport */
testFailedImport
,
/* testGitHubImport */
testImportFromRemixd
],
function
()
{
browser
.
end
()
...
...
@@ -36,6 +37,26 @@ function runTests (browser) {
})
}
function
testImportFromRemixd
(
browser
,
callback
)
{
browser
.
click
(
'.websocketconn'
)
.
waitForElementVisible
(
'#modal-footer-ok'
,
10000
)
.
click
(
'#modal-footer-ok'
)
.
waitForElementVisible
(
'[data-path="localhost"]'
,
100000
)
.
click
(
'[data-path="localhost"]'
)
.
waitForElementVisible
(
'[data-path="localhost/src"]'
,
100000
)
.
click
(
'[data-path="localhost/src"]'
)
.
waitForElementVisible
(
'[data-path="localhost/src/gmbh"]'
,
100000
)
.
click
(
'[data-path="localhost/src/gmbh"]'
)
.
waitForElementVisible
(
'[data-path="localhost/src/gmbh/company.sol"]'
,
100000
)
.
click
(
'[data-path="localhost/src/gmbh/company.sol"]'
)
.
perform
(()
=>
{
contractHelper
.
verifyContract
(
browser
,
[
'Assets'
,
'gmbh'
],
function
()
{
browser
.
click
(
'.websocketconn'
)
callback
(
null
,
browser
)
})
})
}
function
testSimpleContract
(
browser
,
callback
)
{
console
.
log
(
'testSimpleContract'
)
contractHelper
.
testContracts
(
browser
,
'Untitled.sol'
,
sources
[
0
][
'browser/Untitled.sol'
],
[
'test1'
,
'test2'
],
function
()
{
...
...
@@ -198,6 +219,24 @@ contract ENS is AbstractENS {
}
}`
var
assetsTestContract
=
`import "./contract.sol";
contract Assets {
function add(uint8 _numProposals) {
proposals.length = _numProposals;
}
}
`
var
gmbhTestContract
=
`
contract gmbh {
function register(uint8 _numProposals) {
proposals.length = _numProposals;
}
}
`
var
sources
=
[
{
'browser/Untitled.sol'
:
{
content
:
'contract test1 {} contract test2 {}'
}
...
...
@@ -217,5 +256,12 @@ var sources = [
'browser/Untitled4.sol'
:
{
content
:
'import "github.com/ethereum/ens/contracts/ENS.sol"; contract test7 {}'
},
'github.com/ethereum/ens/contracts/ENS.sol'
:
{
content
:
ENS
},
'github.com/ethereum/ens/contracts/AbstractENS.sol'
:
{
content
:
abstractENS
}
},
{
'localhost/src/gmbh/company.sol'
:
{
content
:
assetsTestContract
}
},
{
'localhost/src/gmbh/company.sol'
:
{
content
:
assetsTestContract
},
'localhost/src/gmbh/contract.sol'
:
{
content
:
gmbhTestContract
}
}
]
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