Sha256: 1a6270525a89ff7c3578337b8210b4c35fcbeae5789b1ec6a8c87abcf83e7cd5
Contents?: true
Size: 1.65 KB
Versions: 1
Compression:
Stored size: 1.65 KB
Contents
# encoding: UTF-8 require "spec_helper" feature("Search Views") do background do # Setup BG Stuff end scenario("Pagination") do visit("/upmin/m/User") # Make sure some basic pagination exits within(".pagination") do within(".current") do expect(page).to(have_content("1")) end expect(page).to(have_content("Next")) click_link("Next") end within(".pagination") do within(".current") do expect(page).to(have_content("2")) end expect(page).to(have_content("Next")) expect(page).to(have_content("Prev")) click_link("3") end within(".pagination") do within(".current") do expect(page).to(have_content("3")) end end end scenario("Search via integer") do visit("/upmin/m/Order") expect(page).to(have_selector("a.search-result-link", count: 30)) fill_in("q_id_gteq", with: 1) fill_in("q_id_lteq", with: 5) click_button("Search") expect(page).to(have_selector("a.search-result-link", count: 5)) end scenario("Search via string") do expected_user = User.first visit("/upmin/m/User") fill_in("q_name_cont", with: expected_user.name) click_button("Search") expect(page).to(have_selector("a.search-result-link", minimum: 1)) expect(page).to(have_content(expected_user.name)) end scenario("Search via string") do expected_user = User.first visit("/upmin/m/User") fill_in("q_name_cont", with: expected_user.name) click_button("Search") expect(page).to(have_selector("a.search-result-link", minimum: 1)) expect(page).to(have_content(expected_user.name)) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
upmin-admin-0.0.39 | spec/features/search_spec.rb |