Improve flaky form interaction process in #fill_in_tag

This commit is contained in:
Matt-Yorkley
2020-10-25 09:50:32 +00:00
parent ee402db734
commit e06e8fc460

View File

@@ -137,7 +137,10 @@ module WebHelper
end
def fill_in_tag(tag_name, selector = "tags-input .tags input")
expect(page).to have_selector selector
find(:css, selector).send_keys ""
find(:css, selector).set "#{tag_name}\n"
expect(page).to have_selector ".tag-list .tag-item span", text: tag_name
end
private