diff options
author | Rémy Coutable <remy@rymai.me> | 2018-08-01 18:21:24 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-08-01 18:21:24 +0300 |
commit | 83a0db0c551236518bdec1a7ae3a1ed1d05f5aaa (patch) | |
tree | e13ad022ea223e7bde5202a31ee81169225fec99 /spec/support/matchers | |
parent | ea6fc714bb0306ac8ca56b5dafe4b6777aafe5fc (diff) | |
parent | 12095251c3777c5231cab97854d5dca69d31cc5d (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.rb | 13 |
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 |