Commit 1202bfb5 authored by yann300's avatar yann300

fix click && copied value

parent dd557002
...@@ -129,9 +129,9 @@ DropdownPanel.prototype.render = function (overridestyle) { ...@@ -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) { ...@@ -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) { ...@@ -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) { ...@@ -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', '')
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment