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

Make Query.text/2 docs also point to assert_text/{2,3} #770

Merged
merged 2 commits into from
May 7, 2024

Conversation

s3cur3
Copy link
Contributor

@s3cur3 s3cur3 commented May 7, 2024

This beefs up the docs on Query.text/2, which a lot of examples combine with assert_has/2 for asserting that a particular element has some text. Pointing to assert_text/{2,3} from the docs here would have resolved a recent issue Mitch kindly helped me with in Slack where I was trying to assert on the text of multiple nested elements.

s3cur3 added 2 commits May 7, 2024 10:40
This beefs up the docs on `Query.text/2`, which a lot of examples combine with `assert_has/2` for asserting that a particular element has some text. Pointing to `assert_has_text/{2,3}` from the docs here would have resolved a recent issue Mitch kindly helped me with [in Slack](https://elixir-lang.slack.com/archives/C4H1XRC0J/p1715093283885629) where I was trying to assert on the text of multiple nested elements.
@s3cur3 s3cur3 changed the title Make Query.text/2 docs also point to assert_has_text/{2,3} Make Query.text/2 docs also point to assert_text/{2,3} May 7, 2024
Test:

```
assert_has_text(session, "Unread messages: 1 message")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
assert_has_text(session, "Unread messages: 1 message")
assert_text(session, "Unread messages: 1 message")

@mhanberg mhanberg merged commit 1fcfc9c into elixir-wallaby:main May 7, 2024
@s3cur3 s3cur3 deleted the query-text-docs branch May 7, 2024 15:52
alinmarsh pushed a commit to TernSystems/wallaby that referenced this pull request Oct 8, 2024
…y#770)

* Make Query.text/2 docs also point to assert_has_text/{2,3}

This beefs up the docs on `Query.text/2`, which a lot of examples combine with `assert_has/2` for asserting that a particular element has some text. Pointing to `assert_has_text/{2,3}` from the docs here would have resolved a recent issue Mitch kindly helped me with [in Slack](https://elixir-lang.slack.com/archives/C4H1XRC0J/p1715093283885629) where I was trying to assert on the text of multiple nested elements.

* Fix typo in function name
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