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
e5432044
Commit
e5432044
authored
Jan 15, 2021
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify addFile command
parent
2600fd00
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
18 additions
and
29 deletions
+18
-29
addFile.ts
apps/remix-ide-e2e/src/commands/addFile.ts
+11
-11
debugger.test.ts
apps/remix-ide-e2e/src/tests/debugger.test.ts
+0
-2
editor.test.ts
apps/remix-ide-e2e/src/tests/editor.test.ts
+0
-2
fileManager_api.test.ts
apps/remix-ide-e2e/src/tests/fileManager_api.test.ts
+0
-1
gist.test.ts
apps/remix-ide-e2e/src/tests/gist.test.ts
+1
-1
solidityImport.test.ts
apps/remix-ide-e2e/src/tests/solidityImport.test.ts
+0
-2
solidityUnittests.test.ts
apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts
+4
-6
terminal.test.ts
apps/remix-ide-e2e/src/tests/terminal.test.ts
+0
-2
usingWebWorker.test.ts
apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts
+1
-1
index.d.ts
apps/remix-ide-e2e/src/types/index.d.ts
+1
-1
No files found.
apps/remix-ide-e2e/src/commands/addFile.ts
View file @
e5432044
...
@@ -2,9 +2,9 @@ import { NightwatchBrowser, NightwatchContractContent } from 'nightwatch'
...
@@ -2,9 +2,9 @@ import { NightwatchBrowser, NightwatchContractContent } from 'nightwatch'
import
EventEmitter
from
"events"
import
EventEmitter
from
"events"
class
AddFile
extends
EventEmitter
{
class
AddFile
extends
EventEmitter
{
command
(
this
:
NightwatchBrowser
,
name
:
string
,
content
:
NightwatchContractContent
,
open
=
true
):
NightwatchBrowser
{
command
(
this
:
NightwatchBrowser
,
name
:
string
,
content
:
NightwatchContractContent
):
NightwatchBrowser
{
this
.
api
.
perform
((
done
)
=>
{
this
.
api
.
perform
((
done
)
=>
{
addFile
(
this
.
api
,
name
,
content
,
open
,
()
=>
{
addFile
(
this
.
api
,
name
,
content
,
()
=>
{
done
()
done
()
this
.
emit
(
'complete'
)
this
.
emit
(
'complete'
)
})
})
...
@@ -13,18 +13,18 @@ class AddFile extends EventEmitter {
...
@@ -13,18 +13,18 @@ class AddFile extends EventEmitter {
}
}
}
}
function
addFile
(
browser
:
NightwatchBrowser
,
name
:
string
,
content
:
NightwatchContractContent
,
open
:
boolean
,
done
:
VoidFunction
)
{
function
addFile
(
browser
:
NightwatchBrowser
,
name
:
string
,
content
:
NightwatchContractContent
,
done
:
VoidFunction
)
{
browser
.
clickLaunchIcon
(
'udapp'
).
clickLaunchIcon
(
'fileExplorers'
).
click
(
'.newFile'
)
browser
.
clickLaunchIcon
(
'udapp'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
click
(
'li[data-id="treeViewLitreeViewItembrowser/README.txt"]'
)
// focus on root directory
.
click
(
'.newFile'
)
.
pause
(
2000
)
.
pause
(
2000
)
.
keys
(
name
)
.
keys
(
name
)
.
keys
(
browser
.
Keys
.
ENTER
)
.
keys
(
browser
.
Keys
.
ENTER
)
.
perform
((
done
)
=>
{
.
pause
(
2000
)
if
(
open
)
{
.
waitForElementVisible
(
`li[data-id="treeViewLitreeViewItembrowser/
${
name
}
"]`
)
browser
.
openFile
(
'browser/'
+
name
)
.
click
(
`li[data-id="treeViewLitreeViewItembrowser/
${
name
}
"]`
)
.
setEditorValue
(
content
.
content
)
.
setEditorValue
(
content
.
content
)
}
done
()
})
.
pause
(
1000
)
.
pause
(
1000
)
.
perform
(
function
()
{
.
perform
(
function
()
{
done
()
done
()
...
...
apps/remix-ide-e2e/src/tests/debugger.test.ts
View file @
e5432044
...
@@ -186,8 +186,6 @@ module.exports = {
...
@@ -186,8 +186,6 @@ module.exports = {
'Should call the debugger api: getTrace'
:
function
(
browser
:
NightwatchBrowser
)
{
'Should call the debugger api: getTrace'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
browser
.
clickLaunchIcon
(
'fileExplorers'
)
.
click
(
'li[data-id="treeViewLitreeViewItembrowser/externalImport.sol"'
)
.
addFile
(
'test_jsGetTrace.js'
,
{
content
:
jsGetTrace
})
.
addFile
(
'test_jsGetTrace.js'
,
{
content
:
jsGetTrace
})
.
executeScript
(
'remix.exeCurrent()'
)
.
executeScript
(
'remix.exeCurrent()'
)
.
pause
(
3000
)
.
pause
(
3000
)
...
...
apps/remix-ide-e2e/src/tests/editor.test.ts
View file @
e5432044
...
@@ -81,8 +81,6 @@ module.exports = {
...
@@ -81,8 +81,6 @@ module.exports = {
'Should highlight source code'
:
function
(
browser
:
NightwatchBrowser
)
{
'Should highlight source code'
:
function
(
browser
:
NightwatchBrowser
)
{
// include all files here because switching between plugins in side-panel removes highlight
// include all files here because switching between plugins in side-panel removes highlight
browser
browser
.
clickLaunchIcon
(
'fileExplorers'
)
.
click
(
'li[data-id="treeViewLitreeViewItembrowser/README.txt"'
)
.
addFile
(
'sourcehighlight.js'
,
sourcehighlightScript
)
.
addFile
(
'sourcehighlight.js'
,
sourcehighlightScript
)
.
addFile
(
'removeSourcehighlightScript.js'
,
removeSourcehighlightScript
)
.
addFile
(
'removeSourcehighlightScript.js'
,
removeSourcehighlightScript
)
.
addFile
(
'removeAllSourcehighlightScript.js'
,
removeAllSourcehighlightScript
)
.
addFile
(
'removeAllSourcehighlightScript.js'
,
removeAllSourcehighlightScript
)
...
...
apps/remix-ide-e2e/src/tests/fileManager_api.test.ts
View file @
e5432044
...
@@ -76,7 +76,6 @@ module.exports = {
...
@@ -76,7 +76,6 @@ module.exports = {
'Should execute `readdir` api from file manager external api'
:
function
(
browser
:
NightwatchBrowser
)
{
'Should execute `readdir` api from file manager external api'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
browser
.
click
(
'li[data-id="treeViewLitreeViewItembrowser/README.txt"'
)
.
addFile
(
'readdirFile.js'
,
{
content
:
executeReaddir
})
.
addFile
(
'readdirFile.js'
,
{
content
:
executeReaddir
})
.
executeScript
(
`remix.exeCurrent()`
)
.
executeScript
(
`remix.exeCurrent()`
)
.
pause
(
2000
)
.
pause
(
2000
)
...
...
apps/remix-ide-e2e/src/tests/gist.test.ts
View file @
e5432044
...
@@ -32,7 +32,7 @@ module.exports = {
...
@@ -32,7 +32,7 @@ module.exports = {
.
keys
(
'Browser_Tests'
)
.
keys
(
'Browser_Tests'
)
.
keys
(
browser
.
Keys
.
ENTER
)
.
keys
(
browser
.
Keys
.
ENTER
)
.
waitForElementVisible
(
'*[data-id="treeViewLitreeViewItembrowser/Browser_Tests"]'
)
.
waitForElementVisible
(
'*[data-id="treeViewLitreeViewItembrowser/Browser_Tests"]'
)
.
addFile
(
'File.sol'
,
{
content
:
''
}
,
false
)
.
addFile
(
'File.sol'
,
{
content
:
''
})
.
click
(
'*[data-id="fileExplorerNewFilepublishToGist"]'
)
.
click
(
'*[data-id="fileExplorerNewFilepublishToGist"]'
)
.
waitForElementVisible
(
'*[data-id="browserModalDialogContainer-react"]'
)
.
waitForElementVisible
(
'*[data-id="browserModalDialogContainer-react"]'
)
.
pause
(
2000
)
.
pause
(
2000
)
...
...
apps/remix-ide-e2e/src/tests/solidityImport.test.ts
View file @
e5432044
...
@@ -40,8 +40,6 @@ module.exports = {
...
@@ -40,8 +40,6 @@ module.exports = {
'Test Github Import - from other branch'
:
function
(
browser
:
NightwatchBrowser
)
{
'Test Github Import - from other branch'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
browser
.
setSolidityCompilerVersion
(
'soljson-v0.5.0+commit.1d4f565a.js'
)
// switch back to 0.5.0 : release-v2.3.0 branch is not solidity 0.6 compliant
.
setSolidityCompilerVersion
(
'soljson-v0.5.0+commit.1d4f565a.js'
)
// switch back to 0.5.0 : release-v2.3.0 branch is not solidity 0.6 compliant
.
clickLaunchIcon
(
'fileExplorers'
)
.
click
(
'li[data-id="treeViewLitreeViewItembrowser/README.txt"'
)
.
addFile
(
'Untitled5.sol'
,
sources
[
4
][
'browser/Untitled5.sol'
])
.
addFile
(
'Untitled5.sol'
,
sources
[
4
][
'browser/Untitled5.sol'
])
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
verifyContracts
([
'test8'
,
'ERC20'
,
'SafeMath'
],
{
wait
:
10000
})
.
verifyContracts
([
'test8'
,
'ERC20'
,
'SafeMath'
],
{
wait
:
10000
})
...
...
apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts
View file @
e5432044
...
@@ -42,7 +42,7 @@ module.exports = {
...
@@ -42,7 +42,7 @@ module.exports = {
'Should run simple unit test `simple_storage_test.sol` '
:
function
(
browser
:
NightwatchBrowser
)
{
'Should run simple unit test `simple_storage_test.sol` '
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
addFile
(
'
simple_storage_test.sol'
,
sources
[
0
][
'browser/tests/simple_storage_test.sol'
],
false
)
.
addFile
(
'
tests/simple_storage_test.sol'
,
sources
[
0
][
'browser/tests/simple_storage_test.sol'
]
)
.
click
(
'*[data-id="verticalIconsKindsolidityUnitTesting"]'
)
.
click
(
'*[data-id="verticalIconsKindsolidityUnitTesting"]'
)
.
waitForElementPresent
(
'*[data-id="testTabCheckAllTests"]'
)
.
waitForElementPresent
(
'*[data-id="testTabCheckAllTests"]'
)
.
click
(
'*[data-id="testTabCheckAllTests"]'
)
.
click
(
'*[data-id="testTabCheckAllTests"]'
)
...
@@ -62,7 +62,7 @@ module.exports = {
...
@@ -62,7 +62,7 @@ module.exports = {
'Should run advance unit test using natspec and experimental ABIEncoderV2 `ks2b_test.sol` '
:
function
(
browser
:
NightwatchBrowser
)
{
'Should run advance unit test using natspec and experimental ABIEncoderV2 `ks2b_test.sol` '
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
addFile
(
'
ks2b_test.sol'
,
sources
[
0
][
'browser/tests/ks2b_test.sol'
],
false
)
.
addFile
(
'
tests/ks2b_test.sol'
,
sources
[
0
][
'browser/tests/ks2b_test.sol'
]
)
.
click
(
'*[data-id="verticalIconsKindsolidityUnitTesting"]'
)
.
click
(
'*[data-id="verticalIconsKindsolidityUnitTesting"]'
)
.
waitForElementPresent
(
'*[data-id="testTabCheckAllTests"]'
)
.
waitForElementPresent
(
'*[data-id="testTabCheckAllTests"]'
)
.
click
(
'*[data-id="testTabCheckAllTests"]'
)
.
click
(
'*[data-id="testTabCheckAllTests"]'
)
...
@@ -117,7 +117,7 @@ module.exports = {
...
@@ -117,7 +117,7 @@ module.exports = {
'Should fail on deploy'
:
function
(
browser
:
NightwatchBrowser
)
{
'Should fail on deploy'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
addFile
(
'deployError_test.sol'
,
sources
[
0
][
'browser/tests/deployError_test.sol'
])
.
addFile
(
'
tests/
deployError_test.sol'
,
sources
[
0
][
'browser/tests/deployError_test.sol'
])
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
openFile
(
'browser/tests/deployError_test.sol'
)
.
openFile
(
'browser/tests/deployError_test.sol'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
...
@@ -131,7 +131,7 @@ module.exports = {
...
@@ -131,7 +131,7 @@ module.exports = {
'Should fail when parameters are to method in test contract'
:
function
(
browser
:
NightwatchBrowser
)
{
'Should fail when parameters are to method in test contract'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
browser
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
addFile
(
'methodFailure_test.sol'
,
sources
[
0
][
'browser/tests/methodFailure_test.sol'
])
.
addFile
(
'
tests/
methodFailure_test.sol'
,
sources
[
0
][
'browser/tests/methodFailure_test.sol'
])
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
openFile
(
'browser/tests/methodFailure_test.sol'
)
.
openFile
(
'browser/tests/methodFailure_test.sol'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
...
@@ -145,8 +145,6 @@ module.exports = {
...
@@ -145,8 +145,6 @@ module.exports = {
'Changing current path'
:
function
(
browser
:
NightwatchBrowser
)
{
'Changing current path'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
browser
.
clickLaunchIcon
(
'fileExplorers'
)
.
click
(
'li[data-id="treeViewLitreeViewItembrowser/README.txt"'
)
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
waitForElementPresent
(
'*[data-id="verticalIconsKindfileExplorers"]'
)
.
addFile
(
'myTests/simple_storage_test.sol'
,
sources
[
0
][
'browser/tests/simple_storage_test.sol'
])
.
addFile
(
'myTests/simple_storage_test.sol'
,
sources
[
0
][
'browser/tests/simple_storage_test.sol'
])
.
clickLaunchIcon
(
'solidityUnitTesting'
)
.
clickLaunchIcon
(
'solidityUnitTesting'
)
...
...
apps/remix-ide-e2e/src/tests/terminal.test.ts
View file @
e5432044
...
@@ -98,7 +98,6 @@ module.exports = {
...
@@ -98,7 +98,6 @@ module.exports = {
'Call Remix File Resolver (internal URL) from a script'
:
function
(
browser
:
NightwatchBrowser
)
{
'Call Remix File Resolver (internal URL) from a script'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
browser
.
click
(
'*[data-id="terminalClearConsole"]'
)
// clear the terminal
.
click
(
'*[data-id="terminalClearConsole"]'
)
// clear the terminal
.
click
(
'li[data-id="treeViewLitreeViewItembrowser/resolveExternalUrlAndSave.js"'
)
.
addFile
(
'resolveUrl.js'
,
{
content
:
resolveUrl
})
.
addFile
(
'resolveUrl.js'
,
{
content
:
resolveUrl
})
.
openFile
(
'browser/resolveUrl.js'
)
.
openFile
(
'browser/resolveUrl.js'
)
.
pause
(
1000
)
.
pause
(
1000
)
...
@@ -110,7 +109,6 @@ module.exports = {
...
@@ -110,7 +109,6 @@ module.exports = {
'Call Remix File Resolver (internal URL) from a script and specify a path'
:
function
(
browser
:
NightwatchBrowser
)
{
'Call Remix File Resolver (internal URL) from a script and specify a path'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
browser
.
click
(
'*[data-id="terminalClearConsole"]'
)
// clear the terminal
.
click
(
'*[data-id="terminalClearConsole"]'
)
// clear the terminal
.
click
(
'li[data-id="treeViewLitreeViewItembrowser/resolveUrl.js"'
)
.
addFile
(
'resolveExternalUrlAndSaveToaPath.js'
,
{
content
:
resolveExternalUrlAndSaveToaPath
})
.
addFile
(
'resolveExternalUrlAndSaveToaPath.js'
,
{
content
:
resolveExternalUrlAndSaveToaPath
})
.
openFile
(
'browser/resolveExternalUrlAndSaveToaPath.js'
)
.
openFile
(
'browser/resolveExternalUrlAndSaveToaPath.js'
)
.
pause
(
1000
)
.
pause
(
1000
)
...
...
apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts
View file @
e5432044
...
@@ -28,7 +28,7 @@ module.exports = {
...
@@ -28,7 +28,7 @@ module.exports = {
browser
browser
.
waitForElementVisible
(
'*[data-id="remixIdeIconPanel"]'
,
10000
)
.
waitForElementVisible
(
'*[data-id="remixIdeIconPanel"]'
,
10000
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
addFile
(
'b
rowser/b
asic.sol'
,
sources
[
0
][
'browser/basic.sol'
])
.
addFile
(
'basic.sol'
,
sources
[
0
][
'browser/basic.sol'
])
.
clickLaunchIcon
(
'solidity'
)
.
clickLaunchIcon
(
'solidity'
)
.
execute
(
function
()
{
.
execute
(
function
()
{
const
elem
=
document
.
getElementById
(
'nightlies'
)
as
HTMLInputElement
const
elem
=
document
.
getElementById
(
'nightlies'
)
as
HTMLInputElement
...
...
apps/remix-ide-e2e/src/types/index.d.ts
View file @
e5432044
...
@@ -10,7 +10,7 @@ declare module "nightwatch" {
...
@@ -10,7 +10,7 @@ declare module "nightwatch" {
scrollInto
(
target
:
string
):
NightwatchBrowser
,
scrollInto
(
target
:
string
):
NightwatchBrowser
,
testContracts
(
fileName
:
string
,
contractCode
:
NightwatchContractContent
,
compiledContractNames
:
string
[]):
NightwatchBrowser
,
testContracts
(
fileName
:
string
,
contractCode
:
NightwatchContractContent
,
compiledContractNames
:
string
[]):
NightwatchBrowser
,
setEditorValue
(
value
:
string
,
callback
?:
()
=>
void
):
NightwatchBrowser
,
setEditorValue
(
value
:
string
,
callback
?:
()
=>
void
):
NightwatchBrowser
,
addFile
(
name
:
string
,
content
:
NightwatchContractContent
,
open
?:
boolean
):
NightwatchBrowser
,
addFile
(
name
:
string
,
content
:
NightwatchContractContent
):
NightwatchBrowser
,
verifyContracts
(
compiledContractNames
:
string
[],
opts
?:
{
wait
:
number
,
version
?:
string
}):
NightwatchBrowser
,
verifyContracts
(
compiledContractNames
:
string
[],
opts
?:
{
wait
:
number
,
version
?:
string
}):
NightwatchBrowser
,
selectAccount
(
account
?:
string
):
NightwatchBrowser
,
selectAccount
(
account
?:
string
):
NightwatchBrowser
,
clickFunction
(
fnFullName
:
string
,
expectedInput
?:
NightwatchClickFunctionExpectedInput
):
NightwatchBrowser
,
clickFunction
(
fnFullName
:
string
,
expectedInput
?:
NightwatchClickFunctionExpectedInput
):
NightwatchBrowser
,
...
...
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