Skip to content

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

Adapt test to new min-width for Gantt charts

Henriette Dargee28db8c2fb9c
diff --git a/frontend/src/app/shared/components/resizer/resizer/wp-resizer.component.ts b/frontend/src/app/shared/components/resizer/resizer/wp-resizer.component.ts
index 11e284bd39a..2ab52d9d40c 100644
--- a/frontend/src/app/shared/components/resizer/resizer/wp-resizer.component.ts
+++ b/frontend/src/app/shared/components/resizer/resizer/wp-resizer.component.ts
@@ -55,7 +55,7 @@ export class WpResizerDirective extends UntilDestroyedMixin implements OnInit, A
@Input() localStorageKey:string;
- @Input() variableName:string = "--split-screen-width";
+ @Input() variableName:string = '--split-screen-width';
private resizingElement:HTMLElement;
diff --git a/modules/gantt/spec/features/timeline/timeline_dates_spec.rb b/modules/gantt/spec/features/timeline/timeline_dates_spec.rb
index b0f4f503df0..c207898cf92 100644
--- a/modules/gantt/spec/features/timeline/timeline_dates_spec.rb
+++ b/modules/gantt/spec/features/timeline/timeline_dates_spec.rb
@@ -229,25 +229,25 @@ RSpec.describe "Work package timeline date formatting",
it "displays the hover bar correctly" do
# Expect no hover bar when hovering over a non working day
- row.hover_bar(offset_days: -1)
+ row.hover_bar(offset_days: -2)
row.expect_no_hovered_bar
# Expect timeline bar when clicking on a non working day
- row.click_bar(offset_days: -1)
+ row.click_bar(offset_days: -2)
row.expect_no_bar
# Expect hovered bar size to equal duration
- row.hover_bar
+ row.hover_bar(offset_days: -1)
row.expect_hovered_bar(duration: work_package_with_non_working_days.duration)
# Expect hovered bar size to equal duration + non working days
# when the hovered bar passes through non working days
- row.hover_bar(offset_days: 1)
+ row.hover_bar(offset_days: 0)
row.expect_hovered_bar(duration: work_package_with_non_working_days.duration + 2)
end
describe "set the start, due date while preserving duration" do
- subject { row.click_bar }
+ subject { row.click_bar(offset_days: -1) }
it_behaves_like "sets dates, duration and displays bar" do
let(:target_wp) { work_package_with_non_working_days }
@@ -260,7 +260,7 @@ RSpec.describe "Work package timeline date formatting",
end
describe "set the start, due date while preserving duration over the weekend" do
- subject { row.click_bar(offset_days: 1) }
+ subject { row.click_bar }
it_behaves_like "sets dates, duration and displays bar" do
let(:target_wp) { work_package_with_non_working_days }
@@ -273,7 +273,7 @@ RSpec.describe "Work package timeline date formatting",
end
describe "sets the start, due dates while preserving duration on a drag and drop create" do
- subject { row.drag_and_drop(days: 5) }
+ subject { row.drag_and_drop(offset_days: -1, days: 5) }
it_behaves_like "sets dates, duration and displays bar" do
let(:target_wp) { work_package_with_non_working_days }
@@ -286,7 +286,7 @@ RSpec.describe "Work package timeline date formatting",
end
describe "sets the start, due dates while preserving duration on a drag and drop create over the weekend" do
- subject { row.drag_and_drop(offset_days: 1, days: 7) }
+ subject { row.drag_and_drop(days: 7) }
it_behaves_like "sets dates, duration and displays bar" do
let(:target_wp) { work_package_with_non_working_days }
@@ -299,7 +299,7 @@ RSpec.describe "Work package timeline date formatting",
end
describe "sets the start, due dates and duration on a drag and drop create over the weekend" do
- subject { row.drag_and_drop(offset_days: 1, days: 8) }
+ subject { row.drag_and_drop(days: 8) }
it_behaves_like "sets dates, duration and displays bar" do
let(:target_wp) { work_package_with_non_working_days }
@@ -313,13 +313,13 @@ RSpec.describe "Work package timeline date formatting",
it "cancels when the drag starts or finishes on a weekend" do
# Finish on the weekend
- row.drag_and_drop(offset_days: 1, days: 5)
+ row.drag_and_drop(days: 5)
row.expect_no_bar
expect { work_package_with_non_working_days.reload }.not_to change { work_package_with_non_working_days }
# Start on the weekend
- row.drag_and_drop(offset_days: -1, days: 5)
+ row.drag_and_drop(offset_days: -2, days: 5)
row.expect_no_bar
expect { work_package_with_non_working_days.reload }.not_to change { work_package_with_non_working_days }
@@ -329,7 +329,7 @@ RSpec.describe "Work package timeline date formatting",
let(:row) { wp_timeline.timeline_row work_package_without_non_working_days.id }
describe "sets the start, due dates and duration on a drag and drop create over the weekend" do
- subject { row.drag_and_drop(offset_days: 1, days: 8) }
+ subject { row.drag_and_drop(days: 8) }
it_behaves_like "sets dates, duration and displays bar" do
let(:target_wp) { work_package_without_non_working_days }