Browse Source

Maintenance: Stabilize registration spec.

Dusan Vuckovic 1 month ago
parent
commit
1327ecd087
1 changed files with 6 additions and 9 deletions
  1. 6 9
      spec/system/apps/desktop/registration_spec.rb

+ 6 - 9
spec/system/apps/desktop/registration_spec.rb

@@ -13,25 +13,22 @@ RSpec.describe 'Desktop > Registration', app: :desktop_view, authenticated_as: f
   end
 
   it 'Register a new user and log in with the confirmation link' do
-    visit '/login', skip_waiting: true
+    visit '/login'
 
     click_on 'Register'
 
-    fill_in 'First name', with: 'John'
-    fill_in 'Last name',  with: 'Doe'
-    fill_in 'Email', with: 'john.doe@example.com'
-    fill_in 'Password', with: 's3cr3tPassWord'
-    fill_in 'Confirm password', with: 's3cr3tPassWord'
+    find_input('First name').type('John')
+    find_input('Email').type('john.doe@example.com')
+    find_input('Password').type('s3cr3tPassWord')
+    find_input('Confirm password').type('s3cr3tPassWord')
 
     click_on 'Create my account'
 
     expect(page).to have_text('Thanks for joining. Email sent to "john.doe@example.com".')
-
     expect(notification_url).to be_present
+
     visit notification_url.sub(%r{.*/desktop/}, '')
 
     expect_current_route '/'
-
-    wait_for_test_flag('useSessionUserStore.getCurrentUser.loaded')
   end
 end