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:
authorRémy Coutable <remy@rymai.me>2018-08-01 18:21:24 +0300
committerRémy Coutable <remy@rymai.me>2018-08-01 18:21:24 +0300
commit83a0db0c551236518bdec1a7ae3a1ed1d05f5aaa (patch)
treee13ad022ea223e7bde5202a31ee81169225fec99 /spec/support/matchers
parentea6fc714bb0306ac8ca56b5dafe4b6777aafe5fc (diff)
parent12095251c3777c5231cab97854d5dca69d31cc5d (diff)
Merge branch 'bvl-user-status-message-35463' into 'master'
Allow users to set a status Closes #35463 See merge request gitlab-org/gitlab-ce!20614
Diffstat (limited to 'spec/support/matchers')
-rw-r--r--spec/support/matchers/user_status_matcher.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/support/matchers/user_status_matcher.rb b/spec/support/matchers/user_status_matcher.rb
new file mode 100644
index 00000000000..3cf240d874a
--- /dev/null
+++ b/spec/support/matchers/user_status_matcher.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+RSpec::Matchers.define :show_user_status do |status|
+ match do |page|
+ expect(page).to have_selector(".user-status-emoji[title='#{status.message}']")
+
+ # The same user status might be displayed multiple times on the page
+ emoji_span = page.first(".user-status-emoji[title='#{status.message}']")
+ page.within(emoji_span) do
+ expect(page).to have_emoji(status.emoji)
+ end
+ end
+end