Fix failing tests for gr-diff-host
Change-Id: I15c2e2312edaf413e242ce7ba83ae7a61b130db5
This commit is contained in:
@@ -305,6 +305,7 @@ limitations under the License.
|
||||
|
||||
// Stub the network calls into requests that never resolve.
|
||||
sandbox.stub(element, '_getDiff', () => new Promise(() => {}));
|
||||
element.patchRange = {};
|
||||
|
||||
element.reload();
|
||||
assert.isTrue(cancelStub.called);
|
||||
@@ -368,6 +369,7 @@ limitations under the License.
|
||||
(changeNum, basePatchNum, patchNum, path, onErr) => {
|
||||
onErr(error);
|
||||
});
|
||||
element.patchRange = {};
|
||||
return element.reload().then(() => {
|
||||
assert.isTrue(onErrStub.calledOnce);
|
||||
});
|
||||
@@ -725,6 +727,7 @@ limitations under the License.
|
||||
|
||||
test('delegates cancel()', () => {
|
||||
const stub = sandbox.stub(element.$.diff, 'cancel');
|
||||
element.patchRange = {};
|
||||
element.reload();
|
||||
assert.isTrue(stub.calledOnce);
|
||||
assert.equal(stub.lastCall.args.length, 0);
|
||||
@@ -1243,9 +1246,11 @@ limitations under the License.
|
||||
|
||||
const l = document.createElement('div');
|
||||
l.setAttribute('comment-side', 'left');
|
||||
l.setAttribute('line-num', 'FILE');
|
||||
|
||||
const r = document.createElement('div');
|
||||
r.setAttribute('comment-side', 'right');
|
||||
r.setAttribute('line-num', 'FILE');
|
||||
|
||||
const threadEls = [l, r];
|
||||
assert.deepEqual(element._filterThreadElsForLocation(threadEls, line),
|
||||
|
||||
@@ -111,8 +111,7 @@ limitations under the License.
|
||||
'diff/gr-diff-cursor/gr-diff-cursor_test.html',
|
||||
'diff/gr-diff-highlight/gr-annotation_test.html',
|
||||
'diff/gr-diff-highlight/gr-diff-highlight_test.html',
|
||||
// TODO: uncomment file & fix tests. The file was missed in this list for a long time.
|
||||
// 'diff/gr-diff-host/gr-diff-host_test.html',
|
||||
'diff/gr-diff-host/gr-diff-host_test.html',
|
||||
'diff/gr-diff-mode-selector/gr-diff-mode-selector_test.html',
|
||||
'diff/gr-diff-processor/gr-diff-processor_test.html',
|
||||
'diff/gr-diff-selection/gr-diff-selection_test.html',
|
||||
|
||||
Reference in New Issue
Block a user