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
Attempt to blindly re-enable commented out specs
Kabiru Mwenjad34e52118a50
diff --git a/spec/features/activities/work_package/activities_spec.rb b/spec/features/activities/work_package/activities_spec.rbindex db679e81024..ae15bbbee85 100644--- a/spec/features/activities/work_package/activities_spec.rb+++ b/spec/features/activities/work_package/activities_spec.rb@@ -486,94 +486,89 @@ RSpec.describe "Work package activity", :js, with_flag: { primerized_work_packagwp_page.wait_for_activity_tabend- it "filters the activities based on type", :aggregate_failures do # rubocop:disable RSpec/RepeatedExample- pending "works locally but is flaky on CI, reason unknown"- fail-- # # add a non-comment journal entry by changing the work package attributes- # wp_page.update_attributes(subject: "A new subject")- # wp_page.expect_and_dismiss_toaster(message: "Successful update.")-- # # expect all journal entries- # activity_tab.expect_journal_notes(text: "First comment by admin")- # activity_tab.expect_journal_notes(text: "Second comment by admin")- # activity_tab.expect_journal_changed_attribute(text: "Subject")+ it "filters the activities based on type", :aggregate_failures do+ # add a non-comment journal entry by changing the work package attributes+ wp_page.update_attributes(subject: "A new subject") # rubocop:disable Rails/ActiveRecordAliases+ wp_page.expect_and_dismiss_toaster(message: "Successful update.")- # activity_tab.filter_journals(:only_comments)+ # expect all journal entries+ activity_tab.expect_journal_notes(text: "First comment by admin")+ activity_tab.expect_journal_notes(text: "Second comment by admin")+ activity_tab.expect_journal_changed_attribute(text: "Subject")- # # expect only the comments- # activity_tab.expect_journal_notes(text: "First comment by admin")- # activity_tab.expect_journal_notes(text: "Second comment by admin")- # activity_tab.expect_no_journal_changed_attribute(text: "Subject")+ activity_tab.filter_journals(:only_comments)- # activity_tab.filter_journals(:only_changes)+ # expect only the comments+ activity_tab.expect_journal_notes(text: "First comment by admin")+ activity_tab.expect_journal_notes(text: "Second comment by admin")+ activity_tab.expect_no_journal_changed_attribute(text: "Subject")- # # expect only the changes- # activity_tab.expect_no_journal_notes(text: "First comment by admin")- # activity_tab.expect_no_journal_notes(text: "Second comment by admin")- # activity_tab.expect_journal_changed_attribute(text: "Subject")+ activity_tab.filter_journals(:only_changes)- # activity_tab.filter_journals(:all)+ # expect only the changes+ activity_tab.expect_no_journal_notes(text: "First comment by admin")+ activity_tab.expect_no_journal_notes(text: "Second comment by admin")+ activity_tab.expect_journal_changed_attribute(text: "Subject")+ activity_tab.filter_journals(:all)- # # expect all journal entries- # activity_tab.expect_journal_notes(text: "First comment by admin")- # activity_tab.expect_journal_notes(text: "Second comment by admin")- # activity_tab.expect_journal_changed_attribute(text: "Subject")+ # expect all journal entries+ activity_tab.expect_journal_notes(text: "First comment by admin")+ activity_tab.expect_journal_notes(text: "Second comment by admin")+ activity_tab.expect_journal_changed_attribute(text: "Subject")- # # strip journal entries with comments and changesets down to the comments+ # strip journal entries with comments and changesets down to the comments- # # creating a journal entry with both a comment and a changeset- # activity_tab.add_comment(text: "Third comment by admin")- # wp_page.update_attributes(subject: "A new subject!!!")- # wp_page.expect_and_dismiss_toaster(message: "Successful update.")+ # creating a journal entry with both a comment and a changeset+ activity_tab.add_comment(text: "Third comment by admin")+ wp_page.update_attributes(subject: "A new subject!!!") # rubocop:disable Rails/ActiveRecordAliases+ wp_page.expect_and_dismiss_toaster(message: "Successful update.")- # latest_journal = work_package.journals.last+ latest_journal = work_package.journals.last- # activity_tab.within_journal_entry(latest_journal) do- # activity_tab.expect_journal_notes_header(text: admin.name)- # activity_tab.expect_journal_notes(text: "Third comment by admin")- # activity_tab.expect_journal_changed_attribute(text: "Subject")- # activity_tab.expect_no_journal_details_header- # end+ activity_tab.within_journal_entry(latest_journal) do+ activity_tab.expect_journal_notes_header(text: admin.name)+ activity_tab.expect_journal_notes(text: "Third comment by admin")+ activity_tab.expect_journal_changed_attribute(text: "Subject")+ activity_tab.expect_no_journal_details_header+ end- # activity_tab.filter_journals(:only_comments)+ activity_tab.filter_journals(:only_comments)- # activity_tab.within_journal_entry(latest_journal) do- # activity_tab.expect_journal_notes_header(text: admin.name)- # activity_tab.expect_journal_notes(text: "Third comment by admin")- # activity_tab.expect_no_journal_changed_attribute- # activity_tab.expect_no_journal_details_header- # end+ activity_tab.within_journal_entry(latest_journal) do+ activity_tab.expect_journal_notes_header(text: admin.name)+ activity_tab.expect_journal_notes(text: "Third comment by admin")+ activity_tab.expect_no_journal_changed_attribute+ activity_tab.expect_no_journal_details_header+ end- # activity_tab.filter_journals(:only_changes)+ activity_tab.filter_journals(:only_changes)- # activity_tab.within_journal_entry(latest_journal) do- # activity_tab.expect_no_journal_notes_header- # activity_tab.expect_no_journal_notes+ activity_tab.within_journal_entry(latest_journal) do+ activity_tab.expect_no_journal_notes_header+ activity_tab.expect_no_journal_notes- # activity_tab.expect_journal_details_header(text: admin.name)- # activity_tab.expect_journal_changed_attribute(text: "Subject")- # end+ activity_tab.expect_journal_details_header(text: admin.name)+ activity_tab.expect_journal_changed_attribute(text: "Subject")+ endend- it "resets an only_changes filter if a comment is added by the user", :aggregate_failures do # rubocop:disable RSpec/RepeatedExample- pending "works locally but is flaky on CI, reason unknown"- fail-- # activity_tab.filter_journals(:only_changes)- # sleep 0.5 # avoid flaky test+ it "resets an only_changes filter if a comment is added by the user", :aggregate_failures do+ activity_tab.filter_journals(:only_changes)+ wait_for_filter- # # expect only the changes- # activity_tab.expect_no_journal_notes(text: "First comment by admin")- # activity_tab.expect_no_journal_notes(text: "Second comment by admin")+ # expect only the changes+ activity_tab.expect_no_journal_notes(text: "First comment by admin")+ activity_tab.expect_no_journal_notes(text: "Second comment by admin")- # # add a comment- # activity_tab.add_comment(text: "Third comment by admin")- # sleep 0.5 # avoid flaky test+ # add a comment+ activity_tab.add_comment(text: "Third comment by admin")+ wait_for_filter- # # the only_changes filter should be reset- # activity_tab.expect_journal_notes(text: "Third comment by admin")+ # the only_changes filter should be reset+ activity_tab.expect_journal_notes(text: "Third comment by admin")end++ def wait_for_filter = sleep(1)endend