-
Other accounts
-
- {otherAccounts.map((profile) => (
-
- ))}
-
+
+ {otherAccounts.map((profile) => (
+
+ ))}
) : null}
-
-
Actions
-
- {/*
*/}
-
-
+
+
+
);
diff --git a/packages/ui/src/IntervalCard/BookingCardContainer.tsx b/packages/ui/src/IntervalCard/BookingCardContainer.tsx
index 2d57e7dd8..6fe6666f7 100644
--- a/packages/ui/src/IntervalCard/BookingCardContainer.tsx
+++ b/packages/ui/src/IntervalCard/BookingCardContainer.tsx
@@ -1,6 +1,7 @@
import React from "react";
import { SlotType } from "@eisbuk/shared";
+import { testId } from "@eisbuk/testing/testIds";
import {
BookingContainerProps,
@@ -25,7 +26,11 @@ const BookingCardContainer: React.FC
= ({
classes,
].join(" ");
- return React.createElement(as, { className }, children);
+ return React.createElement(
+ as,
+ { className, "data-testid": testId("booking-interval-card") },
+ children
+ );
};
const containerSizeLookup = {
diff --git a/packages/ui/src/IntervalCard/CalendarCardContainer.tsx b/packages/ui/src/IntervalCard/CalendarCardContainer.tsx
index 24ba69ede..5810b4720 100644
--- a/packages/ui/src/IntervalCard/CalendarCardContainer.tsx
+++ b/packages/ui/src/IntervalCard/CalendarCardContainer.tsx
@@ -3,6 +3,7 @@ import React, { useState } from "react";
import { SlotType } from "@eisbuk/shared";
import { CalendarContainerProps, CalendarContainerInnerProps } from "./types";
+import { testId } from "@eisbuk/testing/testIds";
// #region innerContainer
export const CalendarCardExpandableContainer: React.FC<
@@ -84,6 +85,10 @@ export const CalendarCardContainerInner: React.FC<
classes,
].join(" ");
- return React.createElement(as, { className }, children);
+ return React.createElement(
+ as,
+ { className, "data-testid": testId("booking-calendar-card") },
+ children
+ );
};
// #endregion innerContainer
diff --git a/packages/ui/src/IntervalCard/CardContent.tsx b/packages/ui/src/IntervalCard/CardContent.tsx
index 21bc6fbc7..ada137d99 100644
--- a/packages/ui/src/IntervalCard/CardContent.tsx
+++ b/packages/ui/src/IntervalCard/CardContent.tsx
@@ -2,6 +2,7 @@ import React from "react";
import { DateTime } from "luxon";
import { useTranslation, DateFormat } from "@eisbuk/translations";
+import { getIntervalString } from "@eisbuk/shared/ui";
import { IntervalDuration, IntervalCardVariant } from "./types";
@@ -18,7 +19,7 @@ interface Props {
}
const CardContent: React.FC = ({
- interval: { startTime, endTime },
+ interval,
date: dateISO,
variant = IntervalCardVariant.Booking,
type,
@@ -27,6 +28,7 @@ const CardContent: React.FC = ({
const { t } = useTranslation();
const date = DateTime.fromISO(dateISO);
+ const { startTime, endTime } = interval;
const duration = calculateDuration(startTime, endTime);
const dateString = (
@@ -36,7 +38,7 @@ const CardContent: React.FC = ({
);
const timestring = (
- {[startTime, endTime].join(" - ")}
+ {getIntervalString(interval)}
);
const notesElement = (
diff --git a/packages/ui/src/SlotsDayContainer/SlotsDayContainer.tsx b/packages/ui/src/SlotsDayContainer/SlotsDayContainer.tsx
index ca92150d2..9ca3669d7 100644
--- a/packages/ui/src/SlotsDayContainer/SlotsDayContainer.tsx
+++ b/packages/ui/src/SlotsDayContainer/SlotsDayContainer.tsx
@@ -1,6 +1,8 @@
import React from "react";
import { DateTime } from "luxon";
+import { testId } from "@eisbuk/testing/testIds";
+
import i18n, { DateFormat } from "@eisbuk/translations";
interface SlotsDayContainerProps {
@@ -28,7 +30,11 @@ const SlotsDayConatiner: React.FC = ({
];
return (
-
+
{dateString}
@@ -37,7 +43,10 @@ const SlotsDayConatiner: React.FC = ({
{additionalContent}
-