adapt tests

This commit is contained in:
viehlieb 2023-02-20 21:34:29 +01:00
parent 12adfe4289
commit 346e985c49

View file

@ -80,11 +80,13 @@ feature ArticlesController do
describe "handles missing data" do
it do
find('input[type="submit"]').click # to overview
element = find('#new_articles__price')
element.fill_in with: ""
find('input[type="submit"]').click # missing category, re-show form
expect(find('tr.alert')).to be_present
expect(supplier.articles.count).to eq 0
all("tr select > option")[1].select_option
element.fill_in with: 5.56
find('input[type="submit"]').click # now it should succeed
expect(supplier.articles.count).to eq 1
end