diff --git a/client/components/Events/EventDateTime.tsx b/client/components/Events/EventDateTime.tsx index 0ae46d122..e61e70b0d 100644 --- a/client/components/Events/EventDateTime.tsx +++ b/client/components/Events/EventDateTime.tsx @@ -82,6 +82,7 @@ export class EventDateTime extends React.PureComponent { date={start} {...commonProps} withTime={false} + testId="event-start-date" /> )} {gettext('All day')} @@ -95,9 +96,11 @@ export class EventDateTime extends React.PureComponent { )} {showDash && <>–} @@ -106,6 +109,7 @@ export class EventDateTime extends React.PureComponent { withYear={withYear} isEndEventDateTime={true} date={end} + testId="event-end-date" {...commonProps} /> {isRemoteTimeZone && ( diff --git a/client/components/Events/EventDateTimeColumn.tsx b/client/components/Events/EventDateTimeColumn.tsx index 0e63fa10c..fc342a56f 100644 --- a/client/components/Events/EventDateTimeColumn.tsx +++ b/client/components/Events/EventDateTimeColumn.tsx @@ -52,6 +52,7 @@ export class EventDateTimeColumn extends React.PureComponent { withYear={!isThisYear} withTime={false} date={start} + testId="event-start-date" {...commonProps} /> {!multiDay ? null : ( @@ -62,13 +63,14 @@ export class EventDateTimeColumn extends React.PureComponent { withYear={!isThisYear} withTime={false} date={end} + testId="event-end-date" {...commonProps} /> )} {!isRemoteTimeZone ? null : ( ( - + {tzCode} ) @@ -85,6 +87,7 @@ export class EventDateTimeColumn extends React.PureComponent { withDate={false} withYear={false} date={start} + testId="event-start-date" {...commonProps} /> – @@ -92,6 +95,7 @@ export class EventDateTimeColumn extends React.PureComponent { withDate={false} withYear={false} date={end} + testId="event-end-date" {...commonProps} /> diff --git a/client/components/UI/DateTime.tsx b/client/components/UI/DateTime.tsx index 9c279a45c..f3065a2c7 100644 --- a/client/components/UI/DateTime.tsx +++ b/client/components/UI/DateTime.tsx @@ -19,6 +19,7 @@ interface IPropsDateTime { isEndEventDateTime?: boolean, noEndTime?: boolean, multiDay?: boolean, + testId?: string, } /** @@ -37,6 +38,7 @@ function DateTime({ isEndEventDateTime, noEndTime, multiDay, + testId, }: IPropsDateTime) { const {gettext} = superdeskApi.localization; const dateFormat = appConfig.planning.dateformat; @@ -78,7 +80,7 @@ function DateTime({ const tz = timeUtils.getTimeZoneAbbreviation(date.format('z')) + ' '; return ( -