diff --git a/test/fixtures/units.yml b/test/fixtures/units.yml index 3a5fad3..d580608 100644 --- a/test/fixtures/units.yml +++ b/test/fixtures/units.yml @@ -34,7 +34,7 @@ mg: name: milligram multiplier: 0.001 base: g -g: +g_alice: user: alice symbol: g name: gram diff --git a/test/system/units_test.rb b/test/system/units_test.rb index 85ccd80..3769bed 100644 --- a/test/system/units_test.rb +++ b/test/system/units_test.rb @@ -36,7 +36,6 @@ class UnitsTest < ApplicationSystemTestCase end end - assert_current_path units_path within('tbody') do assert_no_selector :fillable_field assert_selector 'tr', count: @user.units.count diff --git a/test/system/users_test.rb b/test/system/users_test.rb index 0440c27..f8a3286 100644 --- a/test/system/users_test.rb +++ b/test/system/users_test.rb @@ -84,6 +84,8 @@ class UsersTest < ApplicationSystemTestCase with: users.reject(&:confirmed?).sample.email assert_emails 1 do click_on t(:resend_confirmation) + # Wait until redirected to make sure async request has been processed + assert_current_path new_user_session_path end assert_current_path new_user_session_path assert_text t("devise.confirmations.send_instructions") @@ -138,8 +140,7 @@ class UsersTest < ApplicationSystemTestCase end test "delete profile" do - user = users.select(&:confirmed?).sample - sign_in user: user + user = sign_in # TODO: remove condition after root_url changed to different path than # profile in routes.rb unless has_current_path?(edit_user_registration_path)