e2e fix, properties to solhint payload

pull/5370/head
Joseph Izang 1 year ago
parent fb4882aee0
commit 361ca45d9d
  1. 4
      apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts
  2. 8
      apps/solhint/src/app/SolhintPluginClient.ts
  3. 7
      libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx

@ -43,14 +43,14 @@ module.exports = {
.click('*[id="staticAnalysisRunBtn"]') .click('*[id="staticAnalysisRunBtn"]')
.waitForElementPresent('#staticanalysisresult .warning', 5000) .waitForElementPresent('#staticanalysisresult .warning', 5000)
// Check warning count // Check warning count
.click('*[data-rb-event-key="basic"]') .click('*[data-rb-event-key="remix"]')
.assert.containsText('span#ssaRemixtab > *[data-id="RemixStaticAnalysisErrorCount"]', '1') .assert.containsText('span#ssaRemixtab > *[data-id="RemixStaticAnalysisErrorCount"]', '1')
.verify.elementPresent('input[name="showLibWarnings"]') .verify.elementPresent('input[name="showLibWarnings"]')
.verify.not.elementPresent('input[name="showLibWarnings"]:checked') .verify.not.elementPresent('input[name="showLibWarnings"]:checked')
.verify.elementPresent('label[id="headingshowLibWarnings"]') .verify.elementPresent('label[id="headingshowLibWarnings"]')
.click('label[id="headingshowLibWarnings"]') .click('label[id="headingshowLibWarnings"]')
.pause(1000) .pause(1000)
.click('*[data-rb-event-key="basic"]') .click('*[data-rb-event-key="remix"]')
.assert.containsText('span#ssaRemixtab > *[data-id="RemixStaticAnalysisErrorCount', '382') .assert.containsText('span#ssaRemixtab > *[data-id="RemixStaticAnalysisErrorCount', '382')
.click('label[id="headingshowLibWarnings"]') .click('label[id="headingshowLibWarnings"]')
.pause(1000) .pause(1000)

@ -85,10 +85,14 @@ export class SolHint extends PluginClient {
const reports: Array<Report> = reporters.reports const reports: Array<Report> = reporters.reports
const hints = reports.map((report: Report) => { const hints = reports.map((report: Report) => {
return { return {
formattedMessage: `${report.message}\n${report.fix ? report.fix : ''}`, formattedMessage: `${report.message}\n ${report.fix ? report.fix : ''}`,
type: this.severity[report.severity] || 'error', type: this.severity[report.severity] || 'error',
column: report.column, column: report.column,
line: report.line - 1 line: report.line - 1,
message: report.message,
ruleId: report.ruleId,
severity: report.severity,
fix: report.fix
} }
}) })

@ -698,13 +698,6 @@ useEffect(() => {
})) }))
}).flat().every(el => categoryIndex.includes(el)) }).flat().every(el => categoryIndex.includes(el))
} }
useEffect(() => {
const getLastCompiled = async () => {
const lastComp = await props.analysisModule.call('compilerArtefacts', 'getLastCompilationResult')
console.log({ lastComp })
}
getLastCompiled()
}, [props, state])
return ( return (
<div className="analysis_3ECCBV px-3 pb-1"> <div className="analysis_3ECCBV px-3 pb-1">
<div className="my-2 d-flex flex-column align-items-left"> <div className="my-2 d-flex flex-column align-items-left">

Loading…
Cancel
Save