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

attempt to stabilize spec

ulfertsdb9c9893f68c
diff --git a/spec/features/work_packages/bulk/copy_work_package_spec.rb b/spec/features/work_packages/bulk/copy_work_package_spec.rb
index ac974ed5422..7afa384efa1 100644
--- a/spec/features/work_packages/bulk/copy_work_package_spec.rb
+++ b/spec/features/work_packages/bulk/copy_work_package_spec.rb
@@ -63,6 +63,7 @@ describe 'Copy work packages through Rails view', js: true do
describe 'copying work packages' do
context 'with permission' do
let(:current_user) { mover }
+ let(:wp_table_target) { ::Pages::WorkPackagesTable.new(project2) }
before do
wp_table.expect_work_package_count 2
@@ -83,7 +84,8 @@ describe 'Copy work packages through Rails view', js: true do
notes.set_markdown 'A note on copy'
click_on 'Copy and follow'
- wp_table.expect_work_package_count 2
+ wp_table_target.expect_current_path
+ wp_table_target.expect_work_package_count 2
expect(page).to have_selector('#projects-menu', text: 'Target')
# Should not move the sources
@@ -109,8 +111,8 @@ describe 'Copy work packages through Rails view', js: true do
it 'moves parent and child wp to a new project with the hierarchy amended' do
click_on 'Copy and follow'
- expect_angular_frontend_initialized
- wp_table.expect_work_package_count 3
+ wp_table_target.expect_current_path
+ wp_table_target.expect_work_package_count 3
expect(page).to have_selector('#projects-menu', text: 'Target')
# Should not move the sources