Feature #13683
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>
export const formatDate = (isoDate: string) => {
const date = new Date(isoDate);
export const formatDate = (isoDate: string) => {
const date = new Date(isoDate);
- return date.toLocaleString();
+ const text = date.toLocaleString();
+ return text === 'Invalid Date' ? "" : text;
};
export const formatFileSize = (size?: number) => {
};
export const formatFileSize = (size?: number) => {
columns={[{ name: "Column 1", render: jest.fn(), selected: true }]} />);
expect(dataExplorer.find(ContextMenu).prop("actions")).toEqual([]);
dataExplorer.find(DataTable).prop("onRowContextMenu")({
columns={[{ name: "Column 1", render: jest.fn(), selected: true }]} />);
expect(dataExplorer.find(ContextMenu).prop("actions")).toEqual([]);
dataExplorer.find(DataTable).prop("onRowContextMenu")({
- preventDefault: jest.fn()
+ preventDefault: jest.fn(),
+ stopPropagation: jest.fn()
}, "Item 1");
dataExplorer.find(ContextMenu).prop("onActionClick")({ name: "Action 1", icon: "" });
expect(onContextAction).toHaveBeenCalledWith({ name: "Action 1", icon: "" }, "Item 1");
}, "Item 1");
dataExplorer.find(ContextMenu).prop("onActionClick")({ name: "Action 1", icon: "" });
expect(onContextAction).toHaveBeenCalledWith({ name: "Action 1", icon: "" }, "Item 1");
PROJECT = "project",
COLLECTION = "collection",
PIPELINE = "pipeline",
PROJECT = "project",
COLLECTION = "collection",
PIPELINE = "pipeline",
name: "..",
url: getResourceUrl(treeItem.data),
kind: ResourceKind.LEVEL_UP,
name: "..",
url: getResourceUrl(treeItem.data),
kind: ResourceKind.LEVEL_UP,
- owner: treeItem.data.ownerUuid,
uuid: treeItem.data.uuid,
uuid: treeItem.data.uuid,
- lastModified: treeItem.data.modifiedAt
});
if (treeItem.items) {
});
if (treeItem.items) {