Increase initial number of files shown to 200

Also, set fileListIncrement from the same value as numFilesShown to
futureproof- don't want one to get modified without the other.

Bug: Issue 5877
Change-Id: Idbbb9a694d9c203489454299309fd4cec31a00bd
This commit is contained in:
Becky Siegel
2017-04-14 18:48:37 -07:00
parent 4964cfff01
commit ca48a6fc8f
5 changed files with 20 additions and 14 deletions

View File

@@ -60,7 +60,7 @@ limitations under the License.
reload: function() { return Promise.resolve(); },
});
element = fixture('basic');
element.numFilesShown = 75;
element.numFilesShown = 200;
saveStub = sandbox.stub(element, '_saveReviewedState',
function() { return Promise.resolve(); });
});
@@ -69,6 +69,15 @@ limitations under the License.
sandbox.restore();
});
test('correct number of files are shown', function() {
element._files = _.times(500, function(i) {
return {__path: '/file' + i, lines_inserted: 9}; });
flushAsynchronousOperations();
assert.equal(
Polymer.dom(element.root).querySelectorAll('.file-row').length,
element.numFilesShown);
});
test('get file list', function(done) {
var getChangeFilesStub = sandbox.stub(element.$.restAPI, 'getChangeFiles',
function() {