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
Update spec to match new desired behavior
Aaron Contreras58dd83fa16e8
diff --git a/spec/features/work_packages/bulk/move_work_package_spec.rb b/spec/features/work_packages/bulk/move_work_package_spec.rbindex 43f3b35bf9d..68fa09f984b 100644--- a/spec/features/work_packages/bulk/move_work_package_spec.rb+++ b/spec/features/work_packages/bulk/move_work_package_spec.rb@@ -126,19 +126,22 @@ RSpec.describe "Moving a work package through Rails view", :js docontext "when the target project does not have the type" dolet!(:project2) { create(:project, name: "Target", types: [type2]) }- it "does moves the work package and changes the type", :with_cuprite do+ it "does not move the work package", :with_cuprite doclick_on "Move and follow"wait_for_reload- page.find(".inline-edit--container.subject", text: work_package.subject)- page.find_by_id("projects-menu", text: "Target")++ expect(page)+ .to have_css(".op-toast.-error",+ text: I18n.t(:"work_packages.bulk.none_could_be_saved",+ total: 1))# Should NOT have movedchild_wp.reloadwork_package.reload- expect(work_package.project_id).to eq(project2.id)- expect(work_package.type_id).to eq(type2.id)- expect(child_wp.project_id).to eq(project2.id)- expect(child_wp.type_id).to eq(type2.id)+ expect(work_package.project_id).to eq(project.id)+ expect(work_package.type_id).to eq(type.id)+ expect(child_wp.project_id).to eq(project.id)+ expect(child_wp.type_id).to eq(type.id)endend@@ -168,26 +171,6 @@ RSpec.describe "Moving a work package through Rails view", :js doexpect(child_wp.project_id).to eq(project.id)expect(child_wp.type_id).to eq(type.id)end-- it "does moves the work package when the required field is set" do- select "Risk", from: "Type"- fill_in required_cf.name, with: "1"-- # Clicking move and follow might be broken due to the location.href- # in the refresh-on-form-changes component- retry_block do- click_on "Move and follow"- end-- expect(page).to have_css(".op-toast.-success")-- child_wp.reload- work_package.reload- expect(work_package.project_id).to eq(project2.id)- expect(work_package.type_id).to eq(type2.id)- expect(child_wp.project_id).to eq(project2.id)- expect(child_wp.type_id).to eq(type2.id)- endendend