|
|
|
@ -284,7 +284,7 @@ module.exports = { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function runTests (browser: NightwatchBrowser, done: any) { |
|
|
|
|
function runTests(browser: NightwatchBrowser, done: any) { |
|
|
|
|
const browserName = browser.options.desiredCapabilities.browserName |
|
|
|
|
browser.clickLaunchIcon('filePanel') |
|
|
|
|
.waitForElementVisible('[data-path="folder1"]') |
|
|
|
@ -316,11 +316,11 @@ function runTests (browser: NightwatchBrowser, done: any) { |
|
|
|
|
.waitForElementVisible('[data-path="folder1/renamed_contract_' + browserName + '.sol"]') // check if renamed file is preset
|
|
|
|
|
.waitForElementNotPresent('[data-path="folder1/contract_' + browserName + '.sol"]') // check if renamed (old) file is not present
|
|
|
|
|
.waitForElementNotPresent('[data-path="folder1/contract_' + browserName + '_toremove.sol"]') // check if removed (old) file is not present
|
|
|
|
|
.perform(done) |
|
|
|
|
.perform(done()) |
|
|
|
|
// .click('[data-path="folder1/renamed_contract_' + browserName + '.sol"]')
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function testImportFromRemixd (browser: NightwatchBrowser, callback: VoidFunction) { |
|
|
|
|
function testImportFromRemixd(browser: NightwatchBrowser, callback: VoidFunction) { |
|
|
|
|
browser |
|
|
|
|
.waitForElementVisible('[data-path="src"]', 100000) |
|
|
|
|
.click('[data-path="src"]') |
|
|
|
@ -333,18 +333,18 @@ function testImportFromRemixd (browser: NightwatchBrowser, callback: VoidFunctio |
|
|
|
|
.perform(() => { callback() }) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function spawnRemixd (path: string) { |
|
|
|
|
function spawnRemixd(path: string) { |
|
|
|
|
const remixd = spawn('yarn run remixd', [`-s ${path}`], { cwd: process.cwd(), shell: true }) |
|
|
|
|
remixd.stdout.on('data', function(data) { |
|
|
|
|
remixd.stdout.on('data', function (data) { |
|
|
|
|
console.log('stdout: ' + data.toString()) |
|
|
|
|
}) |
|
|
|
|
remixd.stderr.on('err', function(data) { |
|
|
|
|
remixd.stderr.on('err', function (data) { |
|
|
|
|
console.log('err: ' + data.toString()) |
|
|
|
|
}) |
|
|
|
|
return remixd |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function connectRemixd (browser: NightwatchBrowser, done: any) { |
|
|
|
|
function connectRemixd(browser: NightwatchBrowser, done: any) { |
|
|
|
|
const browserName = browser.options.desiredCapabilities.browserName |
|
|
|
|
if (browserName === 'safari' || browserName === 'internet explorer') { |
|
|
|
|
console.log('do not run remixd test for ' + browserName + ': sauce labs doesn\'t seems to handle websocket') |
|
|
|
|