From a2a8bba1c764cb4cdff6fb57912d940077dcbbdc Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 2 Jul 2020 17:49:59 +0100 Subject: [PATCH] Added line breaks to tests to match css/bootstrap line breaks change in ui --- .../test-browser/commands/goToVMTraceStep.js | 2 +- .../test-browser/commands/verifyContracts.js | 2 +- .../test-browser/tests/debugger.test.js | 18 +++++++++--------- .../tests/libraryDeployment.test.js | 4 ++-- .../test-browser/tests/recorder.test.js | 2 +- .../test-browser/tests/runAndDeploy.js | 2 +- .../test-browser/tests/signingMessage.test.js | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/apps/remix-ide/test-browser/commands/goToVMTraceStep.js b/apps/remix-ide/test-browser/commands/goToVMTraceStep.js index d31e184dca..bc7b14fbf2 100644 --- a/apps/remix-ide/test-browser/commands/goToVMTraceStep.js +++ b/apps/remix-ide/test-browser/commands/goToVMTraceStep.js @@ -17,7 +17,7 @@ function goToVMtraceStep (browser, step, incr, done) { browser.execute(function (step) { return document.querySelector('#stepdetail').innerHTML }, [step], function (result) { - if (result.value.indexOf('vm trace step:') !== -1 && result.value.indexOf(step) !== -1) { + if (result.value.indexOf('vm trace step:\n' + step) !== -1) { done() } else if (incr > 1000) { browser.assert.fail('goToVMtraceStep fails', 'info about error', '') diff --git a/apps/remix-ide/test-browser/commands/verifyContracts.js b/apps/remix-ide/test-browser/commands/verifyContracts.js index c16dbfabe0..2db39c2186 100644 --- a/apps/remix-ide/test-browser/commands/verifyContracts.js +++ b/apps/remix-ide/test-browser/commands/verifyContracts.js @@ -25,7 +25,7 @@ function getCompiledContracts (browser, opts, callback) { .pause(2000) .click('*[data-id="treeViewDivcompiler"]') .waitForElementVisible('*[data-id="treeViewLicompiler/version"]') - .assert.containsText('*[data-id="treeViewLicompiler/version"]', `version: ${opts.version}`) + .assert.containsText('*[data-id="treeViewLicompiler/version"]', `version:\n${opts.version}`) .perform(done) } else done() }) diff --git a/apps/remix-ide/test-browser/tests/debugger.test.js b/apps/remix-ide/test-browser/tests/debugger.test.js index 4c15e943ac..9e9ca728e5 100644 --- a/apps/remix-ide/test-browser/tests/debugger.test.js +++ b/apps/remix-ide/test-browser/tests/debugger.test.js @@ -43,7 +43,7 @@ module.exports = { .setValue('*[data-id="slider"]', 50) .pause(2000) .assert.containsText('*[data-id="solidityLocals"]', 'no locals') - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 92') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n92') }, 'Should step back and forward transaction': function (browser) { @@ -51,12 +51,12 @@ module.exports = { .waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]') .scrollAndClick('*[data-id="buttonNavigatorIntoBack"]') .pause(2000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 91') - .assert.containsText('*[data-id="stepdetail"]', 'execution step: 91') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n91') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n91') .click('*[data-id="buttonNavigatorIntoForward"]') .pause(2000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 92') - .assert.containsText('*[data-id="stepdetail"]', 'execution step: 92') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n92') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n92') }, 'Should jump through breakpoints': function (browser) { @@ -66,12 +66,12 @@ module.exports = { .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .pause(2000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 0') - .assert.containsText('*[data-id="stepdetail"]', 'execution step: 0') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n0') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n0') .click('*[data-id="buttonNavigatorJumpNextBreakpoint"]') .pause(2000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 184') - .assert.containsText('*[data-id="stepdetail"]', 'execution step: 184') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n184') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n184') .end() }, diff --git a/apps/remix-ide/test-browser/tests/libraryDeployment.test.js b/apps/remix-ide/test-browser/tests/libraryDeployment.test.js index 463dc47d65..d8d83e1e5a 100644 --- a/apps/remix-ide/test-browser/tests/libraryDeployment.test.js +++ b/apps/remix-ide/test-browser/tests/libraryDeployment.test.js @@ -26,7 +26,7 @@ module.exports = { .waitForElementPresent('.instance:nth-of-type(2)') .click('.instance:nth-of-type(2) > div > button') .perform((done) => { - browser.testConstantFunction(addressRef, 'get - call', '', '0: uint256: 45').perform(() => { + browser.testConstantFunction(addressRef, 'get - call', '', '0:\nuint256: 45').perform(() => { done() }) }) @@ -96,7 +96,7 @@ function checkDeployShouldSucceed (browser, address, callback) { .click('.instance:nth-of-type(3) > div > button') .perform(() => { browser - .testConstantFunction(addressRef, 'get - call', '', '0: uint256: 45') + .testConstantFunction(addressRef, 'get - call', '', '0:\nuint256: 45') .perform(() => { callback() }) }) } diff --git a/apps/remix-ide/test-browser/tests/recorder.test.js b/apps/remix-ide/test-browser/tests/recorder.test.js index 5d5df359ef..08b512a982 100644 --- a/apps/remix-ide/test-browser/tests/recorder.test.js +++ b/apps/remix-ide/test-browser/tests/recorder.test.js @@ -30,7 +30,7 @@ module.exports = { addressRef = address }) .perform((done) => { - browser.verifyCallReturnValue(addressRef, ['0: uint256: 1', '0: uint256: 3456', '0: address: 0xbBF289D846208c16EDc8474705C748aff07732dB']) + browser.verifyCallReturnValue(addressRef, ['0:uint256: 1', '0:uint256: 3456', '0:address: 0xbBF289D846208c16EDc8474705C748aff07732dB']) .perform(() => done()) }) .click('*[data-id="deployAndRunClearInstances"]') diff --git a/apps/remix-ide/test-browser/tests/runAndDeploy.js b/apps/remix-ide/test-browser/tests/runAndDeploy.js index fb28411e28..2cb2009010 100644 --- a/apps/remix-ide/test-browser/tests/runAndDeploy.js +++ b/apps/remix-ide/test-browser/tests/runAndDeploy.js @@ -178,7 +178,7 @@ module.exports = { .setValue('*[data-id="debuggerTransactionInput"]', '0x959371506b8f6223d71c709ac2eb2d0158104dca2d76ca949f1662712cf0e6db') // debug tx .click('*[data-id="debuggerTransactionStartButton"]') .waitForElementVisible('*[data-id="treeViewDivto"]', 30000) - .assert.containsText('*[data-id="stepdetail"]', 'loaded address: 0x3c943Fb816694d7D1f4C738e3e7823818a88DD6C') + .assert.containsText('*[data-id="stepdetail"]', 'loaded address:\n0x3c943Fb816694d7D1f4C738e3e7823818a88DD6C') .assert.containsText('*[data-id="solidityLocals"]', 'to: 0x6C3CCC7FBA111707D5A1AAF2758E9D4F4AC5E7B1') .end() }, diff --git a/apps/remix-ide/test-browser/tests/signingMessage.test.js b/apps/remix-ide/test-browser/tests/signingMessage.test.js index a5a7c78433..46a0b04980 100644 --- a/apps/remix-ide/test-browser/tests/signingMessage.test.js +++ b/apps/remix-ide/test-browser/tests/signingMessage.test.js @@ -38,7 +38,7 @@ module.exports = { .pause(5000) .verifyCallReturnValue( address, - ['0: address: 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c']) + ['0:address: 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c']) .perform(() => { done() })