-
Notifications
You must be signed in to change notification settings - Fork 23
todo utils, helpers and specs #387
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
base: main
Are you sure you want to change the base?
todo utils, helpers and specs #387
Conversation
|
Thanks for opening this pull request! 🥳 |
|
@ethanbalgobin is attempting to deploy a commit to the Opcotech Team on Vercel. A member of the Team first needs to authorize it. |
Signed-off-by: Ethan Balgobin <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
gabor-boros
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mostly have minor comments related to formatting and TodoPriority type usage. However, some e2e tests seems to fail (mostly due to duplicated element selector results).
| export * from "./pages"; | ||
| export * from "./permissions"; | ||
| export * from "./toast"; | ||
| export * from "./todo"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| export * from "./todo"; | |
| export * from "./todo"; | |
| await page.getByPlaceholder(/Type a command/i).waitFor(); | ||
| await page.getByRole("option", { name: /Add Todo/i }).click(); | ||
| await page.getByRole("heading", { name: "Add Todo" }).waitFor(); | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | |
| } | |
| } | ||
| await this.submit(); | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | |
| } | |
| async fillTodoFields(fields: { | ||
| title?: string; | ||
| description?: string; | ||
| priority?: "normal" | "important" | "urgent" | "critical"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have a TodoPriority type in the generated client that we could use here.
| async updateTodo(fields: { | ||
| title?: string; | ||
| description?: string; | ||
| priority?: "normal" | "important" | "urgent" | "critical"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the TodoPriority type exists, we could use that here too.
| priority: "important", | ||
| dueDate: tomorrow, | ||
| }; | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | |
| } | |
| // Check for reduced opacity on todo item | ||
| await expect(todoItem).toHaveClass(/opacity-75/); | ||
| }); | ||
| }); No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }); | |
| }); | |
| await waitForSuccessToast(page, "Todo added successfully"); | ||
| expect(await todoSection.getTodoCount()).toBeGreaterThanOrEqual(2); | ||
| }); | ||
| }); No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }); | |
| }); | |
|
|
||
| expect(await todoSection.isOpen()).toBe(true); | ||
| }); | ||
| }); No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }); | |
| }); | |
| const editButton = todoItem.getByTitle("Edit todo"); | ||
| expect(await editButton.isDisabled()).toBe(true); | ||
| }); | ||
| }); No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }); | |
| }); | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gabor-boros Thanks for the feedback, will get these sorted!
Description
This pull request adds end-to-end testing for the TODO list feature.
The test suite covers all core TODO functionality including:
Dependencies
Screenshots
Screenshots if applicable, otherwise omit this section.
Testing instructions
docker-compose up -dChecklist
added
Signed-off-by: <YOUR NAME>to the commit trail where<YOUR NAME>ismy name.