Merge pull request #2281 from ethereum/flaky3

flaky tests
pull/2284/head
bunsenstraat 3 years ago committed by GitHub
commit ed97f29e80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      apps/remix-ide-e2e/src/tests/remixd.test.ts
  2. 12
      apps/remix-ide-e2e/src/tests/specialFunctions.test.ts
  3. 7
      libs/remix-ui/static-analyser/src/lib/ErrorRenderer.tsx
  4. 2
      libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx

@ -87,8 +87,8 @@ module.exports = {
.click('#staticanalysisButton button').pause(4000)
.waitForElementPresent('#staticanalysisresult .warning', 2000, true, function () {
browser
.waitForElementVisible('[data-id="staticAnalysisModuleMiscellaneous1"')
.click('[data-id="staticAnalysisModuleMiscellaneous1"')
.waitForElementVisible('[data-id="staticAnalysisModuleMiscellaneous1Button"]')
.click('[data-id="staticAnalysisModuleMiscellaneous1Button"]')
.waitForElementVisible('.highlightLine16', 60000)
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(

@ -165,7 +165,7 @@ module.exports = {
})
})
},
'Use special functions receive/fallback - receive and fallback are declared, sending data and wei #group4': function (browser: NightwatchBrowser) {
'Use special functions receive/fallback - receive and fallback are declared, sending data and wei #group6': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('#icon-panel', 10000)
.testContracts('receiveAndFallbackBothPayable.sol', sources[4]['receiveAndFallbackBothPayable.sol'], ['CheckSpecials'])
.clickLaunchIcon('udapp')
@ -175,10 +175,10 @@ module.exports = {
.setValue('#value', '0')
.pause(2000)
.createContract('')
.clickInstance(1)
.pause(1000)
.clickInstance(0).pause(1000)
.perform((done) => {
browser.getAddressAtPosition(1, (address) => {
browser.getAddressAtPosition(0, (address) => {
browser.sendLowLevelTx(address, '999999998765257135', '0xaa')
.pause(1000)
.journalLastChildIncludes('to: CheckSpecials.(fallback)')
@ -188,9 +188,9 @@ module.exports = {
})
})
},
'Use special functions receive/fallback - receive and fallback are declared and payable, sending wei #group4': function (browser: NightwatchBrowser) {
'Use special functions receive/fallback - receive and fallback are declared and payable, sending wei #group6': function (browser: NightwatchBrowser) {
browser.perform((done) => {
browser.getAddressAtPosition(1, (address) => {
browser.getAddressAtPosition(0, (address) => {
browser.sendLowLevelTx(address, '1', '')
.pause(1000)
.journalLastChildIncludes('to: CheckSpecials.(receive)')
@ -207,7 +207,7 @@ module.exports = {
.selectContract('CheckSpecials')
.waitForElementVisible('#value')
.clearValue('#value')
.setValue('#value', '0')
.setValue('#value', '0').pause(2000)
.createContract('')
.clickInstance(0)
.pause(1000)

@ -4,10 +4,11 @@ interface ErrorRendererProps {
message: any;
opt: any,
warningErrors: any
editor: any
editor: any,
name: string,
}
const ErrorRenderer = ({ message, opt, editor }: ErrorRendererProps) => {
const ErrorRenderer = ({ message, opt, editor, name }: ErrorRendererProps) => {
const getPositionDetails = (msg: any) => {
const result = { } as Record<string, number | string>
@ -48,7 +49,7 @@ const ErrorRenderer = ({ message, opt, editor }: ErrorRendererProps) => {
<div className="close" data-id="renderer">
<i className="fas fa-times"></i>
</div>
<span className='d-flex flex-column' onClick={() => handlePointToErrorOnClick(opt.location, opt.fileName)}>
<span className='d-flex flex-column' data-id={`${name}Button`} onClick={async () => await handlePointToErrorOnClick(opt.location, opt.fileName)}>
<span className='h6 font-weight-bold'>{opt.name}</span>
{ opt.item.warning }
{opt.item.more

@ -539,7 +539,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
{element[1]['map']((x, i) => ( // eslint-disable-line dot-notation
x.hasWarning ? ( // eslint-disable-next-line dot-notation
<div data-id={`staticAnalysisModule${x.warningModuleName}${i}`} id={`staticAnalysisModule${x.warningModuleName}${i}`} key={i}>
<ErrorRenderer message={x.msg} opt={x.options} warningErrors={ x.warningErrors} editor={props.analysisModule}/>
<ErrorRenderer name={`staticAnalysisModule${x.warningModuleName}${i}`} message={x.msg} opt={x.options} warningErrors={ x.warningErrors} editor={props.analysisModule}/>
</div>
) : null

Loading…
Cancel
Save