Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not filter the list of uploads to exclude zero-case uploads. #1959

Merged
merged 1 commit into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ describe('Uploads table', function () {
]);
cy.visit('/uploads');
cy.contains('www.example.com');
cy.get('td[value="New source"]').should('have.length', 3);
cy.get('td[value="New source"]').should('have.length', 4);
cy.contains('5ef8e943dfe6e00030892d58');
cy.contains('2020-01-01');
cy.contains('IN_PROGRESS');
cy.contains('5');
cy.contains('3');
cy.contains('5ef8e943dfe6e00030892d59');
cy.contains('2020-01-02');
cy.get('td[value="SUCCESS"]').should('have.length', 2);
cy.get('td[value="SUCCESS"]').should('have.length', 3);
cy.contains('2');
cy.get('td[value=0]').should('have.length', 2);
cy.get('td[value=0]').should('have.length', 4);
cy.contains('5ef8e943dfe6e00030892d60');
cy.contains('2020-01-03');
cy.contains('4');
cy.contains('5ef8e943dfe6e00030892d61').should('not.exist');
cy.contains('2020-01-04').should('not.exist');
cy.contains('5ef8e943dfe6e00030892d61');
cy.contains('2020-01-04');
});

it('can navigate to filtered linelist', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ it('loads and displays uploads', async () => {
// Verify backend calls.
expect(mockedAxios.get).toHaveBeenCalledTimes(1);
expect(mockedAxios.get).toHaveBeenCalledWith(
'/api/sources/uploads?limit=10&page=1&changes_only=true',
'/api/sources/uploads?limit=10&page=1&changes_only=false',
);

// Verify display content.
Expand All @@ -74,7 +74,7 @@ it('API errors are displayed', async () => {
);
expect(mockedAxios.get).toHaveBeenCalledTimes(1);
expect(mockedAxios.get).toHaveBeenCalledWith(
'/api/sources/uploads?limit=10&page=1&changes_only=true',
'/api/sources/uploads?limit=10&page=1&changes_only=false',
);

expect(await findByText('Error: Request failed')).toBeInTheDocument();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class UploadsTable extends React.Component<Props, UploadsTableState> {
let listUrl = this.state.url;
listUrl += '?limit=' + this.state.pageSize;
listUrl += '&page=' + (query.page + 1);
listUrl += '&changes_only=true';
listUrl += '&changes_only=false';
this.setState({ error: '' });
const response = axios.get<ListUploadsResponse>(
listUrl,
Expand Down