Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2019-02-06 15:19:00 +0300
committerFilipa Lacerda <filipa@gitlab.com>2019-02-06 15:19:00 +0300
commit5bfa8e2f5e03849645570ba8c2dbfcc5c834f1b1 (patch)
treeb8a5f15796039af3f659f74cbc131c401818be9b /spec/support
parent3b4c4095bbda55ae0b4d32f9b17c0e4f03c5ceed (diff)
parentd279cc94088fddd6f6bb2847e456bbf68ae616ea (diff)
Merge branch '43681-display-last-activity-and-created-at-datetimes-for-users-in-admin-users' into 'master'
Resolve "Display last activity and created at datetimes for users" Closes #43681 See merge request gitlab-org/gitlab-ce!24181
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/helpers/features/responsive_table_helpers.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/support/helpers/features/responsive_table_helpers.rb b/spec/support/helpers/features/responsive_table_helpers.rb
new file mode 100644
index 00000000000..7a175219fe9
--- /dev/null
+++ b/spec/support/helpers/features/responsive_table_helpers.rb
@@ -0,0 +1,32 @@
+# frozen_string_literal: true
+# These helpers allow you to access rows in a responsive table
+#
+# Usage:
+# describe "..." do
+# include Spec::Support::Helpers::Features::ResponsiveTableHelpers
+# ...
+#
+# expect(first_row.text).to include("John Doe")
+# expect(second_row.text).to include("John Smith")
+#
+# Note:
+# index starts at 1 as index 0 is expected to be the table header
+#
+#
+module Spec
+ module Support
+ module Helpers
+ module Features
+ module ResponsiveTableHelpers
+ def first_row
+ page.all('.gl-responsive-table-row')[1]
+ end
+
+ def second_row
+ page.all('.gl-responsive-table-row')[2]
+ end
+ end
+ end
+ end
+ end
+end