mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 02:25:27 +08:00

A handful of the page objects for admin pages were placed directly under /page_objects rather than under /page_objects/pages with the others. This PR simply moves them.
21 lines
496 B
Ruby
21 lines
496 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class AdminUserBadges < PageObjects::Pages::Base
|
|
def visit_page(user)
|
|
page.visit "/admin/users/#{user.id}/#{user.username}/badges"
|
|
self
|
|
end
|
|
|
|
def user_badges_table
|
|
page.find(:table, id: "user-badges", visible: true)
|
|
end
|
|
|
|
def find_badge_row_by_granter(granter)
|
|
user_badges_table.find(:table_row, { "Granted By" => "#{granter.username}" })
|
|
end
|
|
end
|
|
end
|
|
end
|