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>
|
<:breadcrumbs>
|
||||||
<DBreadcrumbsItem
|
<DBreadcrumbsItem
|
||||||
@path="/admin/users/list"
|
@path="/admin/users/list"
|
||||||
@label={{i18n "admin.permalink.title"}}
|
@label={{i18n "admin.users.title"}}
|
||||||
/>
|
/>
|
||||||
</:breadcrumbs>
|
</:breadcrumbs>
|
||||||
<:actions as |actions|>
|
<:actions as |actions|>
|
||||||
|
|
|
@ -11,6 +11,11 @@ describe "Admin Users Page", type: :system do
|
||||||
|
|
||||||
before { sign_in(current_user) }
|
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
|
describe "bulk user delete" do
|
||||||
let(:confirmation_modal) { PageObjects::Modals::BulkUserDeleteConfirmation.new }
|
let(:confirmation_modal) { PageObjects::Modals::BulkUserDeleteConfirmation.new }
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,12 @@ module PageObjects
|
||||||
all(".directory-table__row").size
|
all(".directory-table__row").size
|
||||||
end
|
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)
|
def has_users?(user_ids)
|
||||||
user_ids.all? { |id| has_css?(".directory-table__row[data-user-id=\"#{id}\"]") }
|
user_ids.all? { |id| has_css?(".directory-table__row[data-user-id=\"#{id}\"]") }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue