I commonly find myself wanting to assert that a certain field contains a certain value. The way to do this with Capybara is documented on StackOverflow but, unfortunately, the answer there is buried in a little too much noise. I decided to create my own tiny noise-free blog post that contains the answer. Here it is:
expect(page).to have_field('Name', with: 'Abraham Lincoln')
Thank you for this article, i try to find this solution around 1h.
for minitest system tests:
assert_selector(:field, ‘name’, with: ‘Abraham Lincoln’)