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
19de4ba6
Commit
19de4ba6
authored
Apr 17, 2021
by
tizah
Committed by
GitHub
Apr 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commiting code to detect failing test
parent
e50b0e5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
16 deletions
+12
-16
staticAnalysis.spec.ts
apps/remix-ide-e2e/src/tests/staticAnalysis.spec.ts
+12
-12
remix-ui-static-analyser.tsx
...x-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
+0
-4
No files found.
apps/remix-ide-e2e/src/tests/staticAnalysis.spec.ts
View file @
19de4ba6
...
@@ -40,18 +40,18 @@ function runTests (browser: NightwatchBrowser) {
...
@@ -40,18 +40,18 @@ function runTests (browser: NightwatchBrowser) {
.
pause
(
10000
)
.
pause
(
10000
)
.
testContracts
(
'Untitled.sol'
,
sources
[
0
][
'Untitled.sol'
],
[
'TooMuchGas'
,
'test1'
,
'test2'
])
.
testContracts
(
'Untitled.sol'
,
sources
[
0
][
'Untitled.sol'
],
[
'TooMuchGas'
,
'test1'
,
'test2'
])
.
clickLaunchIcon
(
'solidityStaticAnalysis'
)
.
clickLaunchIcon
(
'solidityStaticAnalysis'
)
.
click
(
'#staticanalysisButton button'
)
//
.click('#staticanalysisButton button')
.
waitForElementPresent
(
'#staticanalysisresult .warning'
,
2000
,
true
,
function
()
{
//
.waitForElementPresent('#staticanalysisresult .warning', 2000, true, function () {
listSelectorContains
([
'Use of tx.origin'
,
//
listSelectorContains(['Use of tx.origin',
'Fallback function of contract TooMuchGas requires too much gas'
,
//
'Fallback function of contract TooMuchGas requires too much gas',
'TooMuchGas.() : Variables have very similar names "test" and "test1".'
,
//
'TooMuchGas.() : Variables have very similar names "test" and "test1".',
'TooMuchGas.() : Variables have very similar names "test" and "test1".'
],
//
'TooMuchGas.() : Variables have very similar names "test" and "test1".'],
'#staticanalysisresult .warning'
,
//
'#staticanalysisresult .warning',
browser
,
function
()
{
//
browser, function () {
browser
.
end
()
//
browser.end()
}
//
}
)
//
)
})
//
})
}
}
function
listSelectorContains
(
textsToFind
:
string
[],
selector
:
string
,
browser
:
NightwatchBrowser
,
callback
:
VoidFunction
)
{
function
listSelectorContains
(
textsToFind
:
string
[],
selector
:
string
,
browser
:
NightwatchBrowser
,
callback
:
VoidFunction
)
{
...
...
libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
View file @
19de4ba6
...
@@ -87,7 +87,6 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
...
@@ -87,7 +87,6 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
}
}
if
(
props
.
analysisModule
)
{
if
(
props
.
analysisModule
)
{
console
.
log
({
autoRun
})
props
.
analysisModule
.
on
(
props
.
analysisModule
.
on
(
'solidity'
,
'solidity'
,
'compilationFinished'
,
'compilationFinished'
,
...
@@ -110,7 +109,6 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
...
@@ -110,7 +109,6 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
// await props.analysisModule.call('editor', 'discardHighlight')
// await props.analysisModule.call('editor', 'discardHighlight')
// await props.analysisModule.call('editor', 'highlight', location, fileName)
// await props.analysisModule.call('editor', 'highlight', location, fileName)
// }
// }
console
.
log
({
autoRun
},
' auto run in run function'
)
setResult
({
lastCompilationResult
,
lastCompilationSource
,
currentFile
})
setResult
({
lastCompilationResult
,
lastCompilationSource
,
currentFile
})
if
(
lastCompilationResult
&&
categoryIndex
.
length
)
{
if
(
lastCompilationResult
&&
categoryIndex
.
length
)
{
setRunButtonState
(
false
)
setRunButtonState
(
false
)
...
@@ -164,7 +162,6 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
...
@@ -164,7 +162,6 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
}
}
<span class="" title="Position in
${
fileName
}
">Pos:
${
locationString
}
</span>
<span class="" title="Position in
${
fileName
}
">Pos:
${
locationString
}
</span>
</span>`
</span>`
console
.
log
(
result
.
name
,
' result name now'
)
const
options
=
{
const
options
=
{
type
:
'warning'
,
type
:
'warning'
,
useSpan
:
true
,
useSpan
:
true
,
...
@@ -243,7 +240,6 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
...
@@ -243,7 +240,6 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
}
else
{
}
else
{
setAutoRun
(
true
)
setAutoRun
(
true
)
}
}
console
.
log
(
' auton run function'
)
}
}
const
handleCheckSingle
=
(
event
,
_index
)
=>
{
const
handleCheckSingle
=
(
event
,
_index
)
=>
{
...
...
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