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
Adapt tests to icon-only toolbar
Henriette Darge61ab3a45c4de
diff --git a/spec/features/work_packages/details/details_toolbar_spec.rb b/spec/features/work_packages/details/details_toolbar_spec.rbindex c7babaec5fb..b5be014a130 100644--- a/spec/features/work_packages/details/details_toolbar_spec.rb+++ b/spec/features/work_packages/details/details_toolbar_spec.rb@@ -44,15 +44,15 @@ RSpec.describe "Work package details toolbar", :js, :selenium doit "toggles the watch state" doexpect(work_package.watcher_users).not_to include(user)- expect(page).to have_css(".work-packages--details-toolbar button", text: "Watch")+ expect(page).to have_css(".work-packages--details-toolbar button[title='Watch work package']")within ".work-packages--details-toolbar" doclick_button "Watch"end- expect(page).to have_css(".work-packages--details-toolbar button", text: "Unwatch")+ expect(page).to have_css(".work-packages--details-toolbar button[title='Unwatch work package']")expect(work_package.reload.watcher_users).to include(user)- expect(page).to have_css(".work-packages--details-toolbar button", text: "Unwatch")+ expect(page).to have_css(".work-packages--details-toolbar button[title='Unwatch work package']")endendenddiff --git a/spec/features/work_packages/tabs/watcher_tab_spec.rb b/spec/features/work_packages/tabs/watcher_tab_spec.rbindex debd55015ae..20e626373d5 100644--- a/spec/features/work_packages/tabs/watcher_tab_spec.rb+++ b/spec/features/work_packages/tabs/watcher_tab_spec.rb@@ -26,13 +26,13 @@ RSpec.describe "Watcher tab", :js, :selenium, :with_cuprite dodef expect_button_is_watchingtitle = I18n.t("js.label_unwatch_work_package")expect(page).to have_css("#unwatch-button[title='#{title}']", wait: 10)- expect(page).to have_css("#unwatch-button .button--icon.icon-watched", wait: 10)+ expect(page).to have_css("#unwatch-button .button--icon[eye-icon]", wait: 10)enddef expect_button_is_not_watchingtitle = I18n.t("js.label_watch_work_package")expect(page).to have_css("#watch-button[title='#{title}']")- expect(page).to have_css("#watch-button .button--icon.icon-unwatched")+ expect(page).to have_css("#watch-button .button--icon[eye-closed-icon]")endshared_examples "watch and unwatch with button" do