-
Notifications
You must be signed in to change notification settings - Fork 1
Cody/change entry name #657
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: develop
Are you sure you want to change the base?
Conversation
|
Gridiron Survivor Application
Project name: Gridiron Survivor Application
Only deployments on the production branch are activated automatically. If you'd like to activate this deployment, navigate to your deployments. Learn more about Appwrite Function deployments.
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| data, | ||
| ): Promise<void> => { | ||
| const { name } = data; | ||
| const entryId: string = entry; |
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.
Why do we need this variable?
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.
We don't, I'll fix it
| fireEvent.click(screen.getByTestId('edit-entry-name-button')); | ||
|
|
||
| const entryNameInput = screen.getByTestId('entry-name-input'); | ||
| const cancelButton = screen.getByLabelText('Cancel Editing'); |
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.
Do not grab elements by text. If the text changes, this test will fail. Instead, add data-testid attribute. This is a unique ID that won't ever change. On top of this, when we add localization, things won't always be in English.
| }); | ||
|
|
||
| const input = screen.getByTestId('entry-name-input'); | ||
| fireEvent.change(input, { target: { value: 'New Entry Name' } }); |
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.
Same here. Add a data-testid.

Closes #634
updateEntryNamefunction to update the Document in DBonSubmitfunction to callupdateEntryNameand update state