Merge "Remove delete icon for robot comments"

This commit is contained in:
Dhruv Srivastava 2020-02-03 10:27:30 +00:00 committed by Gerrit Code Review
commit 79070a7adb
2 changed files with 7 additions and 0 deletions

View File

@ -264,6 +264,7 @@ limitations under the License.
id="deleteBtn"
link
class$="action delete [[_computeDeleteButtonClass(_isAdmin, draft)]]"
hidden$="[[isRobotComment]]"
on-click="_handleCommentDelete">
<iron-icon id="icon" icon="gr-icons:delete"></iron-icon>
</gr-button>

View File

@ -440,6 +440,9 @@ limitations under the License.
assert.isFalse(element.$$('.humanActions').hasAttribute('hidden'));
assert.isTrue(element.$$('.robotActions').hasAttribute('hidden'));
// Delete button is not hidden by default
assert.isFalse(element.shadowRoot.querySelector('#deleteBtn').hidden);
element.isRobotComment = true;
element.draft = true;
assert.isTrue(element.$$('.humanActions').hasAttribute('hidden'));
@ -463,6 +466,9 @@ limitations under the License.
flushAsynchronousOperations();
assert.notEqual(getComputedStyle(element.$$('.robotRun.link')).display,
'none');
// Delete button is hidden for robot comments
assert.isTrue(element.shadowRoot.querySelector('#deleteBtn').hidden);
});
test('collapsible drafts', () => {