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
4741fc20
Commit
4741fc20
authored
Nov 07, 2016
by
Alex Beregszaszi
Committed by
GitHub
Nov 07, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #250 from ethereum/testing
Fix testing and add compilation test.
parents
fb490734
1d90c59a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
2 deletions
+39
-2
compiling.js
test-browser/tests/compiling.js
+38
-0
new-file-test.js
test-browser/tests/new-file-test.js
+1
-1
smoke-test.js
test-browser/tests/smoke-test.js
+0
-1
No files found.
test-browser/tests/compiling.js
0 → 100644
View file @
4741fc20
'use strict'
var
contractHelper
=
require
(
'../helpers/contracts'
)
var
init
=
require
(
'../helpers/init'
)
var
sauce
=
require
(
'./sauce'
)
var
sources
=
{
'sources'
:
{
'Untitled'
:
`pragma solidity ^0.4.0;
contract TestContract { function f() returns (uint) { return 8; } }`
}
}
module
.
exports
=
{
before
:
function
(
browser
,
done
)
{
init
(
browser
,
done
)
},
'@sources'
:
function
()
{
return
sources
},
'Compiling'
:
function
(
browser
)
{
runTests
(
browser
)
},
tearDown
:
sauce
}
function
runTests
(
browser
)
{
browser
.
waitForElementVisible
(
'.newFile'
,
10000
)
contractHelper
.
testContracts
(
browser
,
sources
.
sources
.
Untitled
,
[
'TestContract'
],
function
()
{
browser
.
click
(
'.create .constructor .call'
)
.
waitForElementPresent
(
'.instance .call[title="f"]'
)
.
click
(
'.instance .call[title="f"]'
)
.
waitForElementPresent
(
'.output .returned'
)
.
assert
.
containsText
(
'.output .returned'
,
'0x0000000000000000000000000000000000000000000000000000000000000008'
)
.
assert
.
containsText
(
'.output .decoded li'
,
'uint256: 8'
)
.
end
()
})
}
test-browser/tests/new-file-test.js
View file @
4741fc20
...
@@ -10,7 +10,7 @@ module.exports = {
...
@@ -10,7 +10,7 @@ module.exports = {
browser
browser
.
waitForElementVisible
(
'.newFile'
,
10000
)
.
waitForElementVisible
(
'.newFile'
,
10000
)
.
click
(
'.newFile'
)
.
click
(
'.newFile'
)
.
pause
(
'10000'
)
.
pause
(
500
)
.
assert
.
containsText
(
'.active'
,
'Untitled'
)
.
assert
.
containsText
(
'.active'
,
'Untitled'
)
.
end
()
.
end
()
},
},
...
...
test-browser/tests/smoke-test.js
View file @
4741fc20
...
@@ -10,7 +10,6 @@ module.exports = {
...
@@ -10,7 +10,6 @@ module.exports = {
'Smoke test'
:
function
(
browser
)
{
'Smoke test'
:
function
(
browser
)
{
browser
browser
.
waitForElementVisible
(
'#righthand-panel'
,
10000
)
.
waitForElementVisible
(
'#righthand-panel'
,
10000
)
.
pause
(
'10000'
)
.
assert
.
containsText
(
'#righthand-panel'
,
'Solidity version'
)
.
assert
.
containsText
(
'#righthand-panel'
,
'Solidity version'
)
.
end
()
.
end
()
},
},
...
...
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