Commit 69399a47 authored by Justin Boyson's avatar Justin Boyson Committed by Mike Greiling

Update batch diffs page size

As per @oswaldo page size should be 20 not 10.
parent 27ec6427
...@@ -57,4 +57,4 @@ export const MIN_RENDERING_MS = 2; ...@@ -57,4 +57,4 @@ export const MIN_RENDERING_MS = 2;
export const START_RENDERING_INDEX = 200; export const START_RENDERING_INDEX = 200;
export const INLINE_DIFF_LINES_KEY = 'highlighted_diff_lines'; export const INLINE_DIFF_LINES_KEY = 'highlighted_diff_lines';
export const PARALLEL_DIFF_LINES_KEY = 'parallel_diff_lines'; export const PARALLEL_DIFF_LINES_KEY = 'parallel_diff_lines';
export const DIFFS_PER_PAGE = 10; export const DIFFS_PER_PAGE = 20;
...@@ -5,6 +5,7 @@ import { ...@@ -5,6 +5,7 @@ import {
DIFF_VIEW_COOKIE_NAME, DIFF_VIEW_COOKIE_NAME,
INLINE_DIFF_VIEW_TYPE, INLINE_DIFF_VIEW_TYPE,
PARALLEL_DIFF_VIEW_TYPE, PARALLEL_DIFF_VIEW_TYPE,
DIFFS_PER_PAGE,
} from '~/diffs/constants'; } from '~/diffs/constants';
import actions, { import actions, {
setBaseConfig, setBaseConfig,
...@@ -144,10 +145,11 @@ describe('DiffsStoreActions', () => { ...@@ -144,10 +145,11 @@ describe('DiffsStoreActions', () => {
}); });
describe('fetchDiffFilesBatch', () => { describe('fetchDiffFilesBatch', () => {
it('should fetch batch diff files', done => { // eslint-disable-next-line jasmine/no-focused-tests
fit('should fetch batch diff files', done => {
const endpointBatch = '/fetch/diffs_batch'; const endpointBatch = '/fetch/diffs_batch';
const batch1 = `${endpointBatch}?per_page=10`; const batch1 = `${endpointBatch}?per_page=${DIFFS_PER_PAGE}`;
const batch2 = `${endpointBatch}?per_page=10&page=2`; const batch2 = `${endpointBatch}?per_page=${DIFFS_PER_PAGE}&page=2`;
const mock = new MockAdapter(axios); const mock = new MockAdapter(axios);
const res1 = { diff_files: [], pagination: { next_page: 2 } }; const res1 = { diff_files: [], pagination: { next_page: 2 } };
const res2 = { diff_files: [], pagination: {} }; const res2 = { diff_files: [], pagination: {} };
......
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