Update getInstalledPlugins command

pull/4/head
ioedeveloper 5 years ago
parent e42fa3bb85
commit b5509376c6
  1. 29
      apps/remix-ide/test-browser/commands/getInstalledPlugins.js
  2. 21180
      package-lock.json
  3. 2
      package.json
  4. 1
      soljson.js

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

21180
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -214,4 +214,4 @@
"web3": "1.2.4",
"webworkify": "^1.2.1"
}
}
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save