Commit 6d61940d authored by Thomas Randolph's avatar Thomas Randolph

Test that the pagination is removed when there's only one file

parent 95c73312
...@@ -865,6 +865,15 @@ describe('diffs/components/app', () => { ...@@ -865,6 +865,15 @@ describe('diffs/components/app', () => {
expect(paginator().attributes('nextpage')).toBe(undefined); expect(paginator().attributes('nextpage')).toBe(undefined);
}); });
it("doesn't display when there's fewer than 2 files", () => {
createComponent({ viewDiffsFileByFile: true }, ({ state }) => {
state.diffs.diffFiles.push({ file_hash: '123' });
state.diffs.currentDiffFileId = '123';
});
expect(fileByFileNav().exists()).toBe(false);
});
it.each` it.each`
currentDiffFileId | targetFile currentDiffFileId | targetFile
${'123'} | ${2} ${'123'} | ${2}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment