fixes tests. checks with plugin value and not title

pull/1/head
LianaHus 6 years ago
parent d3685b9c2e
commit 7b20bc802d
  1. 4
      src/app/components/plugin-manager-component.js
  2. 3
      src/app/components/vertical-icons.js
  3. 6
      test-browser/helpers/contracts.js
  4. 8
      test-browser/helpers/init.js

@ -91,7 +91,7 @@ class PluginManagerComponent extends BaseApi {
</button>` </button>`
return yo` return yo`
<article class="list-group-item py-1" title="${displayName}" > <article id="remixPluginManagerListItem_${name}" class="list-group-item py-1" title="${displayName}" >
<div class="${css.row} justify-content-between align-items-center"> <div class="${css.row} justify-content-between align-items-center">
<h6 class="${css.displayName}">${displayName}</h6> <h6 class="${css.displayName}">${displayName}</h6>
${activationButton} ${activationButton}
@ -155,7 +155,7 @@ class PluginManagerComponent extends BaseApi {
? yo` ? yo`
<nav class="navbar navbar-expand-lg navbar-light bg-light justify-content-between align-items-center"> <nav class="navbar navbar-expand-lg navbar-light bg-light justify-content-between align-items-center">
<span class="navbar-brand">Inactive Modules</span> <span class="navbar-brand">Inactive Modules</span>
<span class="badge badge-pill badge-primary">${inactives.length}</span> <span class="badge badge-pill badge-primary" style = "cursor: default;">${inactives.length}</span>
</nav>` </nav>`
: '' : ''

@ -79,7 +79,8 @@ export class VerticalIcons {
<div <div
class="${css.icon}" class="${css.icon}"
onclick="${() => { this._iconClick(name) }}" onclick="${() => { this._iconClick(name) }}"
plugin="${name}" title="${title}" > plugin="${name}"
title="${title}">
<img class="image" src="${icon}" alt="${name}" /> <img class="image" src="${icon}" alt="${name}" />
</div>` </div>`
this.iconKind[kind || 'other'].appendChild(this.icons[name]) this.iconKind[kind || 'other'].appendChild(this.icons[name])

@ -142,17 +142,17 @@ function getAddressAtPosition (browser, index, callback) {
} }
function testConstantFunction (browser, address, fnFullName, expectedInput, expectedOutput, cb) { function testConstantFunction (browser, address, fnFullName, expectedInput, expectedOutput, cb) {
browser.waitForElementPresent('.instance button[title="' + fnFullName + '"]').perform(function (client, done) { browser.waitForElementPresent('.instance button[plugin="' + fnFullName + '"]').perform(function (client, done) {
client.execute(function () { client.execute(function () {
document.querySelector('#runTabView').scrollTop = document.querySelector('#runTabView').scrollHeight document.querySelector('#runTabView').scrollTop = document.querySelector('#runTabView').scrollHeight
}, [], function () { }, [], function () {
if (expectedInput) { if (expectedInput) {
client.setValue('#runTabView input[title="' + expectedInput.types + '"]', expectedInput.values, function () {}) client.setValue('#runTabView input[plugin="' + expectedInput.types + '"]', expectedInput.values, function () {})
} }
done() done()
}) })
}) })
.click('.instance button[title="' + fnFullName + '"]') .click('.instance button[plugin="' + fnFullName + '"]')
.pause(1000) .pause(1000)
.waitForElementPresent('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]') .waitForElementPresent('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]')
.scrollInto('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]') .scrollInto('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]')

@ -21,10 +21,10 @@ function initModules (browser, callback) {
.execute(function () { .execute(function () {
document.querySelector('div[id="pluginManager"]').scrollTop = document.querySelector('div[id="pluginManager"]').scrollHeight document.querySelector('div[id="pluginManager"]').scrollTop = document.querySelector('div[id="pluginManager"]').scrollHeight
}, [], function () { }, [], function () {
browser.click('#pluginManager article[title="solidity"] button') browser.click('#pluginManager article[id="remixPluginManagerListItem_solidity"] button')
.click('#pluginManager article[title="run"] button') .click('#pluginManager article[id="remixPluginManagerListItem_run"] button')
.click('#pluginManager article[title="solidityStaticAnalysis"] button') .click('#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button')
.click('#pluginManager article[title="debugger"] button') .click('#pluginManager article[id="remixPluginManagerListItem_debugger"] button')
.click('#icon-panel div[plugin="fileExplorers"]') .click('#icon-panel div[plugin="fileExplorers"]')
.perform(() => { callback() }) .perform(() => { callback() })
}) })

Loading…
Cancel
Save