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
e164eba9
Commit
e164eba9
authored
Apr 23, 2020
by
LianaHus
Committed by
Aniket
Apr 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed select all after deactivate/activate
parent
04356905
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
test-tab.js
src/app/tabs/test-tab.js
+14
-9
No files found.
src/app/tabs/test-tab.js
View file @
e164eba9
...
@@ -50,7 +50,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -50,7 +50,7 @@ module.exports = class TestTab extends ViewPlugin {
listenToEvents
()
{
listenToEvents
()
{
this
.
filePanel
.
event
.
register
(
'newTestFileCreated'
,
file
=>
{
this
.
filePanel
.
event
.
register
(
'newTestFileCreated'
,
file
=>
{
var
testList
=
this
.
view
.
querySelector
(
"[class^='testList']"
)
var
testList
=
this
.
view
.
querySelector
(
"[class^='testList']"
)
var
test
=
yo
`<label class="singleTestLabel"><input class="singleTest" onchange=
${(
e
)
=>
this
.
toggleCheckbox
(
e
.
target
.
checked
,
file
)}
type="checkbox" checked="true">
${
file
}
</label>`
var
test
=
this
.
createSingleTest
(
file
)
testList
.
appendChild
(
test
)
testList
.
appendChild
(
test
)
this
.
data
.
allTests
.
push
(
file
)
this
.
data
.
allTests
.
push
(
file
)
this
.
data
.
selectedTests
.
push
(
file
)
this
.
data
.
selectedTests
.
push
(
file
)
...
@@ -77,13 +77,18 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -77,13 +77,18 @@ module.exports = class TestTab extends ViewPlugin {
})
})
}
}
createSingleTest
(
testFile
)
{
return
yo
`
<div class="d-flex align-items-center py-1">
<input class="singleTest" id="singleTest
${
testFile
}
" onchange=
${(
e
)
=>
this
.
toggleCheckbox
(
e
.
target
.
checked
,
testFile
)}
type="checkbox" checked="true">
<label class="singleTestLabel text-nowrap pl-2 mb-0" for="singleTest
${
testFile
}
">
${
testFile
}
</label>
</div>
`
}
listTests
()
{
listTests
()
{
return
this
.
data
.
allTests
.
map
(
return
this
.
data
.
allTests
.
map
(
test
=>
yo
`
testFile
=>
this
.
createSingleTest
(
testFile
)
<div class="singleTestLabel d-flex align-items-center py-1">
<input class="singleTest" id="singleTest
${
test
}
" onchange=
${(
e
)
=>
this
.
toggleCheckbox
(
e
.
target
.
checked
,
test
)}
type="checkbox" checked="true">
<label class="text-nowrap pl-2 mb-0" for="singleTest
${
test
}
">
${
test
}
</label>
</div>`
)
)
}
}
...
@@ -111,7 +116,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -111,7 +116,7 @@ module.exports = class TestTab extends ViewPlugin {
}
}
checkAll
(
event
)
{
checkAll
(
event
)
{
le
t
checkBoxes
=
this
.
_view
.
el
.
querySelectorAll
(
'.singleTest'
)
cons
t
checkBoxes
=
this
.
_view
.
el
.
querySelectorAll
(
'.singleTest'
)
const
checkboxesLabels
=
this
.
_view
.
el
.
querySelectorAll
(
'.singleTestLabel'
)
const
checkboxesLabels
=
this
.
_view
.
el
.
querySelectorAll
(
'.singleTestLabel'
)
// checks/unchecks all
// checks/unchecks all
for
(
let
i
=
0
;
i
<
checkBoxes
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
checkBoxes
.
length
;
i
++
)
{
...
@@ -389,7 +394,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -389,7 +394,7 @@ module.exports = class TestTab extends ViewPlugin {
this
.
testsExecutionStopped
.
hidden
=
true
this
.
testsExecutionStopped
.
hidden
=
true
this
.
resultStatistics
=
this
.
createResultLabel
()
this
.
resultStatistics
=
this
.
createResultLabel
()
this
.
resultStatistics
.
hidden
=
true
this
.
resultStatistics
.
hidden
=
true
var
el
=
yo
`
const
el
=
yo
`
<div class="
${
css
.
testTabView
}
px-2" id="testView">
<div class="
${
css
.
testTabView
}
px-2" id="testView">
<div class="
${
css
.
infoBox
}
">
<div class="
${
css
.
infoBox
}
">
<p class="text-lg"> Test your smart contract in Solidity.</p>
<p class="text-lg"> Test your smart contract in Solidity.</p>
...
@@ -415,8 +420,8 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -415,8 +420,8 @@ module.exports = class TestTab extends ViewPlugin {
</div>
</div>
</div>
</div>
`
`
this
.
_view
.
el
=
el
this
.
updateForNewCurrent
(
this
.
fileManager
.
currentFile
())
this
.
updateForNewCurrent
(
this
.
fileManager
.
currentFile
())
if
(
!
this
.
_view
.
el
)
this
.
_view
.
el
=
el
return
el
return
el
}
}
...
...
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