Skip to content
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

Merged

Conversation

joshlarson
Copy link
Contributor

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

@joshlarson joshlarson requested a review from a team as a code owner July 31, 2024 15:51
Copy link

Coverage of commit 0d57d68

Summary coverage rate:
  lines......: 93.1% (3319 of 3566 lines)
  functions..: 72.6% (1357 of 1870 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

@joshlarson joshlarson enabled auto-merge (squash) July 31, 2024 16:06
@@ -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" })
Copy link
Member

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" })
    )

Copy link
Contributor Author

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@firestack firestack disabled auto-merge August 1, 2024 13:10
Copy link
Member

@firestack firestack left a 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

  1. https://github.com/mbta/skate/pull/2718#discussion_r1700119216

@joshlarson joshlarson enabled auto-merge (squash) August 1, 2024 14:39
@joshlarson joshlarson merged commit 67f92d6 into main Aug 1, 2024
21 checks passed
@joshlarson joshlarson deleted the jdl/tests/update-selectors-for-route-ladder-dropdown branch August 1, 2024 14:41
Copy link

github-actions bot commented Aug 1, 2024

Coverage of commit 3467f98

Summary coverage rate:
  lines......: 93.1% (3319 of 3566 lines)
  functions..: 72.6% (1357 of 1870 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants