First round cleanup of network requests & errors from tests
+ These were slowing down tests in cases where it would actually hit a live server, potentially adding the latency from the network to the test. + Other fixes involve removing unused imports of util.js amongst other small tweaks/fixes. Bug: Issue 4016 Change-Id: I442deefebeffc6a701e4922faccfe1c74b3a35b6
This commit is contained in:
@@ -35,6 +35,10 @@ limitations under the License.
|
|||||||
var element;
|
var element;
|
||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
|
stub('gr-rest-api-interface', {
|
||||||
|
getConfig: function() { return Promise.resolve({}); },
|
||||||
|
getLoggedIn: function() { return Promise.resolve(false); },
|
||||||
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -34,6 +34,9 @@ limitations under the License.
|
|||||||
var element;
|
var element;
|
||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
|
stub('gr-rest-api-interface', {
|
||||||
|
getLoggedIn: function() { return Promise.resolve(false); },
|
||||||
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -21,7 +21,6 @@ limitations under the License.
|
|||||||
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
|
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
|
||||||
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
||||||
<script src="../../../bower_components/page/page.js"></script>
|
<script src="../../../bower_components/page/page.js"></script>
|
||||||
<script src="../../../scripts/util.js"></script>
|
|
||||||
|
|
||||||
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
||||||
<link rel="import" href="gr-change-list.html">
|
<link rel="import" href="gr-change-list.html">
|
||||||
|
@@ -20,7 +20,6 @@ limitations under the License.
|
|||||||
|
|
||||||
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
|
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
|
||||||
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
||||||
<script src="../../../scripts/util.js"></script>
|
|
||||||
|
|
||||||
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
||||||
<link rel="import" href="gr-account-list.html">
|
<link rel="import" href="gr-account-list.html">
|
||||||
@@ -59,14 +58,11 @@ limitations under the License.
|
|||||||
existingReviewer1 = makeAccount();
|
existingReviewer1 = makeAccount();
|
||||||
existingReviewer2 = makeAccount();
|
existingReviewer2 = makeAccount();
|
||||||
|
|
||||||
|
stub('gr-rest-api-interface', {
|
||||||
|
getConfig: function() { return Promise.resolve({}); },
|
||||||
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
element.accounts = [existingReviewer1, existingReviewer2];
|
element.accounts = [existingReviewer1, existingReviewer2];
|
||||||
|
|
||||||
stub('gr-rest-api-interface', {
|
|
||||||
getConfig: function() {
|
|
||||||
return Promise.resolve({});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('account entry only appears when editable', function() {
|
test('account entry only appears when editable', function() {
|
||||||
|
@@ -36,6 +36,7 @@ limitations under the License.
|
|||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
stub('gr-rest-api-interface', {
|
stub('gr-rest-api-interface', {
|
||||||
|
getConfig: function() { return Promise.resolve({}); },
|
||||||
getLoggedIn: function() { return Promise.resolve(false); },
|
getLoggedIn: function() { return Promise.resolve(false); },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -357,12 +357,11 @@
|
|||||||
// a linked message is performed after related changes is fully loaded.
|
// a linked message is performed after related changes is fully loaded.
|
||||||
this.$.relatedChanges.reload().then(function() {
|
this.$.relatedChanges.reload().then(function() {
|
||||||
this.async(function() {
|
this.async(function() {
|
||||||
if (!history.state.scrollTop) {
|
if (history.state && history.state.scrollTop) {
|
||||||
this._maybeScrollToMessage();
|
|
||||||
|
|
||||||
} else {
|
|
||||||
document.documentElement.scrollTop =
|
document.documentElement.scrollTop =
|
||||||
document.body.scrollTop = history.state.scrollTop;
|
document.body.scrollTop = history.state.scrollTop;
|
||||||
|
} else {
|
||||||
|
this._maybeScrollToMessage();
|
||||||
}
|
}
|
||||||
}, 1);
|
}, 1);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
@@ -21,7 +21,6 @@ limitations under the License.
|
|||||||
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
|
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
|
||||||
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
||||||
<script src="../../../bower_components/page/page.js"></script>
|
<script src="../../../bower_components/page/page.js"></script>
|
||||||
<script src="../../../scripts/util.js"></script>
|
|
||||||
|
|
||||||
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
||||||
<link rel="import" href="gr-change-view.html">
|
<link rel="import" href="gr-change-view.html">
|
||||||
@@ -39,6 +38,7 @@ limitations under the License.
|
|||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
stub('gr-rest-api-interface', {
|
stub('gr-rest-api-interface', {
|
||||||
|
getConfig: function() { return Promise.resolve({}); },
|
||||||
getAccount: function() { return Promise.resolve(null); },
|
getAccount: function() { return Promise.resolve(null); },
|
||||||
});
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
|
@@ -53,6 +53,9 @@ limitations under the License.
|
|||||||
stub('gr-date-formatter', {
|
stub('gr-date-formatter', {
|
||||||
_loadTimeFormat: function() { return Promise.resolve(''); }
|
_loadTimeFormat: function() { return Promise.resolve(''); }
|
||||||
});
|
});
|
||||||
|
stub('gr-diff', {
|
||||||
|
reload: function() { return Promise.resolve(); },
|
||||||
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -362,14 +365,11 @@ limitations under the License.
|
|||||||
flushAsynchronousOperations();
|
flushAsynchronousOperations();
|
||||||
var fileRows =
|
var fileRows =
|
||||||
Polymer.dom(element.root).querySelectorAll('.row:not(.header)');
|
Polymer.dom(element.root).querySelectorAll('.row:not(.header)');
|
||||||
// Prevent diff from making API call.
|
|
||||||
var diffStub = sandbox.stub(element.diffs[0], 'reload');
|
|
||||||
var showHideCheck = fileRows[0].querySelector(
|
var showHideCheck = fileRows[0].querySelector(
|
||||||
'input.show-hide[type="checkbox"]');
|
'input.show-hide[type="checkbox"]');
|
||||||
assert.isTrue(showHideCheck.checked);
|
assert.isTrue(showHideCheck.checked);
|
||||||
MockInteractions.tap(showHideCheck);
|
MockInteractions.tap(showHideCheck);
|
||||||
assert.isFalse(element.diffs[0].hidden);
|
assert.isFalse(element.diffs[0].hidden);
|
||||||
diffStub.restore();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('path should be properly escaped', function() {
|
test('path should be properly escaped', function() {
|
||||||
|
@@ -20,7 +20,6 @@ limitations under the License.
|
|||||||
|
|
||||||
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
|
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
|
||||||
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
||||||
<script src="../../../scripts/util.js"></script>
|
|
||||||
|
|
||||||
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
||||||
<link rel="import" href="gr-message.html">
|
<link rel="import" href="gr-message.html">
|
||||||
@@ -36,8 +35,10 @@ limitations under the License.
|
|||||||
var element;
|
var element;
|
||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
|
stub('gr-rest-api-interface', {
|
||||||
|
getLoggedIn: function() { return Promise.resolve(false); },
|
||||||
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
sinon.stub(element.$.restAPI, 'getLoggedIn').returns(true);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('reply event', function(done) {
|
test('reply event', function(done) {
|
||||||
|
@@ -20,7 +20,6 @@ limitations under the License.
|
|||||||
|
|
||||||
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
|
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
|
||||||
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
||||||
<script src="../../../scripts/util.js"></script>
|
|
||||||
|
|
||||||
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
||||||
<link rel="import" href="gr-messages-list.html">
|
<link rel="import" href="gr-messages-list.html">
|
||||||
@@ -36,6 +35,10 @@ limitations under the License.
|
|||||||
var element;
|
var element;
|
||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
|
stub('gr-rest-api-interface', {
|
||||||
|
getConfig: function() { return Promise.resolve({}); },
|
||||||
|
getLoggedIn: function() { return Promise.resolve(false); },
|
||||||
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
element.messages = [
|
element.messages = [
|
||||||
{
|
{
|
||||||
|
@@ -20,7 +20,6 @@ limitations under the License.
|
|||||||
|
|
||||||
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
|
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
|
||||||
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
||||||
<script src="../../../scripts/util.js"></script>
|
|
||||||
|
|
||||||
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
||||||
<link rel="import" href="gr-reply-dialog.html">
|
<link rel="import" href="gr-reply-dialog.html">
|
||||||
@@ -49,6 +48,7 @@ limitations under the License.
|
|||||||
patchNum = 1;
|
patchNum = 1;
|
||||||
|
|
||||||
stub('gr-rest-api-interface', {
|
stub('gr-rest-api-interface', {
|
||||||
|
getConfig: function() { return Promise.resolve({}); },
|
||||||
getAccount: function() { return Promise.resolve({}); },
|
getAccount: function() { return Promise.resolve({}); },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -20,7 +20,6 @@ limitations under the License.
|
|||||||
|
|
||||||
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
|
<script src="../../../bower_components/webcomponentsjs/webcomponents.min.js"></script>
|
||||||
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
||||||
<script src="../../../scripts/util.js"></script>
|
|
||||||
|
|
||||||
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
<link rel="import" href="../../../bower_components/iron-test-helpers/iron-test-helpers.html">
|
||||||
<link rel="import" href="gr-reviewer-list.html">
|
<link rel="import" href="gr-reviewer-list.html">
|
||||||
@@ -40,6 +39,7 @@ limitations under the License.
|
|||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
sandbox = sinon.sandbox.create();
|
sandbox = sinon.sandbox.create();
|
||||||
stub('gr-rest-api-interface', {
|
stub('gr-rest-api-interface', {
|
||||||
|
getConfig: function() { return Promise.resolve({}); },
|
||||||
removeChangeReviewer: function() {
|
removeChangeReviewer: function() {
|
||||||
return Promise.resolve({ok: true});
|
return Promise.resolve({ok: true});
|
||||||
},
|
},
|
||||||
|
@@ -35,6 +35,9 @@ limitations under the License.
|
|||||||
var element;
|
var element;
|
||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
|
stub('gr-rest-api-interface', {
|
||||||
|
getConfig: function() { return Promise.resolve({}); },
|
||||||
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -35,6 +35,9 @@ limitations under the License.
|
|||||||
var element;
|
var element;
|
||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
|
stub('gr-rest-api-interface', {
|
||||||
|
getConfig: function() { return Promise.resolve({}); },
|
||||||
|
});
|
||||||
stub('gr-main-header', {
|
stub('gr-main-header', {
|
||||||
_loadAccount: function() {},
|
_loadAccount: function() {},
|
||||||
});
|
});
|
||||||
|
@@ -57,6 +57,9 @@ limitations under the License.
|
|||||||
var builder;
|
var builder;
|
||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
|
stub('gr-rest-api-interface', {
|
||||||
|
getLoggedIn: function() { return Promise.resolve(false); },
|
||||||
|
});
|
||||||
var prefs = {
|
var prefs = {
|
||||||
line_length: 10,
|
line_length: 10,
|
||||||
show_tabs: true,
|
show_tabs: true,
|
||||||
@@ -534,7 +537,8 @@ limitations under the License.
|
|||||||
line_length: 10,
|
line_length: 10,
|
||||||
show_tabs: true,
|
show_tabs: true,
|
||||||
tab_size: 4,
|
tab_size: 4,
|
||||||
context: -1
|
context: -1,
|
||||||
|
syntax_highlighting: true,
|
||||||
};
|
};
|
||||||
content = [
|
content = [
|
||||||
{
|
{
|
||||||
@@ -554,9 +558,11 @@ limitations under the License.
|
|||||||
});
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
outputEl = element.queryEffectiveChildren('#diffTable');
|
outputEl = element.queryEffectiveChildren('#diffTable');
|
||||||
element.addEventListener('render', function() {
|
var renderHandler = function() {
|
||||||
|
element.removeEventListener('render', renderHandler);
|
||||||
done();
|
done();
|
||||||
});
|
};
|
||||||
|
element.addEventListener('render', renderHandler);
|
||||||
sinon.stub(element, '_getDiffBuilder', function() {
|
sinon.stub(element, '_getDiffBuilder', function() {
|
||||||
var builder = new GrDiffBuilder(
|
var builder = new GrDiffBuilder(
|
||||||
{content: content}, {left: [], right: []}, prefs, outputEl);
|
{content: content}, {left: [], right: []}, prefs, outputEl);
|
||||||
@@ -614,7 +620,7 @@ limitations under the License.
|
|||||||
assert.strictEqual(sections[1], section[1]);
|
assert.strictEqual(sections[1], section[1]);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('render-start and render are fired', function() {
|
test('render-start and render are fired', function(done) {
|
||||||
var fireStub = sinon.stub(element, 'fire');
|
var fireStub = sinon.stub(element, 'fire');
|
||||||
element.render({left: [], right: []}, {});
|
element.render({left: [], right: []}, {});
|
||||||
flush(function() {
|
flush(function() {
|
||||||
@@ -625,18 +631,24 @@ limitations under the License.
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('rendering normal-sized diff does not disable syntax', function() {
|
test('rendering normal-sized diff does not disable syntax', function() {
|
||||||
flush(function() {
|
|
||||||
assert.isTrue(element.$.syntaxLayer.enabled);
|
assert.isTrue(element.$.syntaxLayer.enabled);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
test('rendering large diff disables syntax', function() {
|
test('rendering large diff disables syntax', function(done) {
|
||||||
// Before it renders, set the first diff line to 500 '*' characters.
|
// Before it renders, set the first diff line to 500 '*' characters.
|
||||||
element.diff.content[0].a = new Array(501).join('*');
|
element.diff.content[0].a = [new Array(501).join('*')];
|
||||||
|
element.addEventListener('render', function() {
|
||||||
flush(function() {
|
|
||||||
assert.isFalse(element.$.syntaxLayer.enabled);
|
assert.isFalse(element.$.syntaxLayer.enabled);
|
||||||
|
done();
|
||||||
});
|
});
|
||||||
|
var prefs = {
|
||||||
|
line_length: 10,
|
||||||
|
show_tabs: true,
|
||||||
|
tab_size: 4,
|
||||||
|
context: -1,
|
||||||
|
syntax_highlighting: true,
|
||||||
|
};
|
||||||
|
element.render({left: [], right: []}, prefs);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -36,7 +36,6 @@ limitations under the License.
|
|||||||
var element;
|
var element;
|
||||||
|
|
||||||
suite('not logged in', function() {
|
suite('not logged in', function() {
|
||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
stub('gr-rest-api-interface', {
|
stub('gr-rest-api-interface', {
|
||||||
getLoggedIn: function() { return Promise.resolve(false); },
|
getLoggedIn: function() { return Promise.resolve(false); },
|
||||||
@@ -340,10 +339,12 @@ limitations under the License.
|
|||||||
});
|
});
|
||||||
|
|
||||||
suite('logged in', function() {
|
suite('logged in', function() {
|
||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
stub('gr-rest-api-interface', {
|
stub('gr-rest-api-interface', {
|
||||||
getLoggedIn: function() { return Promise.resolve(true); },
|
getLoggedIn: function() { return Promise.resolve(true); },
|
||||||
|
getPreferences: function() {
|
||||||
|
return Promise.resolve({time_format: 'HHMM_12'});
|
||||||
|
},
|
||||||
});
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
});
|
});
|
||||||
|
@@ -39,17 +39,21 @@ limitations under the License.
|
|||||||
stub('gr-reporting', {
|
stub('gr-reporting', {
|
||||||
appStarted: sandbox.stub(),
|
appStarted: sandbox.stub(),
|
||||||
});
|
});
|
||||||
var config = {
|
stub('gr-rest-api-interface', {
|
||||||
|
getAccount: function() { return Promise.resolve(null); },
|
||||||
|
getConfig: function() {
|
||||||
|
return Promise.resolve({
|
||||||
gerrit: {web_uis: ['GWT', 'POLYGERRIT']},
|
gerrit: {web_uis: ['GWT', 'POLYGERRIT']},
|
||||||
plugin: {js_resource_paths: []},
|
plugin: {js_resource_paths: []},
|
||||||
};
|
});
|
||||||
stub('gr-rest-api-interface', {
|
},
|
||||||
getConfig: function() { return Promise.resolve(config); },
|
getVersion: function() { return Promise.resolve(42); },
|
||||||
});
|
});
|
||||||
|
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
flush(done);
|
flush(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
teardown(function() {
|
teardown(function() {
|
||||||
sandbox.restore();
|
sandbox.restore();
|
||||||
});
|
});
|
||||||
@@ -58,28 +62,31 @@ limitations under the License.
|
|||||||
assert.isTrue(element.$.reporting.appStarted.calledOnce);
|
assert.isTrue(element.$.reporting.appStarted.calledOnce);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('location change updates gwt footer', function() {
|
test('location change updates gwt footer', function(done) {
|
||||||
element._path = '/test/path';
|
element._path = '/test/path';
|
||||||
|
flush(function() {
|
||||||
var gwtLink = element.$$('#gwtLink');
|
var gwtLink = element.$$('#gwtLink');
|
||||||
assert.equal(gwtLink.href,
|
assert.equal(gwtLink.href,
|
||||||
'http://' + location.host + '/?polygerrit=0#/test/path');
|
'http://' + location.host + '/?polygerrit=0#/test/path');
|
||||||
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('_handleLocationChange handles hashes', function() {
|
test('_handleLocationChange handles hashes', function(done) {
|
||||||
var curLocation = {
|
var curLocation = {
|
||||||
pathname: '/c/1/1/testfile.txt',
|
pathname: '/c/1/1/testfile.txt',
|
||||||
hash: '#2',
|
hash: '#2',
|
||||||
host: location.host,
|
host: location.host,
|
||||||
};
|
};
|
||||||
|
sandbox.stub(element, '_handleSearchPageChange');
|
||||||
|
element._handleLocationChange({detail: curLocation});
|
||||||
|
|
||||||
var event = {detail: curLocation};
|
flush(function() {
|
||||||
var gwtLink = element.$$('#gwtLink');
|
var gwtLink = element.$$('#gwtLink');
|
||||||
|
|
||||||
sinon.stub(element, '_handleSearchPageChange');
|
|
||||||
|
|
||||||
element._handleLocationChange(event);
|
|
||||||
assert.equal(gwtLink.href,
|
assert.equal(gwtLink.href,
|
||||||
'http://' + location.host + '/?polygerrit=0#/c/1/1/testfile.txt@2');
|
'http://' + location.host + '/?polygerrit=0#/c/1/1/testfile.txt@2');
|
||||||
|
done();
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
test('sets plugins count', function() {
|
test('sets plugins count', function() {
|
||||||
|
@@ -35,6 +35,10 @@ limitations under the License.
|
|||||||
var element;
|
var element;
|
||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
|
stub('gr-rest-api-interface', {
|
||||||
|
getConfig: function() { return Promise.resolve({}); },
|
||||||
|
getLoggedIn: function() { return Promise.resolve(false); },
|
||||||
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -20,7 +20,6 @@ limitations under the License.
|
|||||||
|
|
||||||
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
|
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
|
||||||
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
<script src="../../../bower_components/web-component-tester/browser.js"></script>
|
||||||
<script src="../../../scripts/util.js"></script>
|
|
||||||
|
|
||||||
<link rel="import" href="gr-account-link.html">
|
<link rel="import" href="gr-account-link.html">
|
||||||
|
|
||||||
@@ -35,6 +34,9 @@ limitations under the License.
|
|||||||
var element;
|
var element;
|
||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
|
stub('gr-rest-api-interface', {
|
||||||
|
getConfig: function() { return Promise.resolve({}); },
|
||||||
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -34,6 +34,9 @@ limitations under the License.
|
|||||||
var element;
|
var element;
|
||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
|
stub('gr-rest-api-interface', {
|
||||||
|
getConfig: function() { return Promise.resolve({}); },
|
||||||
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -42,6 +42,7 @@ breaking changes to gr-reply-dialog won’t be noticed.
|
|||||||
|
|
||||||
setup(function() {
|
setup(function() {
|
||||||
stub('gr-rest-api-interface', {
|
stub('gr-rest-api-interface', {
|
||||||
|
getConfig: function() { return Promise.resolve({}); },
|
||||||
getAccount: function() { return Promise.resolve(null); },
|
getAccount: function() { return Promise.resolve(null); },
|
||||||
});
|
});
|
||||||
element = fixture('basic');
|
element = fixture('basic');
|
||||||
|
Reference in New Issue
Block a user