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
adbe4d2d
Commit
adbe4d2d
authored
Dec 16, 2020
by
LianaHus
Committed by
Liana Husikyan
Jan 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a command 'validateValueInput'
added file
parent
774bc6f9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
37 deletions
+28
-37
validateValueInput.ts
apps/remix-ide-e2e/src/commands/validateValueInput.ts
+22
-0
runAndDeploy.ts
apps/remix-ide-e2e/src/tests/runAndDeploy.ts
+4
-36
index.d.ts
apps/remix-ide-e2e/src/types/index.d.ts
+2
-1
No files found.
apps/remix-ide-e2e/src/commands/validateValueInput.ts
0 → 100644
View file @
adbe4d2d
import
{
NightwatchBrowser
}
from
'nightwatch'
import
EventEmitter
from
'events'
class
ValidateValueInput
extends
EventEmitter
{
command
(
this
:
NightwatchBrowser
,
selector
:
string
,
valueTosSet
:
string
,
expectedValue
:
string
)
{
const
browser
=
this
.
api
browser
.
perform
((
done
)
=>
{
browser
.
clearValue
(
selector
)
.
setValue
(
selector
,
valueTosSet
)
.
execute
(
function
(
selector
)
{
const
elem
=
document
.
querySelector
(
selector
)
as
HTMLInputElement
return
elem
.
value
},
[
selector
],
function
(
result
)
{
browser
.
assert
.
equal
(
result
.
value
,
expectedValue
)
done
()
})
})
return
this
}
}
module
.
exports
=
ValidateValueInput
apps/remix-ide-e2e/src/tests/runAndDeploy.ts
View file @
adbe4d2d
...
...
@@ -27,42 +27,10 @@ module.exports = {
'Should load run and deploy tab and check value validation'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementPresent
(
'*[data-id="remixIdeSidePanel"]'
)
.
assert
.
containsText
(
'*[data-id="sidePanelSwapitTitle"]'
,
'DEPLOY & RUN TRANSACTIONS'
)
.
clearValue
(
'#value'
)
.
setValue
(
'#value'
,
'0000'
)
.
click
(
'*[data-id="remixDRValueLabel"]'
)
.
execute
(
function
()
{
const
elem
=
document
.
getElementById
(
'value'
)
as
HTMLInputElement
return
elem
.
value
},
[],
function
(
result
)
{
console
.
log
(
'logging '
,
result
)
browser
.
assert
.
equal
(
result
.
value
,
"0"
)
})
.
clearValue
(
'#value'
)
.
setValue
(
'#value'
,
'-44'
)
.
execute
(
function
()
{
const
elem
=
document
.
getElementById
(
'value'
)
as
HTMLInputElement
return
elem
},
[],
function
(
result
)
{
console
.
log
(
'loging '
,
result
.
value
)
browser
.
assert
.
equal
(
result
.
value
,
"0"
)
})
.
clearValue
(
'#value'
)
.
setValue
(
'#value'
,
''
)
.
execute
(
function
()
{
const
elem
=
document
.
getElementById
(
'value'
)
as
HTMLInputElement
return
elem
},
[],
function
(
result
)
{
console
.
log
(
'loging '
,
result
.
value
)
browser
.
assert
.
equal
(
result
.
value
,
"0"
)
})
.
setValue
(
'#value'
,
'dragon'
)
.
execute
(
function
()
{
const
elem
=
document
.
getElementById
(
'value'
)
as
HTMLInputElement
return
elem
},
[],
function
(
result
)
{
console
.
log
(
'loging '
,
result
.
value
)
browser
.
assert
.
equal
(
result
.
value
,
"0"
)
})
.
validateValueInput
(
'#value'
,
'0000'
,
'0'
)
.
validateValueInput
(
'#value'
,
'-44'
,
'0'
)
.
validateValueInput
(
'#value'
,
''
,
'0'
)
.
validateValueInput
(
'#value'
,
'dragon'
,
'0'
)
},
'Should sign message using account key'
:
function
(
browser
:
NightwatchBrowser
)
{
...
...
apps/remix-ide-e2e/src/types/index.d.ts
View file @
adbe4d2d
...
...
@@ -51,7 +51,8 @@ declare module "nightwatch" {
sendLowLevelTx
(
address
:
string
,
value
:
string
,
callData
:
string
):
NightwatchBrowser
,
journalLastChild
(
val
:
string
):
NightwatchBrowser
,
checkTerminalFilter
(
filter
:
string
,
test
:
string
):
NightwatchBrowser
,
noWorkerErrorFor
(
version
:
string
):
NightwatchBrowser
noWorkerErrorFor
(
version
:
string
):
NightwatchBrowser
,
validateValueInput
(
selector
:
string
,
valueTosSet
:
string
,
expectedValue
:
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