FIX: all staff_counters should be pluralized strings (#21048)

Make all staff_counters pluralized strings
This commit is contained in:
David Battersby
2023-04-12 17:13:37 +08:00
committed by GitHub
parent d86691a767
commit 7d34ba38a2
4 changed files with 49 additions and 30 deletions

View File

@ -24,11 +24,9 @@ module PageObjects
page.has_current_path?("/u/#{user.username}/messages/warnings")
end
def click_staff_info_warnings_link(warnings_count: 0)
def click_staff_info_warnings_link(user, warnings_count: 0)
staff_counters = page.find(".staff-counters")
staff_counters.click_link(
"#{warnings_count} #{I18n.t("js.user.staff_counters.warnings_received")}",
)
staff_counters.find("a[href='/u/#{user.username}/messages/warnings']").click
self
end
end