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
use current headless
ulfertsa1d5b972cd17
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.rbindex 7c4fa6476b7..d0a473755c0 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@@ -31,7 +31,6 @@ require "spec_helper"require_relative "../../support/pages/my/page"RSpec.describe "My spent time widget with a negative time zone", :js,- driver: :chrome_headless_new,with_settings: { start_of_week: 1 } dolet(:beginning_of_week) { monday }let(:end_of_week) { sunday }@@ -39,7 +38,7 @@ RSpec.describe "My spent time widget with a negative time zone", :js,let(:tuesday) { beginning_of_week + 1.day }let(:thursday) { beginning_of_week + 3.days }let(:sunday) { beginning_of_week + 6.days }- let(:time_zone) { "America/Phoenix" }+ let(:time_zone) { "America/New_York" }let!(:type) { create(:type) }let!(:project) { create(:project, types: [type]) }@@ -68,19 +67,13 @@ RSpec.describe "My spent time widget with a negative time zone", :js,let!(:week_days) { week_with_saturday_and_sunday_as_weekend }let!(:non_working_day) { create(:non_working_day, date: tuesday) }- # Configure the time zone of the browser- # @param [String] time_zone The time zone to set, for instance 'Europe/Paris'- def set_browser_time_zone(time_zone)- page.driver.browser.execute_cdp("Emulation.setTimezoneOverride", timezoneId: time_zone)- end-before dologin_as user- set_browser_time_zone(time_zone)my_page.visit!end- it "correctly displays non-working days and prefills day when logging time [fix #49779]" do+ it "correctly displays non-working days and prefills day when logging time [fix #49779]",+ driver: :chrome_new_york_time_zone domy_page.add_widget(1, 1, :within, "My spent time")my_page.expect_and_dismiss_toaster message: I18n.t(:notice_successful_update)diff --git a/spec/support/browsers/chrome.rb b/spec/support/browsers/chrome.rbindex 380c43a8aa6..7feaea4e843 100644--- a/spec/support/browsers/chrome.rb+++ b/spec/support/browsers/chrome.rb@@ -96,19 +96,6 @@ Billy.configure do |c|endend-# Register Chrome with new headless implementation-#-# Our tests are not that stable with the new headless mode, but since-# Chrome 120 the old headless mode has browser name-# "chrome-headless-shell". This name is not recognized by the current-# selenium-webdriver and so some extensions like `execute_cdp` are-# missing. This wil be fixed in next selenium-webdriver version. See-# https://github.com/SeleniumHQ/selenium/pull/13271 for more information.-#-# In the meantime, registering a :chrome_headless_new driver which uses the-# `headless=new` flag for tests that need it.-register_chrome "en", name: :chrome_headless_new, headless: "new"-# Register mocking proxy driverregister_chrome "en", name: :chrome_billy do |options|options.add_argument("proxy-server=#{Billy.proxy.host}:#{Billy.proxy.port}")