fix click && copied value

pull/7/head
yann300 7 years ago
parent 73667e8792
commit 60c61cfb52
  1. 8
      remix-debugger/src/ui/DropdownPanel.js
  2. 4
      remix-debugger/test-browser/test/vmdebugger.js

@ -129,9 +129,9 @@ DropdownPanel.prototype.render = function (overridestyle) {
to {transform:rotate(359deg);} to {transform:rotate(359deg);}
} }
</style> </style>
<div class="${css.title} title" onclick=${function () { self.toggle() }}> <div class="${css.title} title">
<div class="${css.icon} fa fa-caret-right"></div> <div class="${css.icon} fa fa-caret-right" onclick=${function () { self.toggle() }} ></div>
<div class="${css.name}">${this.name}</div><span></span> <div class="${css.name}" onclick=${function () { self.toggle() }} >${this.name}</div><span onclick=${function () { self.toggle() }} ></span>
<div onclick=${function () { self.copyClipboard() }} title='raw' class="${css.eyeButton} btn fa fa-clipboard"></div> <div onclick=${function () { self.copyClipboard() }} title='raw' class="${css.eyeButton} btn fa fa-clipboard"></div>
</div> </div>
<div class='dropdownpanel' style='display:none'> <div class='dropdownpanel' style='display:none'>
@ -149,7 +149,7 @@ DropdownPanel.prototype.render = function (overridestyle) {
DropdownPanel.prototype.copyClipboard = function () { DropdownPanel.prototype.copyClipboard = function () {
var content = this.view.querySelector('.dropdownpanel .dropdownrawcontent') var content = this.view.querySelector('.dropdownpanel .dropdownrawcontent')
if (content) copy(content.innerHTML) if (content) copy(content.innerText ? content.innerText : content.textContent)
} }
DropdownPanel.prototype.toggle = function () { DropdownPanel.prototype.toggle = function () {

@ -42,7 +42,8 @@ function loadTraceNotFound (browser) {
.execute(function () { .execute(function () {
return document.querySelector('#txinfo .dropdownpanel .dropdownrawcontent').innerHTML return document.querySelector('#txinfo .dropdownpanel .dropdownrawcontent').innerHTML
}, [], function (result) { }, [], function (result) {
if (result.value.indexOf('<not found>') === -1) { console.log(result.value)
if (result.value.indexOf('not found') === -1) {
browser.assert.fail(' txinput panel does not contain <not found> ', 'info about error', '') browser.assert.fail(' txinput panel does not contain <not found> ', 'info about error', '')
} }
}) })
@ -58,6 +59,7 @@ function loadTrace (browser) {
.execute(function () { .execute(function () {
return document.querySelector('#txinfo .dropdownpanel .dropdownrawcontent').innerHTML return document.querySelector('#txinfo .dropdownpanel .dropdownrawcontent').innerHTML
}, [], function (result) { }, [], function (result) {
console.log(result.value)
if (result.value.indexOf('0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51') === -1) { if (result.value.indexOf('0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51') === -1) {
browser.assert.fail(' txinput panel does not contain 0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51 ', 'info about error', '') browser.assert.fail(' txinput panel does not contain 0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51 ', 'info about error', '')
} }

Loading…
Cancel
Save