Skip to content

Commit

Permalink
feat(AddSleep): default time slept to "00:00"
Browse files Browse the repository at this point in the history
  • Loading branch information
benji6 committed Dec 26, 2023
1 parent aec6582 commit 726e85e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/e2e/sleep.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ describe("sleep", () => {

test("no input", async () => {
await dateAwokeInput.evaluate((el) => (el.value = ""));
await timeSleptInput.evaluate((el) => (el.value = ""));
await submitButton.evaluate((el) => el.click());

const errors = await page.$$('[data-eri-id="field-error"]');
Expand Down
6 changes: 5 additions & 1 deletion client/src/components/pages/Sleep/AddSleep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ export default function AddSleep() {
}}
ref={formRef}
>
<TextField {...FIELDS.timeSlept} error={timeSleptError} />
<TextField
{...FIELDS.timeSlept}
defaultValue="00:00"
error={timeSleptError}
/>
<TextField
{...FIELDS.dateAwoke}
defaultValue={isoDateStringNow}
Expand Down

0 comments on commit 726e85e

Please sign in to comment.