Skip to content

Commit

Permalink
datafile previewer, table test update
Browse files Browse the repository at this point in the history
  • Loading branch information
akintomiwa committed Aug 20, 2024
1 parent 6fb7593 commit 3e85a7b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ describe('DatafilePreviewer', () => {
expect(screen.getByText(mockDatafile.location)).toBeInTheDocument();
// formatted size of the datafile
expect(screen.getByText('100 B')).toBeInTheDocument();
expect(screen.getByText(mockDatafile.modTime)).toBeInTheDocument();
expect(screen.getByText(mockDatafile.createTime)).toBeInTheDocument();
expect(screen.getByText(mockDatafile.datafileModTime)).toBeInTheDocument();
expect(screen.getByText(mockDatafile.datafileCreateTime)).toBeInTheDocument();
});

it('should show the current progress of downloading datafile content', async () => {
Expand Down Expand Up @@ -227,8 +227,8 @@ describe('DatafilePreviewer', () => {
expect(screen.getByText(mockDatafile.location)).toBeInTheDocument();
// formatted size of the datafile
expect(screen.getByText('100 B')).toBeInTheDocument();
expect(screen.getByText(mockDatafile.modTime)).toBeInTheDocument();
expect(screen.getByText(mockDatafile.createTime)).toBeInTheDocument();
expect(screen.getByText(mockDatafile.datafileModTime)).toBeInTheDocument();
expect(screen.getByText(mockDatafile.datafileCreateTime)).toBeInTheDocument();
});

it('should show a message saying the datafile cannot be previewed if the datafile extension is not supported', async () => {
Expand Down Expand Up @@ -260,9 +260,9 @@ describe('DatafilePreviewer', () => {
expect(screen.getByText(unsupportedDatafile.location)).toBeInTheDocument();
// formatted size of the datafile
expect(screen.getByText('100 B')).toBeInTheDocument();
expect(screen.getByText(unsupportedDatafile.modTime)).toBeInTheDocument();
expect(screen.getByText(unsupportedDatafile.datafileModTime)).toBeInTheDocument();
expect(
screen.getByText(unsupportedDatafile.createTime)
screen.getByText(unsupportedDatafile.datafileCreateTime)
).toBeInTheDocument();
});

Expand Down Expand Up @@ -295,9 +295,9 @@ describe('DatafilePreviewer', () => {
expect(screen.getByText(unsupportedDatafile.location)).toBeInTheDocument();
// formatted size of the datafile
expect(screen.getByText('100 B')).toBeInTheDocument();
expect(screen.getByText(unsupportedDatafile.modTime)).toBeInTheDocument();
expect(screen.getByText(unsupportedDatafile.datafileModTime)).toBeInTheDocument();
expect(
screen.getByText(unsupportedDatafile.createTime)
screen.getByText(unsupportedDatafile.datafileCreateTime)
).toBeInTheDocument();
});

Expand Down Expand Up @@ -328,8 +328,8 @@ describe('DatafilePreviewer', () => {
expect(screen.getByText(mockDatafile.location)).toBeInTheDocument();
// formatted size of the datafile
expect(screen.getByText('100 B')).toBeInTheDocument();
expect(screen.getByText(mockDatafile.modTime)).toBeInTheDocument();
expect(screen.getByText(mockDatafile.createTime)).toBeInTheDocument();
expect(screen.getByText(mockDatafile.datafileModTime)).toBeInTheDocument();
expect(screen.getByText(mockDatafile.datafileCreateTime)).toBeInTheDocument();
});

it('hides the details pane when it is switched off', async () => {
Expand All @@ -353,8 +353,8 @@ describe('DatafilePreviewer', () => {
expect(screen.queryByText(mockDatafile.location)).toBeNull();
// formatted size of the datafile
expect(screen.queryByText('100 B')).toBeNull();
expect(screen.queryByText(mockDatafile.modTime)).toBeNull();
expect(screen.queryByText(mockDatafile.createTime)).toBeNull();
expect(screen.queryByText(mockDatafile.datafileModTime)).toBeNull();
expect(screen.queryByText(mockDatafile.datafileCreateTime)).toBeNull();
});
});

Expand Down Expand Up @@ -385,8 +385,8 @@ describe('DatafilePreviewer', () => {
expect(screen.getByText(mockDatafile.location)).toBeInTheDocument();
// formatted size of the datafile
expect(screen.getByText('100 B')).toBeInTheDocument();
expect(screen.getByText(mockDatafile.modTime)).toBeInTheDocument();
expect(screen.getByText(mockDatafile.createTime)).toBeInTheDocument();
expect(screen.getByText(mockDatafile.datafileModTime)).toBeInTheDocument();
expect(screen.getByText(mockDatafile.datafileCreateTime)).toBeInTheDocument();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ describe('Datafile table component', () => {
name: 'Test 1',
location: '/test1',
fileSize: 1,
modTime: '2019-07-23',
createTime: '2019-07-23',
datafileModTime: '2019-07-23',
datafileCreateTime: '2019-07-23',
},
];
history = createMemoryHistory();
Expand Down Expand Up @@ -243,7 +243,7 @@ describe('Datafile table component', () => {

expect(history.length).toBe(2);
expect(history.location.search).toBe(
`?filters=${encodeURIComponent('{"modTime":{"endDate":"2019-08-06"}}')}`
`?filters=${encodeURIComponent('{"datafileModTime":{"endDate":"2019-08-06"}}')}`
);

// await user.clear(filterInput);
Expand Down

0 comments on commit 3e85a7b

Please sign in to comment.