Skip to content

Commit

Permalink
Merge pull request #14280 from opf/chore/retry-until-ng-select-accept…
Browse files Browse the repository at this point in the history
…s-input

Retry until ng-select is ready to accept events in `custom_actions_spec.rb`
  • Loading branch information
aaron-contreras committed Nov 29, 2023
2 parents 7e96390 + acc334f commit ee31f9d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
15 changes: 12 additions & 3 deletions spec/features/work_packages/custom_actions/custom_actions_spec.rb
Expand Up @@ -316,15 +316,24 @@

wp_page.click_custom_action('Unassign')
wp_page.expect_attributes assignee: '-'
within '.work-package-details-activities-list' do
expect(page)
.to have_css('.op-user-activity .op-user-activity--user-name',
text: user.name,
wait: 10)
end

wp_page.click_custom_action('Escalate')
wp_page.expect_attributes priority: immediate_priority.name,
status: default_status.name,
assignee: '-',
"customField#{list_custom_field.id}" => selected_list_custom_field_options.map(&:name).join("\n")

expect(page)
.to have_css('.work-package-details-activities-activity-contents a.user-mention', text: other_member_user.name, wait: 10)
within '.work-package-details-activities-list' do
expect(page)
.to have_css('.op-user-activity a.user-mention',
text: other_member_user.name,
wait: 10)
end

wp_page.click_custom_action('Close')
wp_page.expect_attributes status: closed_status.name,
Expand Down
8 changes: 5 additions & 3 deletions spec/support/pages/admin/custom_actions/form.rb
Expand Up @@ -86,10 +86,12 @@ def set_action(name, value)

def set_condition(name, value)
Array(value).each do |val|
set_condition_value(name, val)
retry_block do
set_condition_value(name, val)

within '#custom-actions-form--conditions' do
expect_selected_option val
within '#custom-actions-form--conditions' do
expect_selected_option val
end
end
end
end
Expand Down

0 comments on commit ee31f9d

Please sign in to comment.