Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

tests[Op#52605]: fix undefined method `role` for `Capybara::Node::Simple`

Kabiru Mwenja120999435ca8
diff --git a/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.html.erb b/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.html.erb
index 24401a76624..af60d43a12d 100644
--- a/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.html.erb
+++ b/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.html.erb
@@ -19,7 +19,6 @@
data: {
'storages--oauth-access-grant-nudge-modal-target': 'header'
},
- test_selector: 'oauth-access-grant-nudge-modal-header',
visually_hide_title: authorized
)
diff --git a/modules/storages/spec/components/storages/admin/oauth_access_grant_nudge_modal_component_spec.rb b/modules/storages/spec/components/storages/admin/oauth_access_grant_nudge_modal_component_spec.rb
index 9cc9a080d48..03aea406687 100644
--- a/modules/storages/spec/components/storages/admin/oauth_access_grant_nudge_modal_component_spec.rb
+++ b/modules/storages/spec/components/storages/admin/oauth_access_grant_nudge_modal_component_spec.rb
@@ -40,12 +40,7 @@ RSpec.describe Storages::Admin::OAuthAccessGrantNudgeModalComponent, type: :comp
let(:oauth_access_grant_nudge_modal_component) { described_class.new(project_storage:) }
it 'renders the nudge modal' do
- expect(page).to have_test_selector(
- 'oauth-access-grant-nudge-modal-header',
- text: 'One more step...',
- aria: { live: :assertive },
- role: :alert
- )
+ expect(page).to have_css('[role="alert"]', text: 'One more step...', aria: { live: :assertive })
expect(page).to have_test_selector(
'oauth-access-grant-nudge-modal-body',
text: "To get access to the project folder you need to login to #{project_storage.storage.name}.",