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

Retry principal_step if user cannot be found

Oliver Günther5c3e2a00af4d
diff --git a/spec/features/users/invite_user_modal/custom_fields_spec.rb b/spec/features/users/invite_user_modal/custom_fields_spec.rb
index f7181243b64..bb75b81c433 100644
--- a/spec/features/users/invite_user_modal/custom_fields_spec.rb
+++ b/spec/features/users/invite_user_modal/custom_fields_spec.rb
@@ -76,21 +76,22 @@ describe 'Invite user modal custom fields', js: true do
end
it 'shows the required fields during the principal step' do
- visit home_path
+ retry_block do
+ visit home_path
- quick_add.expect_visible
+ quick_add.expect_visible
- quick_add.toggle
+ quick_add.toggle
- quick_add.click_link 'Invite user'
+ quick_add.click_link 'Invite user'
- modal.project_step
+ modal.project_step
- # Fill the principal and try to go to next
- sleep 1
- modal.principal_step
+ # Fill the principal and try to go to next
+ modal.principal_step
- expect(page).to have_selector('form.ng-invalid', wait: 10)
+ page.find('form.ng-invalid', wait: 10)
+ end
modal.within_modal do
expect(page).to have_text "bool can't be blank."