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

reenabled and fixed failing spec

Jonas Jabari2717246c9ae3
diff --git a/app/components/work_packages/activities_tab/journals/empty_component.html.erb b/app/components/work_packages/activities_tab/journals/empty_component.html.erb
index 44ca1c5e538..8cf6a436024 100644
--- a/app/components/work_packages/activities_tab/journals/empty_component.html.erb
+++ b/app/components/work_packages/activities_tab/journals/empty_component.html.erb
@@ -1,6 +1,6 @@
<%=
component_wrapper do
- render(Primer::Beta::Blankslate.new(border: true, data: { test_selector: "op-wp-journals-container-empty "})) do |component|
+ render(Primer::Beta::Blankslate.new(border: true, data: { test_selector: "op-wp-journals-container-empty"})) do |component|
component.with_visual_icon(icon: :pulse)
component.with_heading(tag: :h2).with_content(t("activities.work_packages.activity_tab.no_results_title_text"))
component.with_description { t("activities.work_packages.activity_tab.no_results_description_text") }
diff --git a/spec/features/activities/work_package/activities_spec.rb b/spec/features/activities/work_package/activities_spec.rb
index e47d1ac0590..2024bbb1ce4 100644
--- a/spec/features/activities/work_package/activities_spec.rb
+++ b/spec/features/activities/work_package/activities_spec.rb
@@ -251,45 +251,42 @@ RSpec.describe "Work package activity", :js, :with_cuprite, with_flag: { primeri
wp_page.wait_for_activity_tab
end
- it "filters the activities based on type and shows an empty state", :aggregate_failures do
- expect(true).to be_truthy
- # sleep 60
- # # 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.")
+ it "filters the activities based on type and shows an empty state" do
+ # expect no empty state due to the initial journal entry
+ activity_tab.expect_no_empty_state
+ # expect the initial journal entry to be shown
+ activity_tab.expect_journal_details_header(text: "created")
- # # expect all journal entries
- # activity_tab.expect_journal_changed_attribute(text: "Subject")
-
- # activity_tab.filter_journals(:only_comments)
+ activity_tab.filter_journals(:only_comments)
- # # expect empty state
- # activity_tab.expect_empty_state
- # activity_tab.expect_no_journal_changed_attribute
+ # expect empty state
+ activity_tab.expect_empty_state
+ activity_tab.expect_no_journal_details_header(text: "created")
- # activity_tab.filter_journals(:only_changes)
+ activity_tab.filter_journals(:only_changes)
- # # expect only the changes
- # activity_tab.expect_no_empty_state
- # activity_tab.expect_journal_changed_attribute(text: "Subject")
+ # expect only the changes
+ activity_tab.expect_no_empty_state
+ activity_tab.expect_journal_details_header(text: "created")
- # activity_tab.filter_journals(:all)
+ activity_tab.filter_journals(:all)
- # # expect all journal entries
- # activity_tab.expect_no_empty_state
- # activity_tab.expect_journal_changed_attribute(text: "Subject")
+ # expect all journal entries
+ activity_tab.expect_no_empty_state
+ activity_tab.expect_journal_details_header(text: "created")
- # # filter for comments again
- # activity_tab.filter_journals(:only_comments)
+ # filter for comments again
+ activity_tab.filter_journals(:only_comments)
- # # expect empty state again
- # activity_tab.expect_empty_state
+ # expect empty state again
+ activity_tab.expect_empty_state
+ activity_tab.expect_no_journal_details_header(text: "created")
- # # add a comment
- # activity_tab.add_comment(text: "First comment by admin")
+ # add a comment
+ activity_tab.add_comment(text: "First comment by admin")
- # # the empty state should be removed
- # activity_tab.expect_no_empty_state
+ # the empty state should be removed
+ activity_tab.expect_no_empty_state
end
end