Merge "Fix implicitly declared variables"
This commit is contained in:
@@ -637,7 +637,7 @@ limitations under the License.
|
||||
|
||||
test('_computeAddAndRemove sections', () => {
|
||||
// Add a new permission to a section
|
||||
expectedInput = {
|
||||
let expectedInput = {
|
||||
add: {
|
||||
'refs/*': {
|
||||
permissions: {
|
||||
@@ -742,7 +742,7 @@ limitations under the License.
|
||||
|
||||
test('_computeAddAndRemove new section', () => {
|
||||
// Add a new permission to a section
|
||||
expectedInput = {
|
||||
let expectedInput = {
|
||||
add: {
|
||||
'refs/for/*': {
|
||||
added: true,
|
||||
|
||||
@@ -123,6 +123,7 @@ limitations under the License.
|
||||
});
|
||||
|
||||
suite('filter', () => {
|
||||
let reposFiltered;
|
||||
setup(() => {
|
||||
repos = _.times(25, repoGenerator);
|
||||
reposFiltered = _.times(1, repoGenerator);
|
||||
|
||||
@@ -41,6 +41,7 @@ limitations under the License.
|
||||
let element;
|
||||
let sandbox;
|
||||
let paramsChangedPromise;
|
||||
let getChangesStub;
|
||||
|
||||
setup(() => {
|
||||
stub('gr-rest-api-interface', {
|
||||
|
||||
@@ -1666,7 +1666,6 @@ limitations under the License.
|
||||
.returns(Promise.resolve({revert_changes: [
|
||||
{change_id: 12345},
|
||||
]}));
|
||||
showActionDialogStub = sandbox.stub(element, '_showActionDialog');
|
||||
navigateToSearchQueryStub = sandbox.stub(Gerrit.Nav,
|
||||
'navigateToSearchQuery');
|
||||
});
|
||||
|
||||
@@ -334,7 +334,8 @@ limitations under the License.
|
||||
});
|
||||
});
|
||||
|
||||
getCustomCssValue = cssParam => util.getComputedStyleValue(cssParam, element);
|
||||
const getCustomCssValue =
|
||||
cssParam => util.getComputedStyleValue(cssParam, element);
|
||||
|
||||
test('_handleMessageAnchorTap', () => {
|
||||
element._changeNum = '1';
|
||||
@@ -875,7 +876,7 @@ limitations under the License.
|
||||
},
|
||||
};
|
||||
element._mergeable = true;
|
||||
expectedStatuses = ['Merged', 'WIP'];
|
||||
const expectedStatuses = ['Merged', 'WIP'];
|
||||
assert.deepEqual(element._changeStatuses, expectedStatuses);
|
||||
assert.equal(element._changeStatus, expectedStatuses.join(', '));
|
||||
flushAsynchronousOperations();
|
||||
|
||||
@@ -149,7 +149,6 @@ limitations under the License.
|
||||
// comment API.
|
||||
commentApiWrapper = fixture('basic');
|
||||
element = commentApiWrapper.$.messagesList;
|
||||
loadCommentSpy = sandbox.spy(commentApiWrapper.$.commentAPI, 'loadAll');
|
||||
element.messages = messages;
|
||||
|
||||
// Stub methods on the changeComments object after changeComments has
|
||||
@@ -476,7 +475,7 @@ limitations under the License.
|
||||
// comment API.
|
||||
commentApiWrapper = fixture('basic');
|
||||
element = commentApiWrapper.$.messagesList;
|
||||
loadCommentSpy = sandbox.spy(commentApiWrapper.$.commentAPI, 'loadAll');
|
||||
sandbox.spy(commentApiWrapper.$.commentAPI, 'loadAll');
|
||||
element.messages = messages;
|
||||
|
||||
// Stub methods on the changeComments object after changeComments has
|
||||
@@ -506,7 +505,7 @@ limitations under the License.
|
||||
element._hideAutomated = false;
|
||||
MockInteractions.tap(element.$.automatedMessageToggle);
|
||||
flushAsynchronousOperations();
|
||||
allMessageEls = getMessages();
|
||||
const allMessageEls = getMessages();
|
||||
allHiddenMessageEls = getHiddenMessages();
|
||||
|
||||
// Autogenerated messages are now hidden.
|
||||
|
||||
@@ -62,7 +62,7 @@ limitations under the License.
|
||||
assert.equal(element._inputVal, 'foo');
|
||||
});
|
||||
|
||||
getActiveElement = () => (document.activeElement.shadowRoot ?
|
||||
const getActiveElement = () => (document.activeElement.shadowRoot ?
|
||||
document.activeElement.shadowRoot.activeElement :
|
||||
document.activeElement);
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ limitations under the License.
|
||||
|
||||
suite('annotate', () => {
|
||||
function createLine(lineNumber) {
|
||||
lineEl = document.createElement('div');
|
||||
const lineEl = document.createElement('div');
|
||||
lineEl.setAttribute('data-side', 'right');
|
||||
lineEl.setAttribute('data-value', lineNumber);
|
||||
lineEl.className = 'right';
|
||||
|
||||
@@ -1199,7 +1199,7 @@ limitations under the License.
|
||||
line: 1,
|
||||
}];
|
||||
|
||||
expectedThreads = [
|
||||
const expectedThreads = [
|
||||
{
|
||||
start_datetime: '2015-12-24 15:00:10.396000000',
|
||||
commentSide: 'left',
|
||||
@@ -1297,7 +1297,7 @@ limitations under the License.
|
||||
assert.equal(threads[0].patchNum, 2);
|
||||
|
||||
// Try to fetch a thread with a different range.
|
||||
range = {
|
||||
const range = {
|
||||
start_line: 1,
|
||||
start_character: 1,
|
||||
end_line: 1,
|
||||
|
||||
@@ -472,7 +472,6 @@ limitations under the License.
|
||||
});
|
||||
|
||||
test('_computeCommentString', done => {
|
||||
loadCommentSpy = sandbox.spy(element.$.commentAPI, 'loadAll');
|
||||
const path = '/test';
|
||||
element.$.commentAPI.loadAll().then(comments => {
|
||||
const commentCountStub =
|
||||
@@ -1365,6 +1364,8 @@ limitations under the License.
|
||||
});
|
||||
|
||||
suite('gr-diff-view tests unmodified files with comments', () => {
|
||||
let sandbox;
|
||||
let element;
|
||||
setup(() => {
|
||||
sandbox = sinon.sandbox.create();
|
||||
const changedFiles = {
|
||||
|
||||
@@ -1052,7 +1052,7 @@ limitations under the License.
|
||||
test('`render` event has contentRendered field in detail', done => {
|
||||
element = fixture('basic');
|
||||
element.prefs = {};
|
||||
renderStub = sandbox.stub(element.$.diffBuilder, 'render')
|
||||
sandbox.stub(element.$.diffBuilder, 'render')
|
||||
.returns(Promise.resolve());
|
||||
element.addEventListener('render', event => {
|
||||
assert.isTrue(event.detail.contentRendered);
|
||||
|
||||
@@ -88,7 +88,7 @@ limitations under the License.
|
||||
suite('filter', () => {
|
||||
setup(() => {
|
||||
documentationSearches = _.times(25, documentationGenerator);
|
||||
documentationSearchesFiltered = _.times(1, documentationSearches);
|
||||
_.times(1, documentationSearches);
|
||||
});
|
||||
|
||||
test('_paramsChanged', done => {
|
||||
|
||||
@@ -41,6 +41,7 @@ limitations under the License.
|
||||
suite('gr-account-entry tests', async () => {
|
||||
await readyToTest();
|
||||
let sandbox;
|
||||
let element;
|
||||
|
||||
const suggestion1 = {
|
||||
email: 'email1@example.com',
|
||||
|
||||
@@ -149,7 +149,7 @@ limitations under the License.
|
||||
});
|
||||
|
||||
test('updated suggestions resets cursor stops', () => {
|
||||
resetStopsSpy = sandbox.spy(element, '_resetCursorStops');
|
||||
const resetStopsSpy = sandbox.spy(element, '_resetCursorStops');
|
||||
element.suggestions = [];
|
||||
assert.isTrue(resetStopsSpy.called);
|
||||
});
|
||||
|
||||
@@ -68,7 +68,7 @@ limitations under the License.
|
||||
});
|
||||
|
||||
test('test annotateRange', () => {
|
||||
annotateElementSpy = sandbox.spy(GrAnnotation, 'annotateElement');
|
||||
const annotateElementSpy = sandbox.spy(GrAnnotation, 'annotateElement');
|
||||
const start = 0;
|
||||
const end = 100;
|
||||
const cssStyleObject = plugin.styles().css('background-color: #000000');
|
||||
|
||||
@@ -60,7 +60,7 @@ limitations under the License.
|
||||
test('add/get layer', () => {
|
||||
const str = 'lorem ipsum blah blah';
|
||||
const line = {text: str};
|
||||
el = document.createElement('div');
|
||||
const el = document.createElement('div');
|
||||
el.textContent = str;
|
||||
const changeNum = 1234;
|
||||
const patchNum = 2;
|
||||
@@ -91,6 +91,7 @@ limitations under the License.
|
||||
const layer2Spy = sandbox.spy(annotationLayer2, 'notifyListeners');
|
||||
|
||||
let notify;
|
||||
let notifyFuncCalled;
|
||||
const notifyFunc = n => {
|
||||
notifyFuncCalled = true;
|
||||
notify = n;
|
||||
@@ -119,7 +120,7 @@ limitations under the License.
|
||||
});
|
||||
|
||||
test('toggle checkbox', () => {
|
||||
fakeEl = {content: fixture('basic')};
|
||||
const fakeEl = {content: fixture('basic')};
|
||||
const hookStub = {onAttached: sandbox.stub()};
|
||||
sandbox.stub(plugin, 'hook').returns(hookStub);
|
||||
|
||||
@@ -130,7 +131,7 @@ limitations under the License.
|
||||
onAttachedFuncCalled = true;
|
||||
};
|
||||
annotationActions.enableToggleCheckbox('test label', onAttachedFunc);
|
||||
emulateAttached = () => hookStub.onAttached.callArgWith(0, fakeEl);
|
||||
const emulateAttached = () => hookStub.onAttached.callArgWith(0, fakeEl);
|
||||
emulateAttached();
|
||||
|
||||
// Assert that onAttachedFunc is called and HTML elements have the
|
||||
|
||||
@@ -52,7 +52,7 @@ limitations under the License.
|
||||
a[k] = (...args) => restApiStub[k](...args);
|
||||
return a;
|
||||
}, {}));
|
||||
Gerrit.install(p => { plugin = p; }, '0.1',
|
||||
Gerrit.install(p => {}, '0.1',
|
||||
'http://test.com/plugins/testplugin/static/test.js');
|
||||
instance = new GrPluginRestApi();
|
||||
});
|
||||
|
||||
@@ -100,7 +100,7 @@ limitations under the License.
|
||||
|
||||
test('next button', done => {
|
||||
element.itemsPerPage = 25;
|
||||
projects = new Array(26);
|
||||
let projects = new Array(26);
|
||||
|
||||
flush(() => {
|
||||
let loading;
|
||||
|
||||
Reference in New Issue
Block a user