From f039bef878604908a1efa28bcedfaa72add676ae Mon Sep 17 00:00:00 2001 From: Henriette Darge Date: Fri, 6 Feb 2026 08:29:04 +0100 Subject: [PATCH] Adapt test to new ID generation on Primer checkboxes --- .../spec/features/administration/oidc_custom_crud_spec.rb | 4 ++-- spec/controllers/my_controller_spec.rb | 2 +- spec/features/admin/enterprise/enterprise_trial_spec.rb | 4 ++-- spec/features/external_link_capture_spec.rb | 6 +++--- .../projects/settings/internal_comments_settings_spec.rb | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/openid_connect/spec/features/administration/oidc_custom_crud_spec.rb b/modules/openid_connect/spec/features/administration/oidc_custom_crud_spec.rb index 17b827f8fbf..27da0ec708c 100644 --- a/modules/openid_connect/spec/features/administration/oidc_custom_crud_spec.rb +++ b/modules/openid_connect/spec/features/administration/oidc_custom_crud_spec.rb @@ -79,7 +79,7 @@ RSpec.describe "OIDC administration CRUD", click_link_or_button "Continue" # Groups - enabled_checkbox = page.find_by_id("openid_connect_provider_sync_groups") + enabled_checkbox = page.find_by_id("sync_groups") expect(enabled_checkbox).not_to be_checked expect(page).to have_no_field " Groups claim" expect(page).to have_no_field "Patterns (regular expressions)" @@ -93,7 +93,7 @@ RSpec.describe "OIDC administration CRUD", click_link_or_button "Continue" # Claims - fill_in "Claims", with: '{"foo": "bar"}' + fill_in "Claims", with: '{"id_token": { "bar": null }}' fill_in "ACR values", with: "foo bar" click_link_or_button "Finish setup" diff --git a/spec/controllers/my_controller_spec.rb b/spec/controllers/my_controller_spec.rb index da4ce6deb69..e9efed08925 100644 --- a/spec/controllers/my_controller_spec.rb +++ b/spec/controllers/my_controller_spec.rb @@ -332,7 +332,7 @@ RSpec.describe MyController do render_views it "renders auto hide popups checkbox" do - expect(response.body).to have_css("form #pref_auto_hide_popups") + expect(response.body).to have_css("form #auto_hide_popups") end end diff --git a/spec/features/admin/enterprise/enterprise_trial_spec.rb b/spec/features/admin/enterprise/enterprise_trial_spec.rb index eb8b0fb3893..ea0f742b913 100644 --- a/spec/features/admin/enterprise/enterprise_trial_spec.rb +++ b/spec/features/admin/enterprise/enterprise_trial_spec.rb @@ -177,8 +177,8 @@ RSpec.describe "Enterprise trial management", fill_in "Email", with: mail retry_block do - check "enterprise_trial_general_consent", allow_label_click: true - expect(page).to have_checked_field("enterprise_trial_general_consent") + check "general_consent", allow_label_click: true + expect(page).to have_checked_field("general_consent") end end diff --git a/spec/features/external_link_capture_spec.rb b/spec/features/external_link_capture_spec.rb index 4a3d019d1a4..d54a768f973 100644 --- a/spec/features/external_link_capture_spec.rb +++ b/spec/features/external_link_capture_spec.rb @@ -71,8 +71,8 @@ RSpec.describe "External link capture", :js, :selenium do it "allows enabling external link capture and shows a confirmation screen" do visit admin_settings_external_links_path - scroll_to_element find_by_id("settings_capture_external_links") - find_by_id("settings_capture_external_links").set(true) + scroll_to_element find_by_id("capture_external_links") + find_by_id("capture_external_links").set(true) click_on "Save" expect(page).to have_text I18n.t(:notice_successful_update) @@ -106,7 +106,7 @@ RSpec.describe "External link capture", :js, :selenium do it "does not allow enabling external link capture in administration" do visit admin_settings_external_links_path - expect(page).to have_field("settings_capture_external_links", disabled: true) + expect(page).to have_field("capture_external_links", disabled: true) RequestStore.clear! expect(Setting.capture_external_links?).to be(false) diff --git a/spec/features/projects/settings/internal_comments_settings_spec.rb b/spec/features/projects/settings/internal_comments_settings_spec.rb index 5c696dd90d3..3c847e06ee1 100644 --- a/spec/features/projects/settings/internal_comments_settings_spec.rb +++ b/spec/features/projects/settings/internal_comments_settings_spec.rb @@ -40,18 +40,18 @@ RSpec.describe "WorkPackages-Settings-InternalComments", :js do internal_comments_settings_page.visit! expect(page).to have_css("#internal-comments-form") - expect(page).to have_field(:project_enabled_internal_comments, checked: false) + expect(page).to have_field(:enabled_internal_comments, checked: false) check("Enable internal comments") click_link_or_button "Save" expect_and_dismiss_flash(message: "Successful update.") - expect(page).to have_field(:project_enabled_internal_comments, checked: true) + expect(page).to have_field(:enabled_internal_comments, checked: true) uncheck("Enable internal comments") click_link_or_button "Save" expect_and_dismiss_flash(message: "Successful update.") - expect(page).to have_field(:project_enabled_internal_comments, checked: false) + expect(page).to have_field(:enabled_internal_comments, checked: false) end end