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
42847dde
Commit
42847dde
authored
Dec 09, 2020
by
LianaHus
Committed by
Liana Husikyan
Jan 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refine validation
parent
c62bdc17
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
runAndDeploy.ts
apps/remix-ide-e2e/src/tests/runAndDeploy.ts
+1
-0
settings.js
apps/remix-ide/src/app/tabs/runTab/settings.js
+6
-3
package-lock.json
package-lock.json
+0
-0
No files found.
apps/remix-ide-e2e/src/tests/runAndDeploy.ts
View file @
42847dde
...
@@ -28,6 +28,7 @@ module.exports = {
...
@@ -28,6 +28,7 @@ module.exports = {
.
assert
.
containsText
(
'*[data-id="sidePanelSwapitTitle"]'
,
'DEPLOY & RUN TRANSACTIONS'
)
.
assert
.
containsText
(
'*[data-id="sidePanelSwapitTitle"]'
,
'DEPLOY & RUN TRANSACTIONS'
)
.
clearValue
(
'#value'
)
.
clearValue
(
'#value'
)
.
setValue
(
'#value'
,
'0000'
)
.
setValue
(
'#value'
,
'0000'
)
.
click
(
'*[data-id="remixDRValueLabel"]'
)
.
assert
.
containsText
(
'*[data-id="dandrValue"]'
,
'0'
)
.
assert
.
containsText
(
'*[data-id="dandrValue"]'
,
'0'
)
.
clearValue
(
'#value'
)
.
clearValue
(
'#value'
)
.
setValue
(
'#value'
,
'-44'
)
.
setValue
(
'#value'
,
'-44'
)
...
...
apps/remix-ide/src/app/tabs/runTab/settings.js
View file @
42847dde
...
@@ -54,7 +54,10 @@ class SettingsUI {
...
@@ -54,7 +54,10 @@ class SettingsUI {
}
}
validateInputKey
(
e
)
{
validateInputKey
(
e
)
{
if
(
!
helper
.
isNumeric
(
e
.
key
)
||
(
e
.
key
===
0
&&
!
this
.
el
.
querySelector
(
'#value'
).
value
))
{
// preventing not numeric keys
// preventing 000 case
if
(
!
helper
.
isNumeric
(
e
.
key
)
||
(
e
.
key
===
'0'
&&
!
parseInt
(
this
.
el
.
querySelector
(
'#value'
).
value
)
&&
this
.
el
.
querySelector
(
'#value'
).
value
.
length
>
0
))
{
e
.
preventDefault
()
e
.
preventDefault
()
e
.
stopImmediatePropagation
()
e
.
stopImmediatePropagation
()
}
}
...
@@ -66,7 +69,7 @@ class SettingsUI {
...
@@ -66,7 +69,7 @@ class SettingsUI {
// assign 0 if given value is
// assign 0 if given value is
// - empty
// - empty
// - not valid (for ex 4345-54)
// - not valid (for ex 4345-54)
// - contains only '0's (for ex 0000)
// - contains only '0's (for ex 0000)
copy past or edit
if
(
!
valueEl
.
value
)
valueEl
.
value
=
0
if
(
!
valueEl
.
value
)
valueEl
.
value
=
0
// if giveen value is negative(possible with copy-pasting) set to 0
// if giveen value is negative(possible with copy-pasting) set to 0
if
(
valueEl
.
value
<
0
)
valueEl
.
value
=
0
if
(
valueEl
.
value
<
0
)
valueEl
.
value
=
0
...
@@ -134,7 +137,7 @@ class SettingsUI {
...
@@ -134,7 +137,7 @@ class SettingsUI {
const
valueEl
=
yo
`
const
valueEl
=
yo
`
<div class="
${
css
.
crow
}
">
<div class="
${
css
.
crow
}
">
<label class="
${
css
.
settingsLabel
}
">Value</label>
<label class="
${
css
.
settingsLabel
}
"
data-id="remixDRValueLabel"
>Value</label>
<div class="
${
css
.
gasValueContainer
}
">
<div class="
${
css
.
gasValueContainer
}
">
<input
<input
type="number"
type="number"
...
...
package-lock.json
View file @
42847dde
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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