diff --git a/app/helpers/absences_helper.rb b/app/helpers/absences_helper.rb index d7255d5ea5..dd5922c4f1 100644 --- a/app/helpers/absences_helper.rb +++ b/app/helpers/absences_helper.rb @@ -1,5 +1,5 @@ module AbsencesHelper - CALENDAR_BACKGROUND_COLOR = "rgba(127, 140, 141, 0.7)".freeze + CALENDAR_BACKGROUND_COLOR = "rgba(52, 57, 58, 0.7)".freeze def absence_tag(absence) if absence.expired? diff --git a/app/services/off_days.rb b/app/services/off_days.rb index 2931b6653e..555b15b953 100644 --- a/app/services/off_days.rb +++ b/app/services/off_days.rb @@ -65,6 +65,7 @@ def self.to_full_calendar_array start: jour_ferie.beginning_of_day.as_json, end: jour_ferie.end_of_day.as_json, backgroundColor: AbsencesHelper::CALENDAR_BACKGROUND_COLOR, + textColor: "white", } end end diff --git a/spec/controllers/admin/api/agenda/absences_controller_spec.rb b/spec/controllers/admin/api/agenda/absences_controller_spec.rb index 1348423977..fd70b385ca 100644 --- a/spec/controllers/admin/api/agenda/absences_controller_spec.rb +++ b/spec/controllers/admin/api/agenda/absences_controller_spec.rb @@ -48,7 +48,7 @@ "title" => absence.title, "start" => absence.starts_at.as_json, "end" => absence.ends_at.as_json, - "backgroundColor" => "rgba(127, 140, 141, 0.7)", + "backgroundColor" => "rgba(52, 57, 58, 0.7)", "url" => "/admin/organisations/#{organisation.id}/absences/#{absence.id}/edit", }, ] diff --git a/spec/features/agents/rdvs_collectifs/agent_can_create_rdv_collectif_spec.rb b/spec/features/agents/rdvs_collectifs/agent_can_create_rdv_collectif_spec.rb index 74c1890a7e..70433050d7 100644 --- a/spec/features/agents/rdvs_collectifs/agent_can_create_rdv_collectif_spec.rb +++ b/spec/features/agents/rdvs_collectifs/agent_can_create_rdv_collectif_spec.rb @@ -18,6 +18,10 @@ stub_netsize_ok travel_to(now) login_as(agent, scope: :agent) + # Depuis que les jours fériés sont affichés sur la journée complète dans le calendrier, + # cela peut nous empêcher de cliquer sur une plage horaire et générer une flaky. + # On les retire pour ce test + allow(OffDays).to receive(:to_full_calendar_array).and_return([]) visit admin_organisation_agent_agenda_path(organisation, agent) end diff --git a/spec/services/off_days_spec.rb b/spec/services/off_days_spec.rb index 2b83179c02..d7e27eb47c 100644 --- a/spec/services/off_days_spec.rb +++ b/spec/services/off_days_spec.rb @@ -41,8 +41,8 @@ describe ".to_full_calendar_array" do it "returns the proper format for full calendar" do array = described_class.to_full_calendar_array - expect(array[0].keys).to match_array(%i[title start end backgroundColor]) - expect(array[0][:backgroundColor]).to eq "rgba(127, 140, 141, 0.7)" + expect(array[0].keys).to match_array(%i[title start end backgroundColor textColor]) + expect(array[0][:backgroundColor]).to eq "rgba(52, 57, 58, 0.7)" end end end