diff --git a/app/assets/javascripts/admin/addon/templates/users-list.hbs b/app/assets/javascripts/admin/addon/templates/users-list.hbs index fde666b79e6..3aa622b6c0b 100644 --- a/app/assets/javascripts/admin/addon/templates/users-list.hbs +++ b/app/assets/javascripts/admin/addon/templates/users-list.hbs @@ -7,7 +7,7 @@ <:breadcrumbs> <:actions as |actions|> diff --git a/spec/system/admin_users_list_spec.rb b/spec/system/admin_users_list_spec.rb index 84351655add..a1a4fe1fcf1 100644 --- a/spec/system/admin_users_list_spec.rb +++ b/spec/system/admin_users_list_spec.rb @@ -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 } diff --git a/spec/system/page_objects/pages/admin_users.rb b/spec/system/page_objects/pages/admin_users.rb index 08096213850..baa43a3bc52 100644 --- a/spec/system/page_objects/pages/admin_users.rb +++ b/spec/system/page_objects/pages/admin_users.rb @@ -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