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

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

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

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

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

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

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

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

@ -152,7 +152,7 @@ const asyncAwaitWithFileManagerAccess = `
var run = async () => { var run = async () => {
console.log('Waiting Promise') console.log('Waiting Promise')
var result = await p() 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) console.log('result - ', text)
} }
@ -185,7 +185,7 @@ const resolveUrl = `
(async () => { (async () => {
try { try {
console.log('start') 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) { } catch (e) {
console.log(e.message) console.log(e.message)
} }

Loading…
Cancel
Save