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

fix timer spec

Klaus Zanders39af0858b9c0
diff --git a/modules/costs/spec/features/timer_spec.rb b/modules/costs/spec/features/timer_spec.rb
index a96f557303f..3e52fac5169 100644
--- a/modules/costs/spec/features/timer_spec.rb
+++ b/modules/costs/spec/features/timer_spec.rb
@@ -74,7 +74,6 @@ RSpec.describe "Work Package timer", :js do
time_logging_modal.submit
time_logging_modal.is_visible false
- wp_view_a.expect_and_dismiss_toaster message: I18n.t(:notice_successful_update)
timer_button.expect_inactive
timer_entry.reload
@@ -112,7 +111,6 @@ RSpec.describe "Work Package timer", :js do
time_logging_modal.submit
# Closing the modal starts the next timer
- wp_view_b.expect_and_dismiss_toaster message: I18n.t(:notice_successful_update)
time_logging_modal.is_visible false
timer_button.expect_active
@@ -167,6 +165,7 @@ RSpec.describe "Work Package timer", :js do
expect(page).to have_text("Tracking time:")
page.within(".spot-modal") { click_button "Stop current timer" }
+
time_logging_modal.is_visible true
time_logging_modal.has_field_with_value "spent_on", Date.current.strftime
time_logging_modal.has_field_with_value "hours", /(\d\.)?\d+/
@@ -175,7 +174,6 @@ RSpec.describe "Work Package timer", :js do
time_logging_modal.expect_work_package(work_package_a.subject)
time_logging_modal.submit
- wp_view_b.expect_and_dismiss_toaster message: I18n.t(:notice_successful_update)
time_logging_modal.is_visible false
timer_button.expect_active
@@ -188,14 +186,12 @@ RSpec.describe "Work Package timer", :js do
time_logging_modal.expect_work_package(work_package_a.subject)
time_logging_modal.submit
- wp_view_b.expect_and_dismiss_toaster message: I18n.t(:notice_successful_update)
time_logging_modal.is_visible false
timer_button.expect_inactive
within_window(second_window) do
timer_button.expect_active
timer_button.stop
- wp_view_b.expect_and_dismiss_toaster message: I18n.t("js.timer.timer_already_stopped"), type: :warning
end
end
end