debian-mirror-gitlab/spec/support/matchers/user_status_matcher.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
432 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# 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