Adapt test to new ID generation on Primer checkboxes

This commit is contained in:
Henriette Darge
2026-02-06 08:29:04 +01:00
parent 0b01b3beb8
commit f039bef878
5 changed files with 11 additions and 11 deletions
@@ -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"
+1 -1
View File
@@ -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
@@ -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
+3 -3
View File
@@ -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)
@@ -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