Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ddfform 559 tests pa abningstider testning af redigering af abningstider #1102

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/apps/opening-hours-editor/DialogFormEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const DialogFormEdit: React.FC<DialogFormEditProps> = ({
openingHoursCategories={openingHoursCategories}
>
<button
data-cy="opening-hours-editor-form__remove"
className="opening-hours-editor-form__remove"
type="button"
tabIndex={0}
Expand Down
10 changes: 9 additions & 1 deletion src/apps/opening-hours-editor/EventForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,19 @@ const EventForm: React.FC<EventFormProps> = ({
};

return (
<form onSubmit={handleSubmit} className="opening-hours-editor-form">
<form
onSubmit={handleSubmit}
className="opening-hours-editor-form"
data-cy="opening-hours-editor-form"
>
<label
className="opening-hours-editor-form__label"
htmlFor="event-form-title"
>
{t("openingHoursEventFormTitleText")}
</label>
<select
data-cy="opening-hours-editor-form-select"
className="opening-hours-editor-form__select"
id="event-form-title"
value={category?.title}
Expand All @@ -84,6 +89,7 @@ const EventForm: React.FC<EventFormProps> = ({
{t("openingHoursEventFormStartTimeText")}
</label>
<input
data-cy="opening-hours-editor-form-start-time"
className="opening-hours-editor-form__time-input"
id="event-form-start-time"
type="time"
Expand All @@ -97,6 +103,7 @@ const EventForm: React.FC<EventFormProps> = ({
{t("openingHoursEventFormEndTimeText")}
</label>
<input
data-cy="opening-hours-editor-form-end-time"
className="opening-hours-editor-form__time-input"
id="event-form-end-time"
type="time"
Expand All @@ -107,6 +114,7 @@ const EventForm: React.FC<EventFormProps> = ({
/>
{children}
<button
data-cy="opening-hours-editor-form-submit"
type="submit"
className="opening-hours-editor-form__submit"
disabled={isSameTime}
Expand Down
2 changes: 1 addition & 1 deletion src/apps/opening-hours-editor/OpeningHoursEditor.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import serviceUrlArgs from "../../core/storybook/serviceUrlArgs";
import OpeningHoursEditor from "./OpeningHoursEditor.entry";

export default {
title: "Apps / OpeningHoursEditor",
title: "Apps / Opening Hours Editor",
component: OpeningHoursEditor,
argTypes: {
...serviceUrlArgs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ const OpeningHoursEditorEventContent: React.FC<
> = ({ eventInput }) => {
const { event } = eventInput;
return (
<div className="opening-hours-editor-event-content">
<div
className="opening-hours-editor-event-content"
data-cy="opening-hours-editor-event-content"
>
<b>{event.title}</b>
<div>
{extractTime(event.start)} - {extractTime(event.end)}
Expand Down
Loading