Make changes to test

pull/5370/head
ioedeveloper 5 years ago
parent 96d1453fbf
commit 580cbd42d9
  1. 27
      apps/remix-ide/test-browser/commands/getInstalledPlugins.js
  2. 1
      apps/remix-ide/test-browser/tests/runAndDeploy.js

@ -3,23 +3,26 @@ const EventEmitter = require('events')
class GetInstalledPlugins extends EventEmitter { class GetInstalledPlugins extends EventEmitter {
command (cb) { command (cb) {
const browser = this.api const browser = this.api
const plugins = []
browser.waitForElementPresent('[plugin]:not([plugin=""]') browser.click('*[data-id="remixIdeIconPanel"]')
.perform((done) => { .waitForElementPresent('[plugin]:not([plugin=""])')
browser.execute(() => { .elements('css selector', '[plugin]:not([plugin=""])', (res) => {
const pluginNames = [] res.value.forEach(function (jsonWebElement) {
const plugins = document.querySelectorAll('[plugin]:not([plugin=""]') const jsonWebElementId = jsonWebElement.ELEMENT || jsonWebElement[Object.keys(jsonWebElement)[0]]
browser.elementIdAttribute(jsonWebElementId, 'plugin', (jsonElement) => {
const attribute = jsonElement.value
plugins.forEach(plugin => { plugins.push(attribute)
pluginNames.push(plugin.getAttribute('plugin'))
}) })
return pluginNames
}, [], (result) => {
done()
cb(result.value)
this.emit('complete')
}) })
}) })
.perform((done) => {
done()
cb(plugins)
this.emit('complete')
})
return this return this
} }
} }

@ -196,7 +196,6 @@ var sources = [
content: content:
` `
pragma solidity ^0.6.0; pragma solidity ^0.6.0;
contract helloWorld { contract helloWorld {
string public message; string public message;

Loading…
Cancel
Save