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
Don't move the card by index, but by name
Oliver Günthera6586e2c2f6f
diff --git a/modules/boards/spec/features/action_boards/status_type_moving_board_spec.rb b/modules/boards/spec/features/action_boards/status_type_moving_board_spec.rbindex f1d24175e7e..9713303aabd 100644--- a/modules/boards/spec/features/action_boards/status_type_moving_board_spec.rb+++ b/modules/boards/spec/features/action_boards/status_type_moving_board_spec.rb@@ -143,7 +143,7 @@ RSpec.describe 'Status action board', :js, with_ee: %i[board_view] dosleep 2# Move bug to open- board_page.move_card(1, from: 'Closed', to: 'Open')+ board_page.move_card_by_name('Closed bug item', from: 'Closed', to: 'Open')board_page.wait_for_lists_reloadboard_page.expect_card('Closed', 'Closed bug item', present: false)diff --git a/modules/boards/spec/features/support/board_page.rb b/modules/boards/spec/features/support/board_page.rbindex 09204566889..ad58aed80f6 100644--- a/modules/boards/spec/features/support/board_page.rb+++ b/modules/boards/spec/features/support/board_page.rb@@ -174,6 +174,13 @@ module Pagesdrag_n_drop_element(from: source, to: target)end+ def move_card_by_name(text, from:, to:)+ source = page.find("#{list_selector(from)} [data-test-selector='op-wp-single-card']", text: text)+ target = page.find list_selector(to)++ drag_n_drop_element(from: source, to: target)+ end+def wait_for_lists_reload# wait for reload of lists to start and finish# Not sure if that's the most reliable way to do it, but there is nothing visible