2018-05-09 12:01:36 +05:30
|
|
|
# These helpers allow you to manipulate with sorting features.
|
|
|
|
#
|
|
|
|
# Usage:
|
|
|
|
# describe "..." do
|
|
|
|
# include Spec::Support::Helpers::Features::SortingHelpers
|
|
|
|
# ...
|
|
|
|
#
|
|
|
|
# sort_by("Last updated")
|
|
|
|
#
|
|
|
|
module Spec
|
|
|
|
module Support
|
|
|
|
module Helpers
|
|
|
|
module Features
|
|
|
|
module SortingHelpers
|
|
|
|
def sort_by(value)
|
2018-12-23 12:14:25 +05:30
|
|
|
find('.filter-dropdown-container .dropdown').click
|
2018-05-09 12:01:36 +05:30
|
|
|
|
2018-12-23 12:14:25 +05:30
|
|
|
page.within('ul.dropdown-menu.dropdown-menu-right li') do
|
2018-05-09 12:01:36 +05:30
|
|
|
click_link(value)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|