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
959fe183
Commit
959fe183
authored
Aug 03, 2020
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added usingWorker tests
parent
ece2553a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
1 deletion
+83
-1
noWorkerErrorFor.ts
apps/remix-ide-e2e/src/commands/noWorkerErrorFor.ts
+29
-0
usingWebWorker.test.ts
apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts
+52
-0
index.d.ts
apps/remix-ide-e2e/src/types/index.d.ts
+2
-1
No files found.
apps/remix-ide-e2e/src/commands/noWorkerErrorFor.ts
0 → 100644
View file @
959fe183
import
{
NightwatchBrowser
}
from
"nightwatch"
import
EventEmitter
from
"events"
class
NoWorkerErrorFor
extends
EventEmitter
{
command
(
this
:
NightwatchBrowser
,
version
:
string
):
NightwatchBrowser
{
this
.
api
.
perform
((
done
:
VoidFunction
)
=>
{
noWorkerErrorFor
(
this
.
api
,
version
,
()
=>
{
done
()
this
.
emit
(
'complete'
)
})
})
return
this
}
}
function
noWorkerErrorFor
(
browser
:
NightwatchBrowser
,
version
:
string
,
callback
:
VoidFunction
)
{
browser
.
setSolidityCompilerVersion
(
version
)
.
click
(
'*[data-id="compilerContainerCompileBtn"]'
)
.
waitForElementPresent
(
'*[data-id="compilationFinishedWith_'
+
version
+
'"]'
,
10000
)
.
notContainsText
(
'*[data-id="compiledErrors"]'
,
'worker error:undefined'
)
.
notContainsText
(
'*[data-id="compiledErrors"]'
,
'Uncaught RangeError: Maximum call stack size exceeded'
)
.
notContainsText
(
'*[data-id="compiledErrors"]'
,
'RangeError: Maximum call stack size exceeded'
)
.
perform
(()
=>
{
callback
()
})
}
module
.
exports
=
NoWorkerErrorFor
apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts
0 → 100644
View file @
959fe183
'use strict'
import
init
from
'../helpers/init'
import
sauce
from
'./sauce'
import
{
NightwatchBrowser
}
from
'nightwatch'
const
sources
=
[
{
'browser/basic.sol'
:
{
content
:
`pragma solidity >=0.2.0 <0.7.0;
/**
* @title Basic contract
*/
contract Basic {
uint someVar;
constructor() public {}
}`
}}
]
module
.
exports
=
{
before
:
function
(
browser
:
NightwatchBrowser
,
done
:
VoidFunction
)
{
init
(
browser
,
done
)
},
'@sources'
:
function
()
{
return
sources
},
'Using Web Worker'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementVisible
(
'*[data-id="remixIdeIconPanel"]'
,
10000
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
addFile
(
'browser/basic.sol'
,
sources
[
0
][
'browser/basic.sol'
])
.
clickLaunchIcon
(
'solidity'
)
.
execute
(
function
()
{
const
elem
=
document
.
getElementById
(
'nightlies'
)
as
HTMLInputElement
elem
.
checked
=
true
})
.
noWorkerErrorFor
(
'soljson-v0.3.4+commit.7dab8902.js'
)
.
noWorkerErrorFor
(
'soljson-v0.6.5+commit.f956cc89.js'
)
.
noWorkerErrorFor
(
'soljson-v0.6.8-nightly.2020.5.14+commit.a6d0067b.js'
)
.
noWorkerErrorFor
(
'soljson-v0.6.0-nightly.2019.12.17+commit.d13438ee.js'
)
.
noWorkerErrorFor
(
'soljson-v0.4.26+commit.4563c3fc.js'
)
.
execute
(
function
()
{
const
elem
=
document
.
getElementById
(
'nightlies'
)
as
HTMLInputElement
elem
.
checked
=
false
})
.
end
()
},
tearDown
:
sauce
}
apps/remix-ide-e2e/src/types/index.d.ts
View file @
959fe183
...
...
@@ -50,7 +50,8 @@ declare module "nightwatch" {
notContainsText
(
cssSelector
:
string
,
text
:
string
):
NightwatchBrowser
,
sendLowLevelTx
(
address
:
string
,
value
:
string
,
callData
:
string
):
NightwatchBrowser
,
journalLastChild
(
val
:
string
):
NightwatchBrowser
,
checkTerminalFilter
(
filter
:
string
,
test
:
string
):
NightwatchBrowser
checkTerminalFilter
(
filter
:
string
,
test
:
string
):
NightwatchBrowser
,
noWorkerErrorFor
(
version
:
string
):
NightwatchBrowser
}
export
interface
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