FIX: correct breadcrumb for admin users page (#30173)

Omission and instead of `permlinks`, `users` title should be used.
This commit is contained in:
Krzysztof Kotlarek 2024-12-09 10:52:50 +11:00 committed by GitHub
parent a10a5ccf75
commit 5759d80091
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 1 deletions

View File

@ -7,7 +7,7 @@
<:breadcrumbs>
<DBreadcrumbsItem
@path="/admin/users/list"
@label={{i18n "admin.permalink.title"}}
@label={{i18n "admin.users.title"}}
/>
</:breadcrumbs>
<:actions as |actions|>

View File

@ -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 }

View File

@ -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