Get rid of <gr-comment-api> element
By now there was just small left-over that was easy to replace by
calling into the comments service instead.
Change-Id: Ice8ec80db73aab12814baa81ae19298e9e6ebb54
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.ts b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.ts
index ab17f47..72cd91e 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.ts
@@ -40,6 +40,7 @@
import {
mockPromise,
queryAndAssert,
+ stubComments,
stubRestApi,
stubUsers,
waitQueryAndAssert,
@@ -1346,10 +1347,8 @@
sinon.stub(element, '_getCommitInfo');
sinon.stub(element.$.fileList, 'reload');
flush();
- const reloadPortedCommentsStub = sinon.stub(
- element.$.commentAPI,
- 'reloadPortedComments'
- );
+ const reloadPortedCommentsStub = stubComments('reloadPortedComments');
+ const reloadPortedDraftsStub = stubComments('reloadPortedDrafts');
sinon.stub(element.$.fileList, 'collapseAllDiffs');
const value: AppElementChangeViewParams = {
@@ -1374,6 +1373,7 @@
element.params = {...value};
await flush();
assert.isTrue(reloadPortedCommentsStub.calledOnce);
+ assert.isTrue(reloadPortedDraftsStub.calledOnce);
});
test('do not reload entire page when patchRange doesnt change', async () => {