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
2cf7ed50
Commit
2cf7ed50
authored
May 15, 2020
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed nightwatch switchFile command to openFile
parent
10bb3a7f
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
47 additions
and
47 deletions
+47
-47
fileManager.js
src/app/files/fileManager.js
+9
-9
openFile.js
test-browser/commands/openFile.js
+4
-4
defaultLayout.test.js
test-browser/tests/defaultLayout.test.js
+1
-1
editor.test.js
test-browser/tests/editor.test.js
+6
-6
generalSettings.test.js
test-browser/tests/generalSettings.test.js
+3
-3
gist.test.js
test-browser/tests/gist.test.js
+5
-5
libraryDeployment.test.js
test-browser/tests/libraryDeployment.test.js
+4
-4
pluginManager.test.js
test-browser/tests/pluginManager.test.js
+1
-1
publishContract.test.js
test-browser/tests/publishContract.test.js
+3
-3
runAndDeploy.js
test-browser/tests/runAndDeploy.js
+2
-2
signingMessage.test.js
test-browser/tests/signingMessage.test.js
+1
-1
solidityImport.test.js
test-browser/tests/solidityImport.test.js
+1
-1
solidityUnittests.test.js
test-browser/tests/solidityUnittests.test.js
+5
-5
terminal.test.js
test-browser/tests/terminal.test.js
+2
-2
No files found.
src/app/files/fileManager.js
View file @
2cf7ed50
...
@@ -143,7 +143,7 @@ class FileManager extends Plugin {
...
@@ -143,7 +143,7 @@ class FileManager extends Plugin {
async
open
(
path
)
{
async
open
(
path
)
{
await
this
.
_handleExists
(
path
,
`Cannot open file
${
path
}
`
)
await
this
.
_handleExists
(
path
,
`Cannot open file
${
path
}
`
)
await
this
.
_handleIsFile
(
path
,
`Cannot open file
${
path
}
`
)
await
this
.
_handleIsFile
(
path
,
`Cannot open file
${
path
}
`
)
return
this
.
switch
File
(
path
)
return
this
.
open
File
(
path
)
}
}
/**
/**
...
@@ -274,7 +274,7 @@ class FileManager extends Plugin {
...
@@ -274,7 +274,7 @@ class FileManager extends Plugin {
delete
this
.
openedFiles
[
oldName
]
delete
this
.
openedFiles
[
oldName
]
this
.
openedFiles
[
newName
]
=
newName
this
.
openedFiles
[
newName
]
=
newName
}
}
this
.
switch
File
(
newName
)
this
.
open
File
(
newName
)
}
else
{
}
else
{
var
newFocus
var
newFocus
for
(
var
k
in
this
.
openedFiles
)
{
for
(
var
k
in
this
.
openedFiles
)
{
...
@@ -288,7 +288,7 @@ class FileManager extends Plugin {
...
@@ -288,7 +288,7 @@ class FileManager extends Plugin {
}
}
}
}
if
(
newFocus
)
{
if
(
newFocus
)
{
this
.
switch
File
(
newFocus
)
this
.
open
File
(
newFocus
)
}
}
}
}
// TODO: Only keep `this.emit` (issue#2210)
// TODO: Only keep `this.emit` (issue#2210)
...
@@ -390,7 +390,7 @@ class FileManager extends Plugin {
...
@@ -390,7 +390,7 @@ class FileManager extends Plugin {
copyName
=
path
+
'.'
+
this
.
currentRequest
.
from
copyName
=
path
+
'.'
+
this
.
currentRequest
.
from
}
}
this
.
_setFileInternal
(
copyName
,
content
)
this
.
_setFileInternal
(
copyName
,
content
)
this
.
switch
File
(
copyName
)
this
.
open
File
(
copyName
)
})
})
}
}
}
}
...
@@ -413,7 +413,7 @@ class FileManager extends Plugin {
...
@@ -413,7 +413,7 @@ class FileManager extends Plugin {
// TODO: Only keep `this.emit` (issue#2210)
// TODO: Only keep `this.emit` (issue#2210)
this
.
emit
(
'fileRemoved'
,
path
)
this
.
emit
(
'fileRemoved'
,
path
)
this
.
events
.
emit
(
'fileRemoved'
,
path
)
this
.
events
.
emit
(
'fileRemoved'
,
path
)
this
.
switch
File
()
this
.
open
File
()
}
}
unselectCurrentFile
()
{
unselectCurrentFile
()
{
...
@@ -424,8 +424,8 @@ class FileManager extends Plugin {
...
@@ -424,8 +424,8 @@ class FileManager extends Plugin {
this
.
events
.
emit
(
'noFileSelected'
)
this
.
events
.
emit
(
'noFileSelected'
)
}
}
switch
File
(
file
)
{
open
File
(
file
)
{
const
_
switch
File
=
(
file
)
=>
{
const
_
open
File
=
(
file
)
=>
{
this
.
saveCurrentFile
()
this
.
saveCurrentFile
()
this
.
_deps
.
config
.
set
(
'currentFile'
,
file
)
this
.
_deps
.
config
.
set
(
'currentFile'
,
file
)
this
.
openedFiles
[
file
]
=
file
this
.
openedFiles
[
file
]
=
file
...
@@ -444,14 +444,14 @@ class FileManager extends Plugin {
...
@@ -444,14 +444,14 @@ class FileManager extends Plugin {
}
}
})
})
}
}
if
(
file
)
return
_
switch
File
(
file
)
if
(
file
)
return
_
open
File
(
file
)
else
{
else
{
var
browserProvider
=
this
.
_deps
.
filesProviders
[
'browser'
]
var
browserProvider
=
this
.
_deps
.
filesProviders
[
'browser'
]
browserProvider
.
resolveDirectory
(
'browser'
,
(
error
,
filesProvider
)
=>
{
browserProvider
.
resolveDirectory
(
'browser'
,
(
error
,
filesProvider
)
=>
{
if
(
error
)
console
.
error
(
error
)
if
(
error
)
console
.
error
(
error
)
var
fileList
=
Object
.
keys
(
filesProvider
)
var
fileList
=
Object
.
keys
(
filesProvider
)
if
(
fileList
.
length
)
{
if
(
fileList
.
length
)
{
_
switch
File
(
browserProvider
.
type
+
'/'
+
fileList
[
0
])
_
open
File
(
browserProvider
.
type
+
'/'
+
fileList
[
0
])
}
else
{
}
else
{
// TODO: Only keep `this.emit` (issue#2210)
// TODO: Only keep `this.emit` (issue#2210)
this
.
emit
(
'noFileSelected'
)
this
.
emit
(
'noFileSelected'
)
...
...
test-browser/commands/
switch
File.js
→
test-browser/commands/
open
File.js
View file @
2cf7ed50
const
EventEmitter
=
require
(
'events'
)
const
EventEmitter
=
require
(
'events'
)
class
Switch
File
extends
EventEmitter
{
class
Open
File
extends
EventEmitter
{
command
(
name
)
{
command
(
name
)
{
this
.
api
.
perform
((
done
)
=>
{
this
.
api
.
perform
((
done
)
=>
{
switch
File
(
this
.
api
,
name
,
()
=>
{
open
File
(
this
.
api
,
name
,
()
=>
{
done
()
done
()
this
.
emit
(
'complete'
)
this
.
emit
(
'complete'
)
})
})
...
@@ -13,7 +13,7 @@ class SwitchFile extends EventEmitter {
...
@@ -13,7 +13,7 @@ class SwitchFile extends EventEmitter {
}
}
// click on fileExplorer can toggle it. We go through settings to be sure FE is open
// click on fileExplorer can toggle it. We go through settings to be sure FE is open
function
switch
File
(
browser
,
name
,
done
)
{
function
open
File
(
browser
,
name
,
done
)
{
browser
.
clickLaunchIcon
(
'settings'
).
clickLaunchIcon
(
'fileExplorers'
)
browser
.
clickLaunchIcon
(
'settings'
).
clickLaunchIcon
(
'fileExplorers'
)
.
waitForElementVisible
(
'li[key="'
+
name
+
'"]'
)
.
waitForElementVisible
(
'li[key="'
+
name
+
'"]'
)
.
click
(
'li[key="'
+
name
+
'"]'
)
.
click
(
'li[key="'
+
name
+
'"]'
)
...
@@ -23,4 +23,4 @@ function switchFile (browser, name, done) {
...
@@ -23,4 +23,4 @@ function switchFile (browser, name, done) {
})
})
}
}
module
.
exports
=
Switch
File
module
.
exports
=
Open
File
test-browser/tests/defaultLayout.test.js
View file @
2cf7ed50
...
@@ -66,7 +66,7 @@ module.exports = {
...
@@ -66,7 +66,7 @@ module.exports = {
'Switch Tabs using tabs icon'
:
function
(
browser
)
{
'Switch Tabs using tabs icon'
:
function
(
browser
)
{
browser
browser
.
waitForElementVisible
(
'div[data-id="filePanelFileExplorerTree"]'
)
.
waitForElementVisible
(
'div[data-id="filePanelFileExplorerTree"]'
)
.
switch
File
(
'browser/3_Ballot.sol'
)
.
open
File
(
'browser/3_Ballot.sol'
)
.
assert
.
containsText
(
'div[title="browser/3_Ballot.sol"]'
,
'3_Ballot.sol'
)
.
assert
.
containsText
(
'div[title="browser/3_Ballot.sol"]'
,
'3_Ballot.sol'
)
.
click
(
'span[class^=dropdownCaret]'
)
.
click
(
'span[class^=dropdownCaret]'
)
.
click
(
'#homeItem'
)
.
click
(
'#homeItem'
)
...
...
test-browser/tests/editor.test.js
View file @
2cf7ed50
...
@@ -10,7 +10,7 @@ module.exports = {
...
@@ -10,7 +10,7 @@ module.exports = {
'Should zoom in editor'
:
function
(
browser
)
{
'Should zoom in editor'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'div[data-id="mainPanelPluginsContainer"]'
)
browser
.
waitForElementVisible
(
'div[data-id="mainPanelPluginsContainer"]'
)
.
switch
File
(
'browser/1_Storage.sol'
)
.
open
File
(
'browser/1_Storage.sol'
)
.
waitForElementVisible
(
'*[data-id="editorInput"]'
)
.
waitForElementVisible
(
'*[data-id="editorInput"]'
)
.
checkElementStyle
(
'*[data-id="editorInput"]'
,
'font-size'
,
'12px'
)
.
checkElementStyle
(
'*[data-id="editorInput"]'
,
'font-size'
,
'12px'
)
.
click
(
'*[data-id="tabProxyZoomIn"]'
)
.
click
(
'*[data-id="tabProxyZoomIn"]'
)
...
@@ -74,7 +74,7 @@ module.exports = {
...
@@ -74,7 +74,7 @@ module.exports = {
'Should highlight source code'
:
function
(
browser
)
{
'Should highlight source code'
:
function
(
browser
)
{
browser
.
addFile
(
'sourcehighlight.js'
,
sourcehighlightScript
)
browser
.
addFile
(
'sourcehighlight.js'
,
sourcehighlightScript
)
.
switch
File
(
'browser/sourcehighlight.js'
)
.
open
File
(
'browser/sourcehighlight.js'
)
.
executeScript
(
'remix.exeCurrent()'
)
.
executeScript
(
'remix.exeCurrent()'
)
.
editorScroll
(
'down'
,
60
)
.
editorScroll
(
'down'
,
60
)
.
waitForElementPresent
(
'.highlightLine32'
)
.
waitForElementPresent
(
'.highlightLine32'
)
...
@@ -87,9 +87,9 @@ module.exports = {
...
@@ -87,9 +87,9 @@ module.exports = {
'Should remove 1 highlight from source code'
:
function
(
browser
)
{
'Should remove 1 highlight from source code'
:
function
(
browser
)
{
browser
.
addFile
(
'removeSourcehighlightScript.js'
,
removeSourcehighlightScript
)
browser
.
addFile
(
'removeSourcehighlightScript.js'
,
removeSourcehighlightScript
)
.
switch
File
(
'browser/removeSourcehighlightScript.js'
)
.
open
File
(
'browser/removeSourcehighlightScript.js'
)
.
executeScript
(
'remix.exeCurrent()'
)
.
executeScript
(
'remix.exeCurrent()'
)
.
switch
File
(
'browser/3_Ballot.sol'
)
.
open
File
(
'browser/3_Ballot.sol'
)
.
editorScroll
(
'down'
,
60
)
.
editorScroll
(
'down'
,
60
)
.
waitForElementNotPresent
(
'.highlightLine32'
)
.
waitForElementNotPresent
(
'.highlightLine32'
)
.
checkElementStyle
(
'.highlightLine40'
,
'background-color'
,
'rgb(8, 108, 181)'
)
.
checkElementStyle
(
'.highlightLine40'
,
'background-color'
,
'rgb(8, 108, 181)'
)
...
@@ -98,9 +98,9 @@ module.exports = {
...
@@ -98,9 +98,9 @@ module.exports = {
'Should remove all highlights from source code'
:
function
(
browser
)
{
'Should remove all highlights from source code'
:
function
(
browser
)
{
browser
.
addFile
(
'removeAllSourcehighlightScript.js'
,
removeAllSourcehighlightScript
)
browser
.
addFile
(
'removeAllSourcehighlightScript.js'
,
removeAllSourcehighlightScript
)
.
switch
File
(
'browser/removeAllSourcehighlightScript.js'
)
.
open
File
(
'browser/removeAllSourcehighlightScript.js'
)
.
executeScript
(
'remix.exeCurrent()'
)
.
executeScript
(
'remix.exeCurrent()'
)
.
switch
File
(
'browser/3_Ballot.sol'
)
.
open
File
(
'browser/3_Ballot.sol'
)
.
editorScroll
(
'down'
,
60
)
.
editorScroll
(
'down'
,
60
)
.
waitForElementNotPresent
(
'.highlightLine32'
)
.
waitForElementNotPresent
(
'.highlightLine32'
)
.
waitForElementNotPresent
(
'.highlightLine40'
)
.
waitForElementNotPresent
(
'.highlightLine40'
)
...
...
test-browser/tests/generalSettings.test.js
View file @
2cf7ed50
...
@@ -31,14 +31,14 @@ module.exports = {
...
@@ -31,14 +31,14 @@ module.exports = {
.
waitForElementVisible
(
'*[data-id="settingsTabGenerateContractMetadata"]'
,
5000
)
.
waitForElementVisible
(
'*[data-id="settingsTabGenerateContractMetadata"]'
,
5000
)
.
click
(
'*[data-id="settingsTabGenerateContractMetadata"]'
)
.
click
(
'*[data-id="settingsTabGenerateContractMetadata"]'
)
.
click
(
'*[data-id="verticalIconsFileExplorerIcons"]'
)
.
click
(
'*[data-id="verticalIconsFileExplorerIcons"]'
)
.
switch
File
(
'browser/3_Ballot.sol'
)
.
open
File
(
'browser/3_Ballot.sol'
)
.
click
(
'*[data-id="verticalIconsKindsolidity"]'
)
.
click
(
'*[data-id="verticalIconsKindsolidity"]'
)
.
pause
(
2000
)
.
pause
(
2000
)
.
click
(
'*[data-id="compilerContainerCompileBtn"]'
)
.
click
(
'*[data-id="compilerContainerCompileBtn"]'
)
.
pause
(
3000
)
.
pause
(
3000
)
.
click
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
click
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
switch
File
(
'browser/artifacts'
)
.
open
File
(
'browser/artifacts'
)
.
switch
File
(
'browser/artifacts/Ballot.json'
)
.
open
File
(
'browser/artifacts/Ballot.json'
)
},
},
'Should add new github access token'
:
function
(
browser
)
{
'Should add new github access token'
:
function
(
browser
)
{
...
...
test-browser/tests/gist.test.js
View file @
2cf7ed50
...
@@ -44,9 +44,9 @@ module.exports = {
...
@@ -44,9 +44,9 @@ module.exports = {
browser
browser
.
modalFooterCancelClick
()
.
modalFooterCancelClick
()
.
executeScript
(
`remix.loadgist('
${
gistid
}
')`
)
.
executeScript
(
`remix.loadgist('
${
gistid
}
')`
)
.
perform
((
done
)
=>
{
if
(
runtimeBrowser
===
'chrome'
)
{
browser
.
switch
File
(
'browser/gists'
)
}
done
()
})
.
perform
((
done
)
=>
{
if
(
runtimeBrowser
===
'chrome'
)
{
browser
.
open
File
(
'browser/gists'
)
}
done
()
})
.
switch
File
(
`browser/gists/
${
gistid
}
`
)
.
open
File
(
`browser/gists/
${
gistid
}
`
)
.
switch
File
(
`browser/gists/
${
gistid
}
/1_Storage.sol`
)
.
open
File
(
`browser/gists/
${
gistid
}
/1_Storage.sol`
)
.
perform
(
done
)
.
perform
(
done
)
}
}
})
})
...
@@ -86,8 +86,8 @@ module.exports = {
...
@@ -86,8 +86,8 @@ module.exports = {
.
waitForElementVisible
(
'*[data-id="modalDialogCustomPromptText"]'
)
.
waitForElementVisible
(
'*[data-id="modalDialogCustomPromptText"]'
)
.
setValue
(
'*[data-id="modalDialogCustomPromptText"]'
,
testData
.
validGistId
)
.
setValue
(
'*[data-id="modalDialogCustomPromptText"]'
,
testData
.
validGistId
)
.
modalFooterOKClick
()
.
modalFooterOKClick
()
.
switch
File
(
`browser/gists/
${
testData
.
validGistId
}
`
)
.
open
File
(
`browser/gists/
${
testData
.
validGistId
}
`
)
.
switch
File
(
`browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry`
)
.
open
File
(
`browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry`
)
.
waitForElementVisible
(
`div[title='browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry']`
)
.
waitForElementVisible
(
`div[title='browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry']`
)
.
assert
.
containsText
(
`div[title='browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry'] > span`
,
'ApplicationRegistry'
)
.
assert
.
containsText
(
`div[title='browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry'] > span`
,
'ApplicationRegistry'
)
.
end
()
.
end
()
...
...
test-browser/tests/libraryDeployment.test.js
View file @
2cf7ed50
...
@@ -59,7 +59,7 @@ module.exports = {
...
@@ -59,7 +59,7 @@ module.exports = {
function
checkDeployShouldFail
(
browser
,
callback
)
{
function
checkDeployShouldFail
(
browser
,
callback
)
{
let
config
let
config
browser
.
switchFile
(
'browser/artifacts'
).
switch
File
(
'browser/artifacts/test.json'
)
browser
.
openFile
(
'browser/artifacts'
).
open
File
(
'browser/artifacts/test.json'
)
.
getEditorValue
((
content
)
=>
{
.
getEditorValue
((
content
)
=>
{
config
=
JSON
.
parse
(
content
)
config
=
JSON
.
parse
(
content
)
config
.
deploy
[
'VM:-'
].
autoDeployLib
=
false
config
.
deploy
[
'VM:-'
].
autoDeployLib
=
false
...
@@ -67,7 +67,7 @@ function checkDeployShouldFail (browser, callback) {
...
@@ -67,7 +67,7 @@ function checkDeployShouldFail (browser, callback) {
.
perform
(()
=>
{
.
perform
(()
=>
{
browser
.
setEditorValue
(
JSON
.
stringify
(
config
))
browser
.
setEditorValue
(
JSON
.
stringify
(
config
))
})
})
.
switch
File
(
'browser/Untitled5.sol'
)
.
open
File
(
'browser/Untitled5.sol'
)
.
selectContract
(
'test'
)
// deploy lib
.
selectContract
(
'test'
)
// deploy lib
.
createContract
(
''
)
.
createContract
(
''
)
.
assert
.
containsText
(
'div[class^="terminal"]'
,
'<address> is not a valid address'
)
.
assert
.
containsText
(
'div[class^="terminal"]'
,
'<address> is not a valid address'
)
...
@@ -77,7 +77,7 @@ function checkDeployShouldFail (browser, callback) {
...
@@ -77,7 +77,7 @@ function checkDeployShouldFail (browser, callback) {
function
checkDeployShouldSucceed
(
browser
,
address
,
callback
)
{
function
checkDeployShouldSucceed
(
browser
,
address
,
callback
)
{
let
addressRef
let
addressRef
let
config
let
config
browser
.
switchFile
(
'browser/artifacts'
).
switch
File
(
'browser/artifacts/test.json'
)
browser
.
openFile
(
'browser/artifacts'
).
open
File
(
'browser/artifacts/test.json'
)
.
getEditorValue
((
content
)
=>
{
.
getEditorValue
((
content
)
=>
{
config
=
JSON
.
parse
(
content
)
config
=
JSON
.
parse
(
content
)
config
.
deploy
[
'VM:-'
].
autoDeployLib
=
false
config
.
deploy
[
'VM:-'
].
autoDeployLib
=
false
...
@@ -86,7 +86,7 @@ function checkDeployShouldSucceed (browser, address, callback) {
...
@@ -86,7 +86,7 @@ function checkDeployShouldSucceed (browser, address, callback) {
.
perform
(()
=>
{
.
perform
(()
=>
{
browser
.
setEditorValue
(
JSON
.
stringify
(
config
))
browser
.
setEditorValue
(
JSON
.
stringify
(
config
))
})
})
.
switch
File
(
'browser/Untitled5.sol'
)
.
open
File
(
'browser/Untitled5.sol'
)
.
selectContract
(
'test'
)
// deploy lib
.
selectContract
(
'test'
)
// deploy lib
.
createContract
(
''
)
.
createContract
(
''
)
.
getAddressAtPosition
(
1
,
(
address
)
=>
{
.
getAddressAtPosition
(
1
,
(
address
)
=>
{
...
...
test-browser/tests/pluginManager.test.js
View file @
2cf7ed50
...
@@ -66,7 +66,7 @@ module.exports = {
...
@@ -66,7 +66,7 @@ module.exports = {
.assert.containsText('*[data-id="pluginManagerSettingsPermissionForm"]', 'No Permission requested yet')
.assert.containsText('*[data-id="pluginManagerSettingsPermissionForm"]', 'No Permission requested yet')
.modalFooterOKClick()
.modalFooterOKClick()
.click('*[data-id="verticalIconsFileExplorerIcons"]')
.click('*[data-id="verticalIconsFileExplorerIcons"]')
.
switch
File('browser/3_Ballot.sol')
.
open
File('browser/3_Ballot.sol')
.click('*[plugin="ZoKrates"]')
.click('*[plugin="ZoKrates"]')
.pause(5000)
.pause(5000)
.frame(0)
.frame(0)
...
...
test-browser/tests/publishContract.test.js
View file @
2cf7ed50
...
@@ -13,7 +13,7 @@ module.exports = {
...
@@ -13,7 +13,7 @@ module.exports = {
browser
browser
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
switch
File
(
'browser/3_Ballot.sol'
)
.
open
File
(
'browser/3_Ballot.sol'
)
.
verifyContracts
([
'Ballot'
])
.
verifyContracts
([
'Ballot'
])
.
click
(
'#publishOnIpfs'
)
.
click
(
'#publishOnIpfs'
)
.
getModalBody
((
value
,
done
)
=>
{
.
getModalBody
((
value
,
done
)
=>
{
...
@@ -37,7 +37,7 @@ module.exports = {
...
@@ -37,7 +37,7 @@ module.exports = {
browser
browser
.
waitForElementVisible
(
'#icon-panel'
)
.
waitForElementVisible
(
'#icon-panel'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
switch
File
(
'browser/1_Storage.sol'
)
.
open
File
(
'browser/1_Storage.sol'
)
.
clickLaunchIcon
(
'udapp'
)
.
clickLaunchIcon
(
'udapp'
)
.
waitForElementVisible
(
'*[data-id="contractDropdownIpfsCheckbox"]'
)
.
waitForElementVisible
(
'*[data-id="contractDropdownIpfsCheckbox"]'
)
.
click
(
'*[data-id="contractDropdownIpfsCheckbox"]'
)
.
click
(
'*[data-id="contractDropdownIpfsCheckbox"]'
)
...
@@ -49,7 +49,7 @@ module.exports = {
...
@@ -49,7 +49,7 @@ module.exports = {
'Should remember choice after page refresh'
:
function
(
browser
)
{
'Should remember choice after page refresh'
:
function
(
browser
)
{
browser
browser
.
refresh
()
.
refresh
()
.
switch
File
(
'browser/1_Storage.sol'
)
.
open
File
(
'browser/1_Storage.sol'
)
.
clickLaunchIcon
(
'udapp'
)
.
clickLaunchIcon
(
'udapp'
)
.
waitForElementVisible
(
'*[data-id="contractDropdownIpfsCheckbox"]'
)
.
waitForElementVisible
(
'*[data-id="contractDropdownIpfsCheckbox"]'
)
.
verify
.
elementPresent
(
'*[data-id="contractDropdownIpfsCheckbox"]:checked'
)
.
verify
.
elementPresent
(
'*[data-id="contractDropdownIpfsCheckbox"]:checked'
)
...
...
test-browser/tests/runAndDeploy.js
View file @
2cf7ed50
...
@@ -90,7 +90,7 @@ module.exports = {
...
@@ -90,7 +90,7 @@ module.exports = {
'Should deploy contract on Goerli Test Network using MetaMask'
:
function
(
browser
)
{
'Should deploy contract on Goerli Test Network using MetaMask'
:
function
(
browser
)
{
browser
.
waitForElementPresent
(
'*[data-id="runTabSelectAccount"] option'
)
browser
.
waitForElementPresent
(
'*[data-id="runTabSelectAccount"] option'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
switch
File
(
'browser/Greet.sol'
)
.
open
File
(
'browser/Greet.sol'
)
.
clickLaunchIcon
(
'udapp'
)
.
clickLaunchIcon
(
'udapp'
)
.
waitForElementPresent
(
'*[data-id="Deploy - transact (not payable)"]'
)
.
waitForElementPresent
(
'*[data-id="Deploy - transact (not payable)"]'
)
.
click
(
'*[data-id="Deploy - transact (not payable)"]'
)
.
click
(
'*[data-id="Deploy - transact (not payable)"]'
)
...
@@ -141,7 +141,7 @@ module.exports = {
...
@@ -141,7 +141,7 @@ module.exports = {
'Should deploy contract on Ethereum Main Network using MetaMask'
:
function
(
browser
)
{
'Should deploy contract on Ethereum Main Network using MetaMask'
:
function
(
browser
)
{
browser
.
waitForElementPresent
(
'*[data-id="runTabSelectAccount"] option'
)
browser
.
waitForElementPresent
(
'*[data-id="runTabSelectAccount"] option'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
switch
File
(
'browser/Greet.sol'
)
.
open
File
(
'browser/Greet.sol'
)
.
clickLaunchIcon
(
'udapp'
)
.
clickLaunchIcon
(
'udapp'
)
.
waitForElementPresent
(
'*[data-id="Deploy - transact (not payable)"]'
)
.
waitForElementPresent
(
'*[data-id="Deploy - transact (not payable)"]'
)
.
click
(
'*[data-id="Deploy - transact (not payable)"]'
)
.
click
(
'*[data-id="Deploy - transact (not payable)"]'
)
...
...
test-browser/tests/signingMessage.test.js
View file @
2cf7ed50
...
@@ -23,7 +23,7 @@ module.exports = {
...
@@ -23,7 +23,7 @@ module.exports = {
browser
.
assert
.
ok
(
typeof
signature
.
value
===
'string'
,
'type of signature.value must be String'
)
browser
.
assert
.
ok
(
typeof
signature
.
value
===
'string'
,
'type of signature.value must be String'
)
})
})
.
addFile
(
'signMassage.sol'
,
sources
[
0
][
'browser/signMassage.sol'
])
.
addFile
(
'signMassage.sol'
,
sources
[
0
][
'browser/signMassage.sol'
])
.
switch
File
(
'browser/signMassage.sol'
)
.
open
File
(
'browser/signMassage.sol'
)
.
pause
(
5000
)
.
pause
(
5000
)
.
selectContract
(
'ECVerify'
)
.
selectContract
(
'ECVerify'
)
.
createContract
(
''
)
.
createContract
(
''
)
...
...
test-browser/tests/solidityImport.test.js
View file @
2cf7ed50
...
@@ -15,7 +15,7 @@ module.exports = {
...
@@ -15,7 +15,7 @@ module.exports = {
'Test Success Import'
:
function
(
browser
)
{
'Test Success Import'
:
function
(
browser
)
{
browser
.
addFile
(
'Untitled1.sol'
,
sources
[
1
][
'browser/Untitled1.sol'
])
browser
.
addFile
(
'Untitled1.sol'
,
sources
[
1
][
'browser/Untitled1.sol'
])
.
addFile
(
'Untitled2.sol'
,
sources
[
1
][
'browser/Untitled2.sol'
])
.
addFile
(
'Untitled2.sol'
,
sources
[
1
][
'browser/Untitled2.sol'
])
.
switch
File
(
'browser/Untitled1.sol'
)
.
open
File
(
'browser/Untitled1.sol'
)
.
verifyContracts
([
'test6'
,
'test4'
,
'test5'
])
.
verifyContracts
([
'test6'
,
'test4'
,
'test5'
])
},
},
...
...
test-browser/tests/solidityUnittests.test.js
View file @
2cf7ed50
...
@@ -27,7 +27,7 @@ module.exports = {
...
@@ -27,7 +27,7 @@ module.exports = {
'Should generate test file'
:
function
(
browser
)
{
'Should generate test file'
:
function
(
browser
)
{
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
switch
File
(
'browser/simple_storage.sol'
)
.
open
File
(
'browser/simple_storage.sol'
)
.
click
(
'*[data-id="verticalIconsKindsolidityUnitTesting"]'
)
.
click
(
'*[data-id="verticalIconsKindsolidityUnitTesting"]'
)
.
waitForElementPresent
(
'*[data-id="testTabGenerateTestFile"]'
)
.
waitForElementPresent
(
'*[data-id="testTabGenerateTestFile"]'
)
.
click
(
'*[data-id="testTabGenerateTestFile"]'
)
.
click
(
'*[data-id="testTabGenerateTestFile"]'
)
...
@@ -100,7 +100,7 @@ module.exports = {
...
@@ -100,7 +100,7 @@ module.exports = {
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
addFile
(
'compilationError_test.sol'
,
sources
[
0
][
'browser/compilationError_test.sol'
])
.
addFile
(
'compilationError_test.sol'
,
sources
[
0
][
'browser/compilationError_test.sol'
])
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
switch
File
(
'browser/compilationError_test.sol'
)
.
open
File
(
'browser/compilationError_test.sol'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
click
(
'*[data-id="testTabCheckAllTests"]'
)
.
click
(
'*[data-id="testTabCheckAllTests"]'
)
.
clickElementAtPosition
(
'.singleTestLabel'
,
3
)
.
clickElementAtPosition
(
'.singleTestLabel'
,
3
)
...
@@ -115,7 +115,7 @@ module.exports = {
...
@@ -115,7 +115,7 @@ module.exports = {
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
addFile
(
'deployError_test.sol'
,
sources
[
0
][
'browser/deployError_test.sol'
])
.
addFile
(
'deployError_test.sol'
,
sources
[
0
][
'browser/deployError_test.sol'
])
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
switch
File
(
'browser/deployError_test.sol'
)
.
open
File
(
'browser/deployError_test.sol'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
click
(
'*[data-id="testTabCheckAllTests"]'
)
.
click
(
'*[data-id="testTabCheckAllTests"]'
)
.
clickElementAtPosition
(
'.singleTestLabel'
,
4
)
.
clickElementAtPosition
(
'.singleTestLabel'
,
4
)
...
@@ -129,7 +129,7 @@ module.exports = {
...
@@ -129,7 +129,7 @@ module.exports = {
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
addFile
(
'methodFailure_test.sol'
,
sources
[
0
][
'browser/methodFailure_test.sol'
])
.
addFile
(
'methodFailure_test.sol'
,
sources
[
0
][
'browser/methodFailure_test.sol'
])
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
switch
File
(
'browser/methodFailure_test.sol'
)
.
open
File
(
'browser/methodFailure_test.sol'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
click
(
'*[data-id="testTabCheckAllTests"]'
)
.
click
(
'*[data-id="testTabCheckAllTests"]'
)
.
clickElementAtPosition
(
'.singleTestLabel'
,
5
)
.
clickElementAtPosition
(
'.singleTestLabel'
,
5
)
...
@@ -150,7 +150,7 @@ function runTests (browser) {
...
@@ -150,7 +150,7 @@ function runTests (browser) {
browser
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
switch
File
(
'browser/3_Ballot.sol'
)
.
open
File
(
'browser/3_Ballot.sol'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
pause
(
500
)
.
pause
(
500
)
.
scrollAndClick
(
'#runTestsTabRunAction'
)
.
scrollAndClick
(
'#runTestsTabRunAction'
)
...
...
test-browser/tests/terminal.test.js
View file @
2cf7ed50
...
@@ -57,7 +57,7 @@ module.exports = {
...
@@ -57,7 +57,7 @@ module.exports = {
'Async/Await Script'
:
function
(
browser
)
{
'Async/Await Script'
:
function
(
browser
)
{
browser
browser
.
addFile
(
'asyncAwait.js'
,
{
content
:
asyncAwait
})
.
addFile
(
'asyncAwait.js'
,
{
content
:
asyncAwait
})
.
switch
File
(
'browser/asyncAwait.js'
)
.
open
File
(
'browser/asyncAwait.js'
)
.
executeScript
(
`remix.execute('browser/asyncAwait.js')`
)
.
executeScript
(
`remix.execute('browser/asyncAwait.js')`
)
.
journalLastChild
(
'Waiting Promise'
)
.
journalLastChild
(
'Waiting Promise'
)
.
pause
(
5500
)
.
pause
(
5500
)
...
@@ -67,7 +67,7 @@ module.exports = {
...
@@ -67,7 +67,7 @@ module.exports = {
'Call Remix File Manager from a script'
:
function
(
browser
)
{
'Call Remix File Manager from a script'
:
function
(
browser
)
{
browser
browser
.
addFile
(
'asyncAwaitWithFileManagerAccess.js'
,
{
content
:
asyncAwaitWithFileManagerAccess
})
.
addFile
(
'asyncAwaitWithFileManagerAccess.js'
,
{
content
:
asyncAwaitWithFileManagerAccess
})
.
switch
File
(
'browser/asyncAwaitWithFileManagerAccess.js'
)
.
open
File
(
'browser/asyncAwaitWithFileManagerAccess.js'
)
.
pause
(
5000
)
.
pause
(
5000
)
.
executeScript
(
`remix.execute('browser/asyncAwaitWithFileManagerAccess.js')`
)
.
executeScript
(
`remix.execute('browser/asyncAwaitWithFileManagerAccess.js')`
)
.
pause
(
6000
)
.
pause
(
6000
)
...
...
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