Moved mock-diff-response and fix flaky tests
Moved the mock-diff-response test element to a more-appropriate location and fixed two tests that were flaky in Safari. Change-Id: I927973319b200021592b0c9e18c04a902f643894
This commit is contained in:
@@ -50,7 +50,7 @@ limitations under the License.
|
||||
test('show auth error', function(done) {
|
||||
var showAuthErrorStub = sandbox.stub(element, '_showAuthErrorAlert');
|
||||
element.fire('server-error', {response: {status: 403}});
|
||||
flush(function() {
|
||||
element.$.restAPI.getLoggedIn.lastCall.returnValue.then(function() {
|
||||
assert.isTrue(showAuthErrorStub.calledOnce);
|
||||
done();
|
||||
});
|
||||
@@ -90,7 +90,7 @@ limitations under the License.
|
||||
var toastSpy = sandbox.spy(element, '_createToastAlert');
|
||||
var windowOpen = sandbox.stub(window, 'open');
|
||||
element.fire('server-error', {response: {status: 403}});
|
||||
flush(function() {
|
||||
element.$.restAPI.getLoggedIn.lastCall.returnValue.then(function() {
|
||||
assert.isTrue(toastSpy.called);
|
||||
var toast = toastSpy.lastCall.returnValue;
|
||||
assert.isOk(toast);
|
||||
|
||||
@@ -25,7 +25,7 @@ limitations under the License.
|
||||
<script src="gr-diff-builder.js"></script>
|
||||
<script src="../../../scripts/util.js"></script>
|
||||
|
||||
<link rel="import" href="../gr-diff-cursor/mock-diff-response_test.html">
|
||||
<link rel="import" href="../../shared/gr-rest-api-interface/mock-diff-response_test.html">
|
||||
<link rel="import" href="gr-diff-builder.html">
|
||||
|
||||
<test-fixture id="basic">
|
||||
|
||||
@@ -25,7 +25,7 @@ limitations under the License.
|
||||
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
||||
<link rel="import" href="../gr-diff/gr-diff.html">
|
||||
<link rel="import" href="./gr-diff-cursor.html">
|
||||
<link rel="import" href="./mock-diff-response_test.html">
|
||||
<link rel="import" href="../../shared/gr-rest-api-interface/mock-diff-response_test.html">
|
||||
|
||||
<test-fixture id="basic">
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user