Make file list test slightly smaller
We were running into the 5s limit on CI with 500 files. Test should
be fine also with just 250 files.
Release-Notes: skip
Change-Id: Icd6c350d9e55b0f028d63f0ce617f85383ec30e4
diff --git a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.ts b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.ts
index 76335cb..a7d9e28 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.ts
@@ -342,8 +342,8 @@
});
test('correct number of files are shown', async () => {
- element.fileListIncrement = 300;
- element.files = createFiles(500);
+ element.fileListIncrement = 100;
+ element.files = createFiles(250);
await element.updateComplete;
await waitEventLoop();
@@ -358,19 +358,19 @@
element,
'#incrementButton'
).textContent!.trim(),
- 'Show 300 more'
+ 'Show 50 more'
);
assert.equal(
queryAndAssert<GrButton>(element, '#showAllButton').textContent!.trim(),
- 'Show all 500 files'
+ 'Show all 250 files'
);
queryAndAssert<GrButton>(element, '#showAllButton').click();
await element.updateComplete;
await waitEventLoop();
- assert.equal(element.numFilesShown, 500);
- assert.equal(element.shownFiles.length, 500);
+ assert.equal(element.numFilesShown, 250);
+ assert.equal(element.shownFiles.length, 250);
assert.isTrue(controlRow.classList.contains('invisible'));
});