changed nightwatch switchFile command to openFile

pull/5370/head
ioedeveloper 5 years ago
parent 9ef58eac97
commit 572adc2af5
  1. 18
      src/app/files/fileManager.js
  2. 8
      test-browser/commands/openFile.js
  3. 2
      test-browser/tests/defaultLayout.test.js
  4. 12
      test-browser/tests/editor.test.js
  5. 6
      test-browser/tests/generalSettings.test.js
  6. 10
      test-browser/tests/gist.test.js
  7. 8
      test-browser/tests/libraryDeployment.test.js
  8. 2
      test-browser/tests/pluginManager.test.js
  9. 6
      test-browser/tests/publishContract.test.js
  10. 4
      test-browser/tests/runAndDeploy.js
  11. 2
      test-browser/tests/signingMessage.test.js
  12. 2
      test-browser/tests/solidityImport.test.js
  13. 10
      test-browser/tests/solidityUnittests.test.js
  14. 4
      test-browser/tests/terminal.test.js

@ -143,7 +143,7 @@ class FileManager extends Plugin {
async open (path) { async open (path) {
await this._handleExists(path, `Cannot open file ${path}`) await this._handleExists(path, `Cannot open file ${path}`)
await this._handleIsFile(path, `Cannot open file ${path}`) await this._handleIsFile(path, `Cannot open file ${path}`)
return this.switchFile(path) return this.openFile(path)
} }
/** /**
@ -274,7 +274,7 @@ class FileManager extends Plugin {
delete this.openedFiles[oldName] delete this.openedFiles[oldName]
this.openedFiles[newName] = newName this.openedFiles[newName] = newName
} }
this.switchFile(newName) this.openFile(newName)
} else { } else {
var newFocus var newFocus
for (var k in this.openedFiles) { for (var k in this.openedFiles) {
@ -288,7 +288,7 @@ class FileManager extends Plugin {
} }
} }
if (newFocus) { if (newFocus) {
this.switchFile(newFocus) this.openFile(newFocus)
} }
} }
// TODO: Only keep `this.emit` (issue#2210) // TODO: Only keep `this.emit` (issue#2210)
@ -390,7 +390,7 @@ class FileManager extends Plugin {
copyName = path + '.' + this.currentRequest.from copyName = path + '.' + this.currentRequest.from
} }
this._setFileInternal(copyName, content) this._setFileInternal(copyName, content)
this.switchFile(copyName) this.openFile(copyName)
}) })
} }
} }
@ -413,7 +413,7 @@ class FileManager extends Plugin {
// TODO: Only keep `this.emit` (issue#2210) // TODO: Only keep `this.emit` (issue#2210)
this.emit('fileRemoved', path) this.emit('fileRemoved', path)
this.events.emit('fileRemoved', path) this.events.emit('fileRemoved', path)
this.switchFile() this.openFile()
} }
unselectCurrentFile () { unselectCurrentFile () {
@ -424,8 +424,8 @@ class FileManager extends Plugin {
this.events.emit('noFileSelected') this.events.emit('noFileSelected')
} }
switchFile (file) { openFile (file) {
const _switchFile = (file) => { const _openFile = (file) => {
this.saveCurrentFile() this.saveCurrentFile()
this._deps.config.set('currentFile', file) this._deps.config.set('currentFile', file)
this.openedFiles[file] = file this.openedFiles[file] = file
@ -444,14 +444,14 @@ class FileManager extends Plugin {
} }
}) })
} }
if (file) return _switchFile(file) if (file) return _openFile(file)
else { else {
var browserProvider = this._deps.filesProviders['browser'] var browserProvider = this._deps.filesProviders['browser']
browserProvider.resolveDirectory('browser', (error, filesProvider) => { browserProvider.resolveDirectory('browser', (error, filesProvider) => {
if (error) console.error(error) if (error) console.error(error)
var fileList = Object.keys(filesProvider) var fileList = Object.keys(filesProvider)
if (fileList.length) { if (fileList.length) {
_switchFile(browserProvider.type + '/' + fileList[0]) _openFile(browserProvider.type + '/' + fileList[0])
} else { } else {
// TODO: Only keep `this.emit` (issue#2210) // TODO: Only keep `this.emit` (issue#2210)
this.emit('noFileSelected') this.emit('noFileSelected')

@ -1,9 +1,9 @@
const EventEmitter = require('events') const EventEmitter = require('events')
class SwitchFile extends EventEmitter { class OpenFile extends EventEmitter {
command (name) { command (name) {
this.api.perform((done) => { this.api.perform((done) => {
switchFile(this.api, name, () => { openFile(this.api, name, () => {
done() done()
this.emit('complete') this.emit('complete')
}) })
@ -13,7 +13,7 @@ class SwitchFile extends EventEmitter {
} }
// click on fileExplorer can toggle it. We go through settings to be sure FE is open // click on fileExplorer can toggle it. We go through settings to be sure FE is open
function switchFile (browser, name, done) { function openFile (browser, name, done) {
browser.clickLaunchIcon('settings').clickLaunchIcon('fileExplorers') browser.clickLaunchIcon('settings').clickLaunchIcon('fileExplorers')
.waitForElementVisible('li[key="' + name + '"]') .waitForElementVisible('li[key="' + name + '"]')
.click('li[key="' + name + '"]') .click('li[key="' + name + '"]')
@ -23,4 +23,4 @@ function switchFile (browser, name, done) {
}) })
} }
module.exports = SwitchFile module.exports = OpenFile

@ -66,7 +66,7 @@ module.exports = {
'Switch Tabs using tabs icon': function (browser) { 'Switch Tabs using tabs icon': function (browser) {
browser browser
.waitForElementVisible('div[data-id="filePanelFileExplorerTree"]') .waitForElementVisible('div[data-id="filePanelFileExplorerTree"]')
.switchFile('browser/3_Ballot.sol') .openFile('browser/3_Ballot.sol')
.assert.containsText('div[title="browser/3_Ballot.sol"]', '3_Ballot.sol') .assert.containsText('div[title="browser/3_Ballot.sol"]', '3_Ballot.sol')
.click('span[class^=dropdownCaret]') .click('span[class^=dropdownCaret]')
.click('#homeItem') .click('#homeItem')

@ -10,7 +10,7 @@ module.exports = {
'Should zoom in editor': function (browser) { 'Should zoom in editor': function (browser) {
browser.waitForElementVisible('div[data-id="mainPanelPluginsContainer"]') browser.waitForElementVisible('div[data-id="mainPanelPluginsContainer"]')
.switchFile('browser/1_Storage.sol') .openFile('browser/1_Storage.sol')
.waitForElementVisible('*[data-id="editorInput"]') .waitForElementVisible('*[data-id="editorInput"]')
.checkElementStyle('*[data-id="editorInput"]', 'font-size', '12px') .checkElementStyle('*[data-id="editorInput"]', 'font-size', '12px')
.click('*[data-id="tabProxyZoomIn"]') .click('*[data-id="tabProxyZoomIn"]')
@ -74,7 +74,7 @@ module.exports = {
'Should highlight source code': function (browser) { 'Should highlight source code': function (browser) {
browser.addFile('sourcehighlight.js', sourcehighlightScript) browser.addFile('sourcehighlight.js', sourcehighlightScript)
.switchFile('browser/sourcehighlight.js') .openFile('browser/sourcehighlight.js')
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.editorScroll('down', 60) .editorScroll('down', 60)
.waitForElementPresent('.highlightLine32') .waitForElementPresent('.highlightLine32')
@ -87,9 +87,9 @@ module.exports = {
'Should remove 1 highlight from source code': function (browser) { 'Should remove 1 highlight from source code': function (browser) {
browser.addFile('removeSourcehighlightScript.js', removeSourcehighlightScript) browser.addFile('removeSourcehighlightScript.js', removeSourcehighlightScript)
.switchFile('browser/removeSourcehighlightScript.js') .openFile('browser/removeSourcehighlightScript.js')
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.switchFile('browser/3_Ballot.sol') .openFile('browser/3_Ballot.sol')
.editorScroll('down', 60) .editorScroll('down', 60)
.waitForElementNotPresent('.highlightLine32') .waitForElementNotPresent('.highlightLine32')
.checkElementStyle('.highlightLine40', 'background-color', 'rgb(8, 108, 181)') .checkElementStyle('.highlightLine40', 'background-color', 'rgb(8, 108, 181)')
@ -98,9 +98,9 @@ module.exports = {
'Should remove all highlights from source code': function (browser) { 'Should remove all highlights from source code': function (browser) {
browser.addFile('removeAllSourcehighlightScript.js', removeAllSourcehighlightScript) browser.addFile('removeAllSourcehighlightScript.js', removeAllSourcehighlightScript)
.switchFile('browser/removeAllSourcehighlightScript.js') .openFile('browser/removeAllSourcehighlightScript.js')
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.switchFile('browser/3_Ballot.sol') .openFile('browser/3_Ballot.sol')
.editorScroll('down', 60) .editorScroll('down', 60)
.waitForElementNotPresent('.highlightLine32') .waitForElementNotPresent('.highlightLine32')
.waitForElementNotPresent('.highlightLine40') .waitForElementNotPresent('.highlightLine40')

@ -31,14 +31,14 @@ module.exports = {
.waitForElementVisible('*[data-id="settingsTabGenerateContractMetadata"]', 5000) .waitForElementVisible('*[data-id="settingsTabGenerateContractMetadata"]', 5000)
.click('*[data-id="settingsTabGenerateContractMetadata"]') .click('*[data-id="settingsTabGenerateContractMetadata"]')
.click('*[data-id="verticalIconsFileExplorerIcons"]') .click('*[data-id="verticalIconsFileExplorerIcons"]')
.switchFile('browser/3_Ballot.sol') .openFile('browser/3_Ballot.sol')
.click('*[data-id="verticalIconsKindsolidity"]') .click('*[data-id="verticalIconsKindsolidity"]')
.pause(2000) .pause(2000)
.click('*[data-id="compilerContainerCompileBtn"]') .click('*[data-id="compilerContainerCompileBtn"]')
.pause(3000) .pause(3000)
.click('*[data-id="verticalIconsKindfileExplorers"]') .click('*[data-id="verticalIconsKindfileExplorers"]')
.switchFile('browser/artifacts') .openFile('browser/artifacts')
.switchFile('browser/artifacts/Ballot.json') .openFile('browser/artifacts/Ballot.json')
}, },
'Should add new github access token': function (browser) { 'Should add new github access token': function (browser) {

@ -44,9 +44,9 @@ module.exports = {
browser browser
.modalFooterCancelClick() .modalFooterCancelClick()
.executeScript(`remix.loadgist('${gistid}')`) .executeScript(`remix.loadgist('${gistid}')`)
.perform((done) => { if (runtimeBrowser === 'chrome') { browser.switchFile('browser/gists') } done() }) .perform((done) => { if (runtimeBrowser === 'chrome') { browser.openFile('browser/gists') } done() })
.switchFile(`browser/gists/${gistid}`) .openFile(`browser/gists/${gistid}`)
.switchFile(`browser/gists/${gistid}/1_Storage.sol`) .openFile(`browser/gists/${gistid}/1_Storage.sol`)
.perform(done) .perform(done)
} }
}) })
@ -86,8 +86,8 @@ module.exports = {
.waitForElementVisible('*[data-id="modalDialogCustomPromptText"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptText"]')
.setValue('*[data-id="modalDialogCustomPromptText"]', testData.validGistId) .setValue('*[data-id="modalDialogCustomPromptText"]', testData.validGistId)
.modalFooterOKClick() .modalFooterOKClick()
.switchFile(`browser/gists/${testData.validGistId}`) .openFile(`browser/gists/${testData.validGistId}`)
.switchFile(`browser/gists/${testData.validGistId}/ApplicationRegistry`) .openFile(`browser/gists/${testData.validGistId}/ApplicationRegistry`)
.waitForElementVisible(`div[title='browser/gists/${testData.validGistId}/ApplicationRegistry']`) .waitForElementVisible(`div[title='browser/gists/${testData.validGistId}/ApplicationRegistry']`)
.assert.containsText(`div[title='browser/gists/${testData.validGistId}/ApplicationRegistry'] > span`, 'ApplicationRegistry') .assert.containsText(`div[title='browser/gists/${testData.validGistId}/ApplicationRegistry'] > span`, 'ApplicationRegistry')
.end() .end()

@ -59,7 +59,7 @@ module.exports = {
function checkDeployShouldFail (browser, callback) { function checkDeployShouldFail (browser, callback) {
let config let config
browser.switchFile('browser/artifacts').switchFile('browser/artifacts/test.json') browser.openFile('browser/artifacts').openFile('browser/artifacts/test.json')
.getEditorValue((content) => { .getEditorValue((content) => {
config = JSON.parse(content) config = JSON.parse(content)
config.deploy['VM:-'].autoDeployLib = false config.deploy['VM:-'].autoDeployLib = false
@ -67,7 +67,7 @@ function checkDeployShouldFail (browser, callback) {
.perform(() => { .perform(() => {
browser.setEditorValue(JSON.stringify(config)) browser.setEditorValue(JSON.stringify(config))
}) })
.switchFile('browser/Untitled5.sol') .openFile('browser/Untitled5.sol')
.selectContract('test') // deploy lib .selectContract('test') // deploy lib
.createContract('') .createContract('')
.assert.containsText('div[class^="terminal"]', '<address> is not a valid address') .assert.containsText('div[class^="terminal"]', '<address> is not a valid address')
@ -77,7 +77,7 @@ function checkDeployShouldFail (browser, callback) {
function checkDeployShouldSucceed (browser, address, callback) { function checkDeployShouldSucceed (browser, address, callback) {
let addressRef let addressRef
let config let config
browser.switchFile('browser/artifacts').switchFile('browser/artifacts/test.json') browser.openFile('browser/artifacts').openFile('browser/artifacts/test.json')
.getEditorValue((content) => { .getEditorValue((content) => {
config = JSON.parse(content) config = JSON.parse(content)
config.deploy['VM:-'].autoDeployLib = false config.deploy['VM:-'].autoDeployLib = false
@ -86,7 +86,7 @@ function checkDeployShouldSucceed (browser, address, callback) {
.perform(() => { .perform(() => {
browser.setEditorValue(JSON.stringify(config)) browser.setEditorValue(JSON.stringify(config))
}) })
.switchFile('browser/Untitled5.sol') .openFile('browser/Untitled5.sol')
.selectContract('test') // deploy lib .selectContract('test') // deploy lib
.createContract('') .createContract('')
.getAddressAtPosition(1, (address) => { .getAddressAtPosition(1, (address) => {

@ -66,7 +66,7 @@ module.exports = {
.assert.containsText('*[data-id="pluginManagerSettingsPermissionForm"]', 'No Permission requested yet') .assert.containsText('*[data-id="pluginManagerSettingsPermissionForm"]', 'No Permission requested yet')
.modalFooterOKClick() .modalFooterOKClick()
.click('*[data-id="verticalIconsFileExplorerIcons"]') .click('*[data-id="verticalIconsFileExplorerIcons"]')
.switchFile('browser/3_Ballot.sol') .openFile('browser/3_Ballot.sol')
.click('*[plugin="ZoKrates"]') .click('*[plugin="ZoKrates"]')
.pause(5000) .pause(5000)
.frame(0) .frame(0)

@ -13,7 +13,7 @@ module.exports = {
browser browser
.waitForElementVisible('#icon-panel', 10000) .waitForElementVisible('#icon-panel', 10000)
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.switchFile('browser/3_Ballot.sol') .openFile('browser/3_Ballot.sol')
.verifyContracts(['Ballot']) .verifyContracts(['Ballot'])
.click('#publishOnIpfs') .click('#publishOnIpfs')
.getModalBody((value, done) => { .getModalBody((value, done) => {
@ -37,7 +37,7 @@ module.exports = {
browser browser
.waitForElementVisible('#icon-panel') .waitForElementVisible('#icon-panel')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.switchFile('browser/1_Storage.sol') .openFile('browser/1_Storage.sol')
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.waitForElementVisible('*[data-id="contractDropdownIpfsCheckbox"]') .waitForElementVisible('*[data-id="contractDropdownIpfsCheckbox"]')
.click('*[data-id="contractDropdownIpfsCheckbox"]') .click('*[data-id="contractDropdownIpfsCheckbox"]')
@ -49,7 +49,7 @@ module.exports = {
'Should remember choice after page refresh': function (browser) { 'Should remember choice after page refresh': function (browser) {
browser browser
.refresh() .refresh()
.switchFile('browser/1_Storage.sol') .openFile('browser/1_Storage.sol')
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.waitForElementVisible('*[data-id="contractDropdownIpfsCheckbox"]') .waitForElementVisible('*[data-id="contractDropdownIpfsCheckbox"]')
.verify.elementPresent('*[data-id="contractDropdownIpfsCheckbox"]:checked') .verify.elementPresent('*[data-id="contractDropdownIpfsCheckbox"]:checked')

@ -90,7 +90,7 @@ module.exports = {
'Should deploy contract on Goerli Test Network using MetaMask': function (browser) { 'Should deploy contract on Goerli Test Network using MetaMask': function (browser) {
browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option') browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.switchFile('browser/Greet.sol') .openFile('browser/Greet.sol')
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.waitForElementPresent('*[data-id="Deploy - transact (not payable)"]') .waitForElementPresent('*[data-id="Deploy - transact (not payable)"]')
.click('*[data-id="Deploy - transact (not payable)"]') .click('*[data-id="Deploy - transact (not payable)"]')
@ -141,7 +141,7 @@ module.exports = {
'Should deploy contract on Ethereum Main Network using MetaMask': function (browser) { 'Should deploy contract on Ethereum Main Network using MetaMask': function (browser) {
browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option') browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.switchFile('browser/Greet.sol') .openFile('browser/Greet.sol')
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.waitForElementPresent('*[data-id="Deploy - transact (not payable)"]') .waitForElementPresent('*[data-id="Deploy - transact (not payable)"]')
.click('*[data-id="Deploy - transact (not payable)"]') .click('*[data-id="Deploy - transact (not payable)"]')

@ -23,7 +23,7 @@ module.exports = {
browser.assert.ok(typeof signature.value === 'string', 'type of signature.value must be String') browser.assert.ok(typeof signature.value === 'string', 'type of signature.value must be String')
}) })
.addFile('signMassage.sol', sources[0]['browser/signMassage.sol']) .addFile('signMassage.sol', sources[0]['browser/signMassage.sol'])
.switchFile('browser/signMassage.sol') .openFile('browser/signMassage.sol')
.pause(5000) .pause(5000)
.selectContract('ECVerify') .selectContract('ECVerify')
.createContract('') .createContract('')

@ -15,7 +15,7 @@ module.exports = {
'Test Success Import': function (browser) { 'Test Success Import': function (browser) {
browser.addFile('Untitled1.sol', sources[1]['browser/Untitled1.sol']) browser.addFile('Untitled1.sol', sources[1]['browser/Untitled1.sol'])
.addFile('Untitled2.sol', sources[1]['browser/Untitled2.sol']) .addFile('Untitled2.sol', sources[1]['browser/Untitled2.sol'])
.switchFile('browser/Untitled1.sol') .openFile('browser/Untitled1.sol')
.verifyContracts(['test6', 'test4', 'test5']) .verifyContracts(['test6', 'test4', 'test5'])
}, },

@ -27,7 +27,7 @@ module.exports = {
'Should generate test file': function (browser) { 'Should generate test file': function (browser) {
browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.switchFile('browser/simple_storage.sol') .openFile('browser/simple_storage.sol')
.click('*[data-id="verticalIconsKindsolidityUnitTesting"]') .click('*[data-id="verticalIconsKindsolidityUnitTesting"]')
.waitForElementPresent('*[data-id="testTabGenerateTestFile"]') .waitForElementPresent('*[data-id="testTabGenerateTestFile"]')
.click('*[data-id="testTabGenerateTestFile"]') .click('*[data-id="testTabGenerateTestFile"]')
@ -100,7 +100,7 @@ module.exports = {
browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]')
.addFile('compilationError_test.sol', sources[0]['browser/compilationError_test.sol']) .addFile('compilationError_test.sol', sources[0]['browser/compilationError_test.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.switchFile('browser/compilationError_test.sol') .openFile('browser/compilationError_test.sol')
.clickLaunchIcon('solidityUnitTesting') .clickLaunchIcon('solidityUnitTesting')
.click('*[data-id="testTabCheckAllTests"]') .click('*[data-id="testTabCheckAllTests"]')
.clickElementAtPosition('.singleTestLabel', 3) .clickElementAtPosition('.singleTestLabel', 3)
@ -115,7 +115,7 @@ module.exports = {
browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]')
.addFile('deployError_test.sol', sources[0]['browser/deployError_test.sol']) .addFile('deployError_test.sol', sources[0]['browser/deployError_test.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.switchFile('browser/deployError_test.sol') .openFile('browser/deployError_test.sol')
.clickLaunchIcon('solidityUnitTesting') .clickLaunchIcon('solidityUnitTesting')
.click('*[data-id="testTabCheckAllTests"]') .click('*[data-id="testTabCheckAllTests"]')
.clickElementAtPosition('.singleTestLabel', 4) .clickElementAtPosition('.singleTestLabel', 4)
@ -129,7 +129,7 @@ module.exports = {
browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]')
.addFile('methodFailure_test.sol', sources[0]['browser/methodFailure_test.sol']) .addFile('methodFailure_test.sol', sources[0]['browser/methodFailure_test.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.switchFile('browser/methodFailure_test.sol') .openFile('browser/methodFailure_test.sol')
.clickLaunchIcon('solidityUnitTesting') .clickLaunchIcon('solidityUnitTesting')
.click('*[data-id="testTabCheckAllTests"]') .click('*[data-id="testTabCheckAllTests"]')
.clickElementAtPosition('.singleTestLabel', 5) .clickElementAtPosition('.singleTestLabel', 5)
@ -150,7 +150,7 @@ function runTests (browser) {
browser browser
.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') .waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]')
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.switchFile('browser/3_Ballot.sol') .openFile('browser/3_Ballot.sol')
.clickLaunchIcon('solidityUnitTesting') .clickLaunchIcon('solidityUnitTesting')
.pause(500) .pause(500)
.scrollAndClick('#runTestsTabRunAction') .scrollAndClick('#runTestsTabRunAction')

@ -57,7 +57,7 @@ module.exports = {
'Async/Await Script': function (browser) { 'Async/Await Script': function (browser) {
browser browser
.addFile('asyncAwait.js', { content: asyncAwait }) .addFile('asyncAwait.js', { content: asyncAwait })
.switchFile('browser/asyncAwait.js') .openFile('browser/asyncAwait.js')
.executeScript(`remix.execute('browser/asyncAwait.js')`) .executeScript(`remix.execute('browser/asyncAwait.js')`)
.journalLastChild('Waiting Promise') .journalLastChild('Waiting Promise')
.pause(5500) .pause(5500)
@ -67,7 +67,7 @@ module.exports = {
'Call Remix File Manager from a script': function (browser) { 'Call Remix File Manager from a script': function (browser) {
browser browser
.addFile('asyncAwaitWithFileManagerAccess.js', { content: asyncAwaitWithFileManagerAccess }) .addFile('asyncAwaitWithFileManagerAccess.js', { content: asyncAwaitWithFileManagerAccess })
.switchFile('browser/asyncAwaitWithFileManagerAccess.js') .openFile('browser/asyncAwaitWithFileManagerAccess.js')
.pause(5000) .pause(5000)
.executeScript(`remix.execute('browser/asyncAwaitWithFileManagerAccess.js')`) .executeScript(`remix.execute('browser/asyncAwaitWithFileManagerAccess.js')`)
.pause(6000) .pause(6000)

Loading…
Cancel
Save