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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Lint: Use `have_css` in place of `have_selector`
Aaron Contrerasbbecc931c0c8
diff --git a/spec/support/pages/work_packages/abstract_work_package.rb b/spec/support/pages/work_packages/abstract_work_package.rbindex 393d299cb3e..76f2a8734b6 100644--- a/spec/support/pages/work_packages/abstract_work_package.rb+++ b/spec/support/pages/work_packages/abstract_work_package.rb@@ -46,7 +46,7 @@ module Pagesenddef expect_tab(tab)- expect(page).to have_selector('.op-tab-row--link_selected', text: tab.to_s.upcase)+ expect(page).to have_css('.op-tab-row--link_selected', text: tab.to_s.upcase)enddef edit_field(attribute)@@ -93,7 +93,7 @@ module Pagesdef ensure_page_loadedexpect_angular_frontend_initialized- expect(page).to have_selector('.op-user-activity--user-name',+ expect(page).to have_css('.op-user-activity--user-name',text: work_package.journals.last.user.name,minimum: 1,wait: 10)@@ -106,21 +106,21 @@ module Pagesenddef expect_group(name, &)- expect(page).to have_selector('.attributes-group--header-text', text: name.upcase)+ expect(page).to have_css('.attributes-group--header-text', text: name.upcase)if block_given?page.within(".attributes-group[data-group-name='#{name}']", &)endenddef expect_no_group(name)- expect(page).not_to have_selector('.attributes-group--header-text', text: name.upcase)+ expect(page).not_to have_css('.attributes-group--header-text', text: name.upcase)enddef expect_attributes(attribute_expectations)attribute_expectations.each do |label_name, value|label = label_name.to_sif label == 'status'- expect(page).to have_selector("[data-test-selector='op-wp-status-button'] .button", text: value)+ expect(page).to have_css("[data-test-selector='op-wp-status-button'] .button", text: value)elseexpect(page).to have_selector(".inline-edit--container.#{label.camelize(:lower)}", text: value)end@@ -140,41 +140,41 @@ module Pagesenddef expect_activity_message(message)- expect(page).to have_selector('.work-package-details-activities-messages .message',+ expect(page).to have_css('.work-package-details-activities-messages .message',text: message)enddef expect_no_parentvisit_tab!('relations')- expect(page).not_to have_selector('[data-test-selector="op-wp-breadcrumb-parent"]')+ expect(page).not_to have_css('[data-test-selector="op-wp-breadcrumb-parent"]')enddef expect_zen_mode- expect(page).to have_selector('.zen-mode')- expect(page).to have_selector('#main-menu', visible: false)- expect(page).to have_selector('.op-app-header', visible: false)+ expect(page).to have_css('.zen-mode')+ expect(page).to have_css('#main-menu', visible: false)+ expect(page).to have_css('.op-app-header', visible: false)enddef expect_no_zen_mode- expect(page).not_to have_selector('.zen-mode')- expect(page).to have_selector('#main-menu', visible: true)- expect(page).to have_selector('.op-app-header', visible: true)+ expect(page).not_to have_css('.zen-mode')+ expect(page).to have_css('#main-menu', visible: true)+ expect(page).to have_css('.op-app-header', visible: true)enddef expect_custom_action(name)expect(page)- .to have_selector('.custom-action', text: name)+ .to have_css('.custom-action', text: name)enddef expect_custom_action_disabled(name)expect(page)- .to have_selector('.custom-action [disabled]', text: name)+ .to have_css('.custom-action [disabled]', text: name)enddef expect_no_custom_action(name)expect(page)- .not_to have_selector('.custom-action', text: name)+ .not_to have_css('.custom-action', text: name)enddef expect_custom_action_order(*names)@@ -294,7 +294,7 @@ module Pagesenddef subject_field- expect(page).to have_selector('.inline-edit--container.subject input', wait: 10)+ expect(page).to have_css('.inline-edit--container.subject input', wait: 10)find('.inline-edit--container.subject input')end