pull/5370/head
yann300 3 years ago
parent d005487340
commit 16993fa377
  1. 2
      apps/remix-ide-e2e/src/commands/openFile.ts
  2. 6
      apps/remix-ide-e2e/src/tests/url.test.ts

@ -15,7 +15,7 @@ class OpenFile 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 openFile (browser: NightwatchBrowser, name: string, done: VoidFunction) { function openFile (browser: NightwatchBrowser, name: string, done: VoidFunction) {
browser.clickLaunchIcon('settings').clickLaunchIcon('filePanel') browser.clickLaunchIcon('settings').pause(500).clickLaunchIcon('filePanel')
.waitForElementVisible('li[data-id="treeViewLitreeViewItem' + name + '"', 60000) .waitForElementVisible('li[data-id="treeViewLitreeViewItem' + name + '"', 60000)
.click('li[data-id="treeViewLitreeViewItem' + name + '"') .click('li[data-id="treeViewLitreeViewItem' + name + '"')
.pause(2000) .pause(2000)

@ -31,7 +31,7 @@ module.exports = {
.assert.containsText('*[data-id="compilerContainerCompileBtn"]', 'contract-76747f6e19.sol') .assert.containsText('*[data-id="compilerContainerCompileBtn"]', 'contract-76747f6e19.sol')
.currentWorkspaceIs('code-sample') .currentWorkspaceIs('code-sample')
.getEditorValue((content) => { .getEditorValue((content) => {
browser.assert.ok(content.indexOf( browser.assert.ok(content && content.indexOf(
'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol') !== -1, 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol') !== -1,
'code has not been loaded') 'code has not been loaded')
}) })
@ -45,7 +45,7 @@ module.exports = {
.pause(5000) .pause(5000)
.currentWorkspaceIs('code-sample') .currentWorkspaceIs('code-sample')
.getEditorValue((content) => { .getEditorValue((content) => {
browser.assert.ok(content.indexOf( browser.assert.ok(content && content.indexOf(
'proposals.length = _numProposals;') !== -1, 'proposals.length = _numProposals;') !== -1,
'url has not been loaded') 'url has not been loaded')
}) })
@ -59,7 +59,7 @@ module.exports = {
.pause(5000) .pause(5000)
.currentWorkspaceIs('code-sample') .currentWorkspaceIs('code-sample')
.getEditorValue((content) => { .getEditorValue((content) => {
browser.assert.ok(content.indexOf( browser.assert.ok(content && content.indexOf(
'proposals.length = _numProposals;') !== -1, 'proposals.length = _numProposals;') !== -1,
'code has not been loaded') 'code has not been loaded')
}) })

Loading…
Cancel
Save