contract files path updated in e2e tests

sl
aniket-engg 4 years ago committed by Aniket
parent 4d0478444d
commit a3c65d5815
  1. 6
      apps/remix-ide-e2e/src/tests/defaultLayout.test.ts
  2. 18
      apps/remix-ide-e2e/src/tests/editor.test.ts
  3. 4
      apps/remix-ide-e2e/src/tests/fileExplorer.test.ts
  4. 6
      apps/remix-ide-e2e/src/tests/fileManager_api.test.ts
  5. 6
      apps/remix-ide-e2e/src/tests/generalSettings.test.ts
  6. 2
      apps/remix-ide-e2e/src/tests/gist.test.ts
  7. 6
      apps/remix-ide-e2e/src/tests/publishContract.test.ts
  8. 2
      apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts
  9. 4
      apps/remix-ide-e2e/src/tests/terminal.test.ts

@ -20,7 +20,7 @@ module.exports = {
browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]')
.assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS')
.waitForElementVisible('div[data-id="filePanelFileExplorerTree"]')
.waitForElementVisible('li[key="browser/3_Ballot.sol"]')
.waitForElementVisible('li[key="browser/contracts/3_Ballot.sol"]')
},
'Loads Main View': function (browser: NightwatchBrowser) {
@ -68,8 +68,8 @@ module.exports = {
'Switch Tabs using tabs icon': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('div[data-id="filePanelFileExplorerTree"]')
.openFile('browser/3_Ballot.sol')
.assert.containsText('div[title="browser/3_Ballot.sol"]', '3_Ballot.sol')
.openFile('browser/contracts/3_Ballot.sol')
.assert.containsText('div[title="browser/contracts/3_Ballot.sol"]', '3_Ballot.sol')
.click('span[class^=dropdownCaret]')
.click('#homeItem')
.assert.containsText('div[title="home"]', 'Home')

@ -12,7 +12,7 @@ module.exports = {
'Should zoom in editor': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('div[data-id="mainPanelPluginsContainer"]')
.openFile('browser/1_Storage.sol')
.openFile('browser/contracts/1_Storage.sol')
.waitForElementVisible('*[data-id="editorInput"]')
.checkElementStyle('*[data-id="editorInput"]', 'font-size', '12px')
.click('*[data-id="tabProxyZoomIn"]')
@ -97,8 +97,8 @@ module.exports = {
.click('li[key="browser/removeSourcehighlightScript.js"]')
.pause(2000)
.executeScript('remix.exeCurrent()')
.waitForElementVisible('li[key="browser/3_Ballot.sol"]')
.click('li[key="browser/3_Ballot.sol"]')
.waitForElementVisible('li[key="browser/contracts/3_Ballot.sol"]')
.click('li[key="browser/contracts/3_Ballot.sol"]')
.pause(2000)
.waitForElementNotPresent('.highlightLine32')
.checkElementStyle('.highlightLine40', 'background-color', 'rgb(8, 108, 181)')
@ -110,8 +110,8 @@ module.exports = {
.click('li[key="browser/removeAllSourcehighlightScript.js"]')
.pause(2000)
.executeScript('remix.exeCurrent()')
.waitForElementVisible('li[key="browser/3_Ballot.sol"]')
.click('li[key="browser/3_Ballot.sol"]')
.waitForElementVisible('li[key="browser/contracts/3_Ballot.sol"]')
.click('li[key="browser/contracts/3_Ballot.sol"]')
.pause(2000)
.waitForElementNotPresent('.highlightLine32')
.waitForElementNotPresent('.highlightLine40')
@ -151,7 +151,7 @@ const sourcehighlightScript = {
column: 20
}
}
await remix.call('editor', 'highlight', pos, 'browser/3_Ballot.sol')
await remix.call('editor', 'highlight', pos, 'browser/contracts/3_Ballot.sol')
const pos2 = {
start: {
@ -163,7 +163,7 @@ const sourcehighlightScript = {
column: 20
}
}
await remix.call('editor', 'highlight', pos2, 'browser/3_Ballot.sol')
await remix.call('editor', 'highlight', pos2, 'browser/contracts/3_Ballot.sol')
const pos3 = {
start: {
@ -175,7 +175,7 @@ const sourcehighlightScript = {
column: 20
}
}
await remix.call('editor', 'highlight', pos3, 'browser/3_Ballot.sol')
await remix.call('editor', 'highlight', pos3, 'browser/contracts/3_Ballot.sol')
} catch (e) {
console.log(e.message)
}
@ -187,7 +187,7 @@ const removeSourcehighlightScript = {
content: `
(async () => {
try {
await remix.call('editor', 'discardHighlightAt', 32, 'browser/3_Ballot.sol')
await remix.call('editor', 'discardHighlightAt', 32, 'browser/contracts/3_Ballot.sol')
} catch (e) {
console.log(e.message)
}

@ -46,8 +46,8 @@ module.exports = {
'Should create a new folder': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('*[data-id="treeViewLibrowser/1_Storage.sol"]')
.rightClick('[data-path="browser/1_Storage.sol"]')
.waitForElementVisible('*[data-id="treeViewLibrowser/contracts/1_Storage.sol"]')
.rightClick('[data-path="browser/contracts/1_Storage.sol"]')
.click('*[id="menuitemcreate folder"]')
.waitForElementVisible('*[data-id="modalDialogContainer"]')
.setValue('*[data-id="modalDialogCustomPromptText"]', 'Browser_Tests')

@ -30,7 +30,7 @@ module.exports = {
.addFile('open.js', { content: executeOpen })
.executeScript(`remix.exeCurrent()`)
.pause(2000)
.journalLastChildIncludes('browser/3_Ballot.sol')
.journalLastChildIncludes('browser/contracts/3_Ballot.sol')
},
'Should execute `writeFile` api from file manager external api': function (browser: NightwatchBrowser) {
@ -118,7 +118,7 @@ const executeExists = `
const executeOpen = `
const run = async () => {
await remix.call('fileManager', 'open', 'browser/3_Ballot.sol')
await remix.call('fileManager', 'open', 'browser/contracts/3_Ballot.sol')
const result = await remix.call('fileManager', 'file')
console.log(result)
@ -147,7 +147,7 @@ const executeReadFile = `
const executeCopyFile = `
const run = async () => {
await remix.call('fileManager', 'copyFile', 'browser/3_Ballot.sol', 'browser/new_contract.sol')
await remix.call('fileManager', 'copyFile', 'browser/contracts/3_Ballot.sol', 'browser/new_contract.sol')
const result = await remix.call('fileManager', 'readFile', 'browser/new_contract.sol')
console.log(result)

@ -20,14 +20,14 @@ module.exports = {
browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000)
.waitForElementVisible('*[data-id="settingsTabGenerateContractMetadataLabel"]', 5000)
.click('*[data-id="verticalIconsFileExplorerIcons"]')
.openFile('browser/3_Ballot.sol')
.openFile('browser/contracts/3_Ballot.sol')
.click('*[data-id="verticalIconsKindsolidity"]')
.pause(2000)
.click('*[data-id="compilerContainerCompileBtn"]')
.pause(3000)
.click('*[data-id="verticalIconsKindfileExplorers"]')
.openFile('browser/artifacts/Ballot.json')
.openFile('browser/artifacts/Ballot_metadata.json')
.openFile('browser/contracts/artifacts/Ballot.json')
.openFile('browser/contracts/artifacts/Ballot_metadata.json')
.getEditorValue((content) => {
const metadata = JSON.parse(content)
browser.assert.equal(metadata.language, 'Solidity')

@ -26,7 +26,7 @@ module.exports = {
browser
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
.clickLaunchIcon('fileExplorers')
.rightClick('[data-path="browser/1_Storage.sol"]')
.rightClick('[data-path="browser/contracts/1_Storage.sol"]')
.click('*[id="menuitemcreate folder"]')
.waitForElementVisible('*[data-id="modalDialogContainer"]')
.setValue('*[data-id="modalDialogCustomPromptText"]', 'Browser_Tests')

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

@ -167,7 +167,7 @@ function runTests (browser: NightwatchBrowser) {
browser
.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]')
.clickLaunchIcon('fileExplorers')
.openFile('browser/3_Ballot.sol')
.openFile('browser/contracts/3_Ballot.sol')
.clickLaunchIcon('solidityUnitTesting')
.pause(500)
.scrollAndClick('#runTestsTabRunAction')

@ -152,7 +152,7 @@ const asyncAwaitWithFileManagerAccess = `
var run = async () => {
console.log('Waiting Promise')
var result = await p()
let text = await remix.call('fileManager', 'readFile', 'browser/3_Ballot.sol')
let text = await remix.call('fileManager', 'readFile', 'browser/contracts/3_Ballot.sol')
console.log('result - ', text)
}
@ -185,7 +185,7 @@ const resolveUrl = `
(async () => {
try {
console.log('start')
console.log(await remix.call('contentImport', 'resolveAndSave', 'browser/3_Ballot.sol'))
console.log(await remix.call('contentImport', 'resolveAndSave', 'browser/contracts/3_Ballot.sol'))
} catch (e) {
console.log(e.message)
}

Loading…
Cancel
Save