- Notifications
You must be signed in to change notification settings - Fork1.1k
fix: clear prompt after task creation#20344
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Changes make sense to me. Just had one suggestion if we can get it to work
| awaitstep("Clears prompt",async()=>{ | ||
| constprompt=awaitcanvas.findByLabelText(/prompt/i); | ||
| expect(prompt).toHaveValue(""); | ||
| }); |
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.
Are we able to use a role selector here? Maybe something like:
constprompt=awaitcanvas.findByRole("textbox",{name:/prompt/i,});
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 it’s more accessible in this case to rely on the label, since that’s what both screen readers and users interact with. For example, when we get an element by role, we’re not checking whether it actually has an accessible label.
By getting an element by label, I don’t really care what type of element it is, because I can still perform the action I need.
Makes sense?
09a41f3 intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Fix#20255