Don't use jQuery animations in tests.
There's a flaky test creating a group for a budget which takes place because toggling a form using jQuery sometimes results in the button not being correctly clicked by Capybara. Checking the page with `expect(page).to have_button 'Create group'` before clicking the button doesn't solve the problem; it looks like in those cases Capybara waits for AJAX requests but not for JavaScript animations. See also issue #2573.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
<%= content_for :head %>
|
||||
<%= csrf_meta_tags %>
|
||||
<%= favicon_link_tag "favicon.ico" %>
|
||||
<%= javascript_tag "jQuery.fx.off = true" if Rails.env.test? %>
|
||||
</head>
|
||||
|
||||
<body class="admin" data-watch-form-message="<%= I18n.t('layouts.admin.watch_form_message') %>">
|
||||
|
||||
Reference in New Issue
Block a user