summaryrefslogtreecommitdiff
path: root/spec/support/sorting_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/sorting_helper.rb')
-rw-r--r--spec/support/sorting_helper.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/support/sorting_helper.rb b/spec/support/sorting_helper.rb
new file mode 100644
index 00000000000..577518d726c
--- /dev/null
+++ b/spec/support/sorting_helper.rb
@@ -0,0 +1,18 @@
+# Helper allows you to sort items
+#
+# Params
+# value - value for sorting
+#
+# Usage:
+# include SortingHelper
+#
+# sorting_by('Oldest updated')
+#
+module SortingHelper
+ def sorting_by(value)
+ find('button.dropdown-toggle').click
+ page.within('.content ul.dropdown-menu.dropdown-menu-align-right li') do
+ click_link value
+ end
+ end
+end