mirror of
https://github.com/discourse/discourse.git
synced 2024-12-19 08:03:48 +08:00
FIX: correct breadcrumb for admin users page (#30173)
Omission and instead of `permlinks`, `users` title should be used.
This commit is contained in:
parent
a10a5ccf75
commit
5759d80091
|
@ -7,7 +7,7 @@
|
|||
<:breadcrumbs>
|
||||
<DBreadcrumbsItem
|
||||
@path="/admin/users/list"
|
||||
@label={{i18n "admin.permalink.title"}}
|
||||
@label={{i18n "admin.users.title"}}
|
||||
/>
|
||||
</:breadcrumbs>
|
||||
<:actions as |actions|>
|
||||
|
|
|
@ -11,6 +11,11 @@ describe "Admin Users Page", type: :system do
|
|||
|
||||
before { sign_in(current_user) }
|
||||
|
||||
it "show correct breadcrumbs" do
|
||||
admin_users_page.visit
|
||||
expect(admin_users_page).to have_correct_breadcrumbs
|
||||
end
|
||||
|
||||
describe "bulk user delete" do
|
||||
let(:confirmation_modal) { PageObjects::Modals::BulkUserDeleteConfirmation.new }
|
||||
|
||||
|
|
|
@ -43,6 +43,12 @@ module PageObjects
|
|||
all(".directory-table__row").size
|
||||
end
|
||||
|
||||
def has_correct_breadcrumbs?
|
||||
expect(all(".d-breadcrumbs__item").map(&:text)).to eq(
|
||||
[I18n.t("js.admin_title"), I18n.t("admin_js.admin.users.title")],
|
||||
)
|
||||
end
|
||||
|
||||
def has_users?(user_ids)
|
||||
user_ids.all? { |id| has_css?(".directory-table__row[data-user-id=\"#{id}\"]") }
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user