Sha256: e96240b9dbcbd2aa11b4d4a7eb3f352642622f1e0e6dfdcbd0bb8a026de616ce
Contents?: true
Size: 667 Bytes
Versions: 48
Compression:
Stored size: 667 Bytes
Contents
module CapybaraSelect2 def select2_search(id, query) find("##{id} + .select2-container").click find(".select2-search__field").set(query.to_s) end def select2(id, query, label = query) select2_search(id, query) find(".select2-results li", text: label.to_s).click end def select2_expect_have_result(id, query, label = query) select2_search(id, query) expect(page).to have_selector(".select2-results li", text: label.to_s) end def select2_expect_have_no_result(id, query, label = query) select2_search(id, query) expect(page).to have_no_selector(".select2-results li", text: label.to_s) end end World(CapybaraSelect2)
Version data entries
48 entries across 48 versions & 1 rubygems