diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-11-29 15:00:20 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-12-03 12:54:21 +0300 |
commit | 40c86cfede43164e9037bac9d712e72c45bd8aea (patch) | |
tree | fb140c882ce07a95c1aa5e7d35520fc594ee3978 /spec/support/helpers | |
parent | 0d5cbd16ee3b8eac49d134af063b1827748f2b6d (diff) |
Fix losing search query when sort users on admin users page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/support/helpers')
-rw-r--r-- | spec/support/helpers/features/rows_helpers.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/support/helpers/features/rows_helpers.rb b/spec/support/helpers/features/rows_helpers.rb new file mode 100644 index 00000000000..5e614f40a24 --- /dev/null +++ b/spec/support/helpers/features/rows_helpers.rb @@ -0,0 +1,27 @@ +# These helpers allow you to access rows in the list +# +# Usage: +# describe "..." do +# include Spec::Support::Helpers::Features::RowsHelpers +# ... +# +# expect(first_row.text).to include("John Doe") +# expect(second_row.text).to include("John Smith") +# +module Spec + module Support + module Helpers + module Features + module RowsHelpers + def first_row + page.all('ul.content-list > li')[0] + end + + def second_row + page.all('ul.content-list > li')[1] + end + end + end + end + end +end |