Skip to content

Update bylabeltext.mdx #865

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

Merged
merged 2 commits into from
Jun 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/queries/bylabeltext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The example below will find the input node for the following DOM structures:
// aria-label attributes
// Take care because this is not a label that users can see on the page,
// so the purpose of your input must be obvious to visual users.
<input aria-label="username" />
<input aria-label="Username" />
```

<Tabs defaultValue="native" values={[ { label: 'Native', value: 'native', }, {
Expand All @@ -71,14 +71,14 @@ import { render, screen } from '@testing-library/react'

render(<Login />)

const inputNode = screen.getByLabelText('username')
const inputNode = screen.getByLabelText('Username')
```

</TabItem>
<TabItem value="cypress">

```js
cy.findByLabelText('username').should('exist')
cy.findByLabelText('Username').should('exist')
```

</TabItem>
Expand Down