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
0afbcd7c
Commit
0afbcd7c
authored
Dec 03, 2020
by
LianaHus
Committed by
Liana Husikyan
Jan 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ignore numbers with only 0's
test
parent
ad26e150
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
runAndDeploy.ts
apps/remix-ide-e2e/src/tests/runAndDeploy.ts
+18
-0
settings.js
apps/remix-ide/src/app/tabs/runTab/settings.js
+10
-1
No files found.
apps/remix-ide-e2e/src/tests/runAndDeploy.ts
View file @
0afbcd7c
...
...
@@ -23,6 +23,24 @@ module.exports = {
.
assert
.
containsText
(
'*[data-id="sidePanelSwapitTitle"]'
,
'DEPLOY & RUN TRANSACTIONS'
)
},
'Should load run and deploy tab and check value validation'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementPresent
(
'*[data-id="remixIdeSidePanel"]'
)
.
clickLaunchIcon
(
'udapp'
)
.
waitForElementPresent
(
'*[data-id="sidePanelSwapitTitle"]'
)
.
assert
.
containsText
(
'*[data-id="sidePanelSwapitTitle"]'
,
'DEPLOY & RUN TRANSACTIONS'
)
.
clearValue
(
'#value'
)
.
setValue
(
'#value'
,
'0000'
)
.
assert
.
containsText
(
'*[data-id="dandrValue"]'
,
'0'
)
.
clearValue
(
'#value'
)
.
setValue
(
'#value'
,
'-44'
)
.
assert
.
containsText
(
'*[data-id="dandrValue"]'
,
'44'
)
.
clearValue
(
'#value'
)
.
setValue
(
'#value'
,
''
)
.
assert
.
containsText
(
'*[data-id="dandrValue"]'
,
'0'
)
.
setValue
(
'#value'
,
'dragon'
)
.
assert
.
containsText
(
'*[data-id="dandrValue"]'
,
'0'
)
},
'Should sign message using account key'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementPresent
(
'*[data-id="settingsRemixRunSignMsg"]'
)
.
click
(
'*[data-id="settingsRemixRunSignMsg"]'
)
...
...
apps/remix-ide/src/app/tabs/runTab/settings.js
View file @
0afbcd7c
...
...
@@ -54,7 +54,15 @@ class SettingsUI {
}
validateValue
()
{
if
(
this
.
el
.
querySelector
(
'#value'
).
value
===
''
)
this
.
el
.
querySelector
(
'#value'
).
value
=
0
const
valueEl
=
this
.
el
.
querySelector
(
'#value'
)
valueEl
.
value
=
parseInt
(
valueEl
.
value
)
// assign 0 if given value is
// - empty
// - not valid (for ex 4345-54)
// - contains only '0's (for ex 00..0)
if
(
!
valueEl
.
value
)
valueEl
.
value
=
0
// if giveen value is negative, ignore '-'
if
(
valueEl
.
value
<
0
)
valueEl
.
value
=
Math
.
abs
(
valueEl
.
value
)
}
render
()
{
...
...
@@ -126,6 +134,7 @@ class SettingsUI {
min="0"
class="form-control
${
css
.
gasNval
}
${
css
.
col2
}
"
id="value"
data-id="dandrValue"
value="0"
title="Enter the value and choose the unit"
onchange=
${()
=>
this
.
validateValue
()}
...
...
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