# Guide to Accessibility-First Testing in React

Edit profile

# Testing Library

fireEvent.click(
  rendered.getByText(/edit profile/i)
);

# Capybara

click_link('Edit profile')

# Button

New post

# Testing Library

fireEvent.click(
  rendered.getByText(/new post/i)
);

# Capybara

click_button('New post')

# Checkbox

Send reminders

# Testing Library

const checkbox = rendered.getByText(/send reminders/i);

expect(checkbox).not.toBeChecked();

fireEvent.click(checkbox);

expect(checkbox).toBeChecked();

# Capybara

expect(find_field('Send reminders')).to_not be_checked

check('Send reminders')

expect(find_field('Send reminders')).to be_checked