Skip to content

Commit

Permalink
Merge pull request #14417 from opf/fix-tests
Browse files Browse the repository at this point in the history
Fix tests that rely on notifications being pulled all 10 seconds
  • Loading branch information
ulferts committed Dec 13, 2023
2 parents effd588 + 624fd26 commit 733513b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
#++

require 'spec_helper'
require_relative './../support/onboarding_steps'
require_relative '../support/onboarding_steps'

RSpec.describe 'boards onboarding tour',
js: true do
# We decrease the notification polling interval because some portions of the JS code rely on something triggering
# the Angular change detection. This is usually done by the notification polling, but we don't want to wait
RSpec.describe 'boards onboarding tour', :js, with_settings: { notifications_polling_interval: 1_000 } do
let(:next_button) { find('.enjoyhint_next_btn') }
let(:user) do
create(:admin,
Expand Down
7 changes: 4 additions & 3 deletions modules/storages/spec/features/manage_project_storage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
# Setup storages in Project -> Settings -> File Storages
# This tests assumes that a Storage has already been setup
# in the Admin section, tested by admin_storage_spec.rb.
RSpec.describe(
'Activation of storages in projects', :js, :webmock
) do

# We decrease the notification polling interval because some portions of the JS code rely on something triggering
# the Angular change detection. This is usually done by the notification polling, but we don't want to wait
RSpec.describe 'Activation of storages in projects', :js, :webmock, with_settings: { notifications_polling_interval: 1_000 } do
let(:user) { create(:user) }
# The first page is the Project -> Settings -> General page, so we need
# to provide the user with the edit_project permission in the role.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
require 'spec_helper'
require_relative '../../support/onboarding/onboarding_steps'

RSpec.describe 'team planner onboarding tour', :js,
with_cuprite: false,
with_ee: %i[team_planner_view] do
RSpec.describe 'team planner onboarding tour', :js, with_cuprite: false, with_ee: %i[team_planner_view],
# We decrease the notification polling interval because some portions
# of the JS code rely on something triggering the Angular change detection.
# This is usually done by the notification polling, but we don't want to wait
with_settings: { notifications_polling_interval: 1_000 } do
let(:next_button) { find('.enjoyhint_next_btn') }

let(:demo_project) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

RSpec.describe "Notification center", :js, :with_cuprite,
with_ee: %i[date_alerts],
with_settings: { journal_aggregation_time_minutes: 0 } do
# We decrease the notification polling interval because some portions of the JS code rely on something triggering
# the Angular change detection. This is usually done by the notification polling, but we don't want to wait
with_settings: { journal_aggregation_time_minutes: 0, notifications_polling_interval: 1_000 } do
# Notice that the setup in this file here is not following the normal rules as
# it also tests notification creation.
let!(:project1) { create(:project) }
Expand Down

0 comments on commit 733513b

Please sign in to comment.