-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: useFiles to prevent unnecessary calls to the use case
- Loading branch information
Showing
6 changed files
with
63 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...s/component/sections/dataset/dataset-files/files-table/files-info/FileInfoHeader.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { FileInfoHeader } from '../../../../../../../src/sections/dataset/dataset-files/files-table/file-info/FileInfoHeader' | ||
|
||
describe('FileInfoHeader', () => { | ||
it('renders the file info header', () => { | ||
cy.customMount(<FileInfoHeader pageCount={1} pageIndex={0} pageSize={100} />) | ||
|
||
cy.findByText('1 to 100 of 100 Files').should('exist') | ||
}) | ||
|
||
it('does not render the file info header when there are no files', () => { | ||
cy.customMount(<FileInfoHeader pageCount={0} pageIndex={0} pageSize={100} />) | ||
|
||
cy.findByText('1 to 100 of 100 Files').should('not.exist') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters