Revert package.lock.json changes

pull/5370/head
ioedeveloper 5 years ago
parent d4d6ef7d66
commit 42edee3f52
  1. 2
      src/app/ui/multiParamManager.js
  2. 2
      src/app/ui/txLogger.js
  3. 36
      test-browser/commands/rightClick.js
  4. 2
      test-browser/tests/editor.js
  5. 34
      test-browser/tests/fileExplorer.js
  6. 2
      test-browser/tests/pluginManager.js

@ -119,7 +119,7 @@ class MultiParamManager {
this.basicInputField = yo`<input class="form-control"></input>`
this.basicInputField.setAttribute('placeholder', this.inputs)
this.basicInputField.setAttribute('title', this.inputs)
this.basicInputField.setAttribute('data-id', `multiParamManagerBasicInputField${this.inputs}`)
this.basicInputField.setAttribute('data-id', this.inputs)
var onClick = () => {
this.clickCallBack(this.funABI.inputs, this.basicInputField.value)

@ -215,7 +215,7 @@ function renderKnownTransaction (self, data, blockchain) {
${checkTxStatus(data.receipt, txType)}
${context(self, {from, to, data}, blockchain)}
<div class=${css.buttons}>
<button class="${css.debug} btn btn-primary btn-sm" data-shared="txLoggerDebugButton" data-id="txLoggerDebugButton${data.tx.hash}" onclick=${(e) => debug(e, data, self)}>Debug</div>
<button data-shared="txLoggerDebugButton" class="${css.debug} btn btn-primary btn-sm" onclick=${(e) => debug(e, data, self)}>Debug</div>
</div>
<i class="${css.arrow} fas fa-angle-down"></i>
</div>

@ -0,0 +1,36 @@
const EventEmitter = require('events')
class RightClick extends EventEmitter {
command (cssSelector) {
this.api.perform((done) => {
rightClick(this.api, cssSelector, () => {
done()
this.emit('complete')
})
})
return this
}
}
function rightClick (browser, cssSelector, callback) {
browser.execute(function (cssSelector) {
const element = document.querySelector(cssSelector)
const evt = element.ownerDocument.createEvent('MouseEvents')
const RIGHT_CLICK_BUTTON_CODE = 2
evt.initMouseEvent('contextmenu', true, true,
element.ownerDocument.defaultView, 1, 0, 0, 0, 0, false,
false, false, false, RIGHT_CLICK_BUTTON_CODE, null)
if (document.createEventObject) {
// dispatch for IE
return element.fireEvent('onclick', evt)
} else {
// dispatch for firefox + others
return !element.dispatchEvent(evt)
}
}, [cssSelector], function () {
callback()
})
}
module.exports = RightClick

@ -30,7 +30,7 @@ module.exports = {
browser.waitForElementVisible('*[data-id="editorInput"]')
.waitForElementVisible('*[class="ace_content"]')
.click('*[class="ace_content"]')
.keys('error')
.sendKeys('*[class="ace_text-input"]', 'error')
.pause(2000)
.waitForElementVisible('.ace_error')
},

@ -23,18 +23,18 @@ module.exports = {
'Should rename `5_New_contract.sol` to 5_Renamed_Contract.sol': function (browser) {
browser
.waitForElementVisible('*[data-id="treeViewLibrowser/5_New_contract.sol"]')
.moveToElement('*[data-id="treeViewLibrowser/5_New_contract.sol"]', 5, 5)
.mouseButtonClick('right')
.rightClick('[data-path="browser/5_New_contract.sol"]')
.click('*[id="menuitemrename"]')
.keys('5_Renamed_Contract.sol')
.keys(browser.Keys.ENTER)
.sendKeys('[data-path="browser/5_New_contract.sol"]', '5_Renamed_Contract.sol')
.sendKeys('[data-path="browser/5_New_contract.sol"]', browser.Keys.ENTER)
.keys()
.waitForElementVisible('*[data-id="treeViewLibrowser/5_Renamed_Contract.sol"]')
},
'Should delete file `5_Renamed_Contract.sol` from file explorer': function (browser) {
browser
.moveToElement('*[data-id="treeViewLibrowser/5_Renamed_Contract.sol"]', 5, 5)
.mouseButtonClick('right')
.waitForElementVisible('*[data-id="treeViewLibrowser/5_Renamed_Contract.sol"]')
.rightClick('[data-path="browser/5_Renamed_Contract.sol"]')
.click('*[id="menuitemdelete"]')
.waitForElementVisible('*[data-id="modalDialogContainer"]')
.modalFooterOKClick()
@ -44,8 +44,7 @@ module.exports = {
'Should create a new folder': function (browser) {
browser
.waitForElementVisible('*[data-id="treeViewLibrowser/1_Storage.sol"]')
.moveToElement('*[data-id="treeViewLibrowser/1_Storage.sol"]', 5, 5)
.mouseButtonClick('right')
.rightClick('[data-path="browser/1_Storage.sol"]')
.click('*[id="menuitemcreate folder"]')
.waitForElementVisible('*[data-id="modalDialogContainer"]')
.setValue('*[data-id="modalDialogCustomPromptText"]', 'Browser_Tests')
@ -56,19 +55,17 @@ module.exports = {
'Should rename Browser_Tests folder to Browser_E2E_Tests': function (browser) {
browser
.waitForElementVisible('*[data-id="treeViewLibrowser/Browser_Tests"]')
.moveToElement('*[data-id="treeViewLibrowser/Browser_Tests"]', 5, 5)
.mouseButtonClick('right')
.rightClick('[data-path="browser/Browser_Tests"]')
.click('*[id="menuitemrename"]')
.keys('Browser_E2E_Tests')
.keys(browser.Keys.ENTER)
.sendKeys('[data-path="browser/Browser_Tests"]', 'Browser_E2E_Tests')
.sendKeys('[data-path="browser/Browser_Tests"]', browser.Keys.ENTER)
.waitForElementVisible('*[data-id="treeViewLibrowser/Browser_E2E_Tests"]')
},
'Should delete Browser_E2E_Tests folder': function (browser) {
browser
.waitForElementVisible('*[data-id="treeViewLibrowser/Browser_E2E_Tests"]')
.moveToElement('*[data-id="treeViewLibrowser/Browser_E2E_Tests"]', 5, 5)
.mouseButtonClick('right')
.rightClick('[data-path="browser/Browser_E2E_Tests"]')
.click('*[id="menuitemdelete"]')
.waitForElementVisible('*[data-id="modalDialogContainer"]')
.modalFooterOKClick()
@ -76,6 +73,8 @@ module.exports = {
},
'Should publish all explorer files to github gist': function (browser) {
const runtimeBrowser = browser.capabilities.browserName
browser
.waitForElementVisible('*[data-id="fileExplorerNewFilepublishToGist"]')
.click('*[data-id="fileExplorerNewFilepublishToGist"]')
@ -86,7 +85,12 @@ module.exports = {
.modalFooterOKClick()
.pause(2000)
.switchBrowserTab(1)
.assert.urlContains('https://gist.github.com')
.perform((done) => {
if (runtimeBrowser === 'chrome') {
browser.assert.urlContains('https://gist.github.com')
}
done()
})
.end()
},

@ -123,7 +123,7 @@ module.exports = {
.click('*[data-id="localPluginRadioButtonsidePanel"]')
.click('*[data-id="modalDialogModalFooter"]')
.modalFooterOKClick()
.pause(2000)
.pause(5000)
.waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)')
.pause(2000)
.assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Cannot create Plugin : This name has already been used')

Loading…
Cancel
Save