Re-add _handleFix to diff comment
Bug: Issue 9492 Change-Id: I58c8dc4e4adb1face8dd32598836395e60f6ecc7
This commit is contained in:
@@ -449,6 +449,13 @@
|
||||
this.fire('comment-discard', this._getEventPayload());
|
||||
},
|
||||
|
||||
_handleFix() {
|
||||
this.dispatchEvent(new CustomEvent('create-fix-comment', {
|
||||
bubbles: true,
|
||||
detail: this._getEventPayload(),
|
||||
}));
|
||||
},
|
||||
|
||||
_handleDiscard(e) {
|
||||
e.preventDefault();
|
||||
this.$.reporting.recordDraftInteraction();
|
||||
|
||||
@@ -841,5 +841,16 @@ limitations under the License.
|
||||
element.save();
|
||||
assert.isTrue(discardStub.called);
|
||||
});
|
||||
|
||||
test('_handleFix fires create-fix event', done => {
|
||||
element.addEventListener('create-fix-comment', e => {
|
||||
assert.deepEqual(e.detail, element._getEventPayload());
|
||||
done();
|
||||
});
|
||||
element.isRobotComment = true;
|
||||
flushAsynchronousOperations();
|
||||
|
||||
MockInteractions.tap(element.$$('.fix'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user