Commit 9d425085 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix-flaky-vsa-tests' into 'master'

Fix flaky VSA tests

See merge request gitlab-org/gitlab!47915
parents 572bb643 efad10d1
......@@ -193,9 +193,12 @@ export const getDurationChartData = (data, startDate, endDate) => {
const flattenedData = flattenDurationChartData(data);
const eventData = [];
const endOfDay = newDate(endDate);
endOfDay.setHours(23, 59, 59); // make sure we're at the end of the day
for (
let currentDate = newDate(startDate);
currentDate <= endDate;
currentDate <= endOfDay;
currentDate = dayAfter(currentDate)
) {
const currentISODate = dateFormat(newDate(currentDate), dateFormats.isoDate);
......
......@@ -281,13 +281,14 @@ RSpec.describe 'Group value stream analytics filters and data', :js do
end
context 'with lots of data', :js do
let_it_be(:issue) { create(:issue, project: project, created_at: 5.days.ago) }
let_it_be(:issue) { create(:issue, project: project) }
around do |example|
freeze_time { example.run }
end
before do
issue.update!(created_at: 5.days.ago)
create_cycle(user, project, issue, mr, milestone, pipeline)
create(:labeled_issue, created_at: 5.days.ago, project: create(:project, group: group), labels: [group_label1])
create(:labeled_issue, created_at: 3.days.ago, project: create(:project, group: group), labels: [group_label2])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment