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
50b9b73a
Unverified
Commit
50b9b73a
authored
Jul 01, 2019
by
yann300
Committed by
GitHub
Jul 01, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2137 from ethereum/termTestA
Update tests to include 1 for checking if the console works
parents
7eb7f18d
2ba263cb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
2 deletions
+53
-2
README.md
README.md
+2
-0
package.json
package.json
+1
-0
terminal.js
src/app/panels/terminal.js
+3
-2
executeScript.js
test-browser/commands/executeScript.js
+16
-0
journalLastChild.js
test-browser/commands/journalLastChild.js
+14
-0
console.js
test-browser/tests/console.js
+17
-0
No files found.
README.md
View file @
50b9b73a
...
...
@@ -105,6 +105,8 @@ To run the Selenium tests via Nightwatch:
-
npm run nightwatch_local_staticAnalysis
-
npm run nightwatch_local_signingMessage
- npm run nightwatch_local_console
- npm run nightwatch_local_remixd # remixd needs to be run
...
...
package.json
View file @
50b9b73a
...
...
@@ -163,6 +163,7 @@
"nightwatch_local_staticAnalysis"
:
"nightwatch ./test-browser/tests/staticanalysis.js --config nightwatch.js --env chrome "
,
"nightwatch_local_signingMessage"
:
"nightwatch ./test-browser/tests/signingMessage.js --config nightwatch.js --env chrome "
,
"nightwatch_local_remixd"
:
"nightwatch ./test-browser/tests/remix.js --config nightwatch.js --env chrome "
,
"nightwatch_local_console"
:
"nightwatch ./test-browser/tests/console.js --config nightwatch.js --env chrome "
,
"onchange"
:
"onchange build/app.js -- npm-run-all lint"
,
"prepublish"
:
"mkdirp build; npm-run-all -ls downloadsolc_root build"
,
"remixd"
:
"remixd -s ./contracts --remix-ide http://127.0.0.1:8080"
,
...
...
src/app/panels/terminal.js
View file @
50b9b73a
...
...
@@ -109,16 +109,17 @@ class Terminal extends BaseApi {
render
()
{
var
self
=
this
if
(
self
.
_view
.
el
)
return
self
.
_view
.
el
self
.
_view
.
journal
=
yo
`<div class=
${
css
.
journal
}
></div>`
self
.
_view
.
journal
=
yo
`<div
id="journal"
class=
${
css
.
journal
}
></div>`
self
.
_view
.
input
=
yo
`
<span class=
${
css
.
input
}
onload=
${()
=>
{
this
.
focus
()
}}
onpaste
=
$
{
paste
}
onkeydown=
${
change
}
></span>
`
self
.
_view
.
input
.
setAttribute
(
'spellcheck'
,
'false'
)
self
.
_view
.
input
.
setAttribute
(
'contenteditable'
,
'true'
)
self
.
_view
.
input
.
setAttribute
(
'id'
,
'terminalCliInput'
)
self
.
_view
.
input
.
innerText
=
'
\
n'
self
.
_view
.
cli
=
yo
`
<div class="
${
css
.
cli
}
">
<div
id="terminalCli"
class="
${
css
.
cli
}
">
<span class=
${
css
.
prompt
}
>
${
'>'
}
</span>
${
self
.
_view
.
input
}
</div>
...
...
test-browser/commands/executeScript.js
0 → 100644
View file @
50b9b73a
const
EventEmitter
=
require
(
'events'
)
class
ExecuteScript
extends
EventEmitter
{
command
(
script
)
{
this
.
api
.
click
(
'#terminalCli'
)
.
keys
(
script
)
.
keys
(
this
.
api
.
Keys
.
ENTER
)
.
perform
(()
=>
{
this
.
emit
(
'complete'
)
})
return
this
}
}
module
.
exports
=
ExecuteScript
test-browser/commands/journalLastChild.js
0 → 100644
View file @
50b9b73a
const
EventEmitter
=
require
(
'events'
)
class
JournalLastChild
extends
EventEmitter
{
command
(
val
)
{
this
.
api
.
waitForElementVisible
(
'#journal div:last-child span.text-info'
,
10000
)
.
assert
.
containsText
(
'#journal div:last-child span.text-info'
,
val
).
perform
(()
=>
{
this
.
emit
(
'complete'
)
})
return
this
}
}
module
.
exports
=
JournalLastChild
test-browser/tests/console.js
0 → 100644
View file @
50b9b73a
'use strict'
var
init
=
require
(
'../helpers/init'
)
var
sauce
=
require
(
'./sauce'
)
module
.
exports
=
{
before
:
function
(
browser
,
done
)
{
init
(
browser
,
done
)
},
'SimpleExecutionConsole'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'#terminalCli'
,
10000
)
.
executeScript
(
'1+1'
)
.
journalLastChild
(
'2'
)
.
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