-
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: show strings for creationDate and publicationDate
- Loading branch information
1 parent
6279d01
commit 2f65c6e
Showing
9 changed files
with
35 additions
and
61 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
6 changes: 1 addition & 5 deletions
6
...ns/dataset/dataset-files/files-table/file-info/file-info-cell/file-info-data/FileDate.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
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
6 changes: 2 additions & 4 deletions
6
...aset/dataset-files/files-table/files-info/file-info-cell/file-info-data/FileDate.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 |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import { FileDate } from '../../../../../../../../../src/sections/dataset/dataset-files/files-table/file-info/file-info-cell/file-info-data/FileDate' | ||
import { FileDateType } from '../../../../../../../../../src/files/domain/models/FileMetadata' | ||
import { DateHelper } from '../../../../../../../../../src/shared/helpers/DateHelper' | ||
|
||
describe('FileDate', () => { | ||
it('renders the date', () => { | ||
const fileDate = new Date('2023-09-18') | ||
const fileDate = '2023-09-18' | ||
const date = { type: FileDateType.PUBLISHED, date: fileDate } | ||
cy.customMount(<FileDate date={date} />) | ||
const dateString = DateHelper.toDisplayFileFormat(fileDate) | ||
cy.findByText(`Published`).should('exist') | ||
cy.get('time').should('have.text', dateString) | ||
cy.get('time').should('have.text', fileDate) | ||
}) | ||
}) |
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