-
Notifications
You must be signed in to change notification settings - Fork 8
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
tests: Update selectors for "Add detour" dropdown in tests #2718
tests: Update selectors for "Add detour" dropdown in tests #2718
Conversation
Coverage of commit
|
@@ -557,11 +557,11 @@ describe("LadderPage", () => { | |||
expect(container.querySelector(".c-route-ladder__header")).toBeVisible() | |||
|
|||
expect( | |||
container.querySelector(".c-route-ladder__dropdown-button") | |||
screen.getByRole("button", { name: "1 Route Options" }) |
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.
note/nit(non-blocking): btw, I think this expect().toBeVisible()
is redundant? I'd want to check, but I'm fairly certain you can't use screen.getBy
to get hidden elements without passing the { hidden: true }
option, and it'll stop the test if it can't find it. So both asserts that it's visible and clicks it.
await userEvent.click(
screen.getByRole("button", { name: "1 Route Options" })
)
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.
Yeah I was thinking the same thing, but at the time I didn't want to unilaterally get rid of it.
Now it won't be unilateral!
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.
looks good, left one note1 that I don't think will change anything, but in case you do want to, I disabled automerge. Feel free to ignore.
Footnotes
Coverage of commit
|
Context: #2647 (comment). At the time, #2657 hadn't been merged yet, so this couldn't be done, but that's no longer the case.
Asana Ticket: https://app.asana.com/0/1205718271156548/1207533417539273/f