diff --git a/modules/my_page/spec/factories/grid_factory.rb b/modules/my_page/spec/factories/grid_factory.rb index be2158a85460..9e9dbdf4b13a 100644 --- a/modules/my_page/spec/factories/grid_factory.rb +++ b/modules/my_page/spec/factories/grid_factory.rb @@ -21,5 +21,11 @@ ) ] end + + trait :empty do + widgets { [] } + row_count { 1 } + column_count { 1 } + end end end diff --git a/modules/my_page/spec/features/my/custom_text_spec.rb b/modules/my_page/spec/features/my/custom_text_spec.rb index 46459fbd8bef..955e5422227f 100644 --- a/modules/my_page/spec/features/my/custom_text_spec.rb +++ b/modules/my_page/spec/features/my/custom_text_spec.rb @@ -46,6 +46,11 @@ let(:other_user) do create(:user, member_with_permissions: { project => permissions }) end + + let!(:my_page_grid) do + create(:my_page, :empty, user:) + end + let(:my_page) do Pages::My::Page.new end diff --git a/modules/my_page/spec/features/my/documents_spec.rb b/modules/my_page/spec/features/my/documents_spec.rb index a2f7a923369b..215c53e8f3b2 100644 --- a/modules/my_page/spec/features/my/documents_spec.rb +++ b/modules/my_page/spec/features/my/documents_spec.rb @@ -53,6 +53,10 @@ Pages::My::Page.new end + let!(:my_page_grid) do + create(:my_page, :empty, user:) + end + before do login_as user diff --git a/modules/my_page/spec/features/my/my_page_spec.rb b/modules/my_page/spec/features/my/my_page_spec.rb index 1e574feec951..e6cc7b8a1c4f 100644 --- a/modules/my_page/spec/features/my/my_page_spec.rb +++ b/modules/my_page/spec/features/my/my_page_spec.rb @@ -55,6 +55,10 @@ Pages::My::Page.new end + let!(:my_page_grid) do + create(:my_page, :empty, user:) + end + before do login_as user diff --git a/modules/my_page/spec/features/my/my_spent_time_widget_with_a_negative_time_zone_spec.rb b/modules/my_page/spec/features/my/my_spent_time_widget_with_a_negative_time_zone_spec.rb index 2a36c7329c8c..7f2bd51ddbfd 100644 --- a/modules/my_page/spec/features/my/my_spent_time_widget_with_a_negative_time_zone_spec.rb +++ b/modules/my_page/spec/features/my/my_spent_time_widget_with_a_negative_time_zone_spec.rb @@ -67,6 +67,10 @@ let!(:week_days) { week_with_saturday_and_sunday_as_weekend } let!(:non_working_day) { create(:non_working_day, date: tuesday) } + let!(:my_page_grid) do + create(:my_page, :empty, user:) + end + before do login_as user my_page.visit! diff --git a/modules/my_page/spec/features/my/news_spec.rb b/modules/my_page/spec/features/my/news_spec.rb index c1f3ecd55590..e7e8706b70eb 100644 --- a/modules/my_page/spec/features/my/news_spec.rb +++ b/modules/my_page/spec/features/my/news_spec.rb @@ -53,6 +53,10 @@ Pages::My::Page.new end + let!(:my_page_grid) do + create(:my_page, :empty, user:) + end + before do login_as user diff --git a/modules/my_page/spec/features/my/time_entries_current_user_spec.rb b/modules/my_page/spec/features/my/time_entries_current_user_spec.rb index 0b304a308538..61bf9925aac5 100644 --- a/modules/my_page/spec/features/my/time_entries_current_user_spec.rb +++ b/modules/my_page/spec/features/my/time_entries_current_user_spec.rb @@ -107,6 +107,11 @@ create(:user, member_with_permissions: { project => %i[view_time_entries edit_time_entries view_work_packages log_own_time] }) end + + let!(:my_page_grid) do + create(:my_page, :empty, user:) + end + let(:my_page) do Pages::My::Page.new end diff --git a/modules/my_page/spec/features/my/work_package_table_spec.rb b/modules/my_page/spec/features/my/work_package_table_spec.rb index 4f62dcf687ae..4d69827866eb 100644 --- a/modules/my_page/spec/features/my/work_package_table_spec.rb +++ b/modules/my_page/spec/features/my/work_package_table_spec.rb @@ -62,6 +62,10 @@ Pages::My::Page.new end + let!(:my_page_grid) do + create(:my_page, :empty, user:) + end + let(:modal) { Components::WorkPackages::TableConfigurationModal.new } let(:filters) { Components::WorkPackages::TableConfiguration::Filters.new } let(:columns) { Components::WorkPackages::Columns.new } diff --git a/modules/my_page/spec/features/my/work_package_watcher_widget_spec.rb b/modules/my_page/spec/features/my/work_package_watcher_widget_spec.rb index 7a7ea76f0686..752acd3495a2 100644 --- a/modules/my_page/spec/features/my/work_package_watcher_widget_spec.rb +++ b/modules/my_page/spec/features/my/work_package_watcher_widget_spec.rb @@ -46,6 +46,10 @@ Pages::My::Page.new end + let!(:my_page_grid) do + create(:my_page, :empty, user:) + end + before do login_as user work_package.add_watcher(user)