Browse Source

Maintenance: sleep 5 if remote url is present

Mantas Masalskis 2 years ago
parent
commit
eb62797eb7

+ 0 - 1
app/controllers/users_controller.rb

@@ -918,7 +918,6 @@ curl http://localhost/api/v1/users/avatar -v -u #{login}:#{password} -H "Content
     user.save!
 
     if params[:invite].present?
-      sleep 5 if ENV['REMOTE_URL'].present?
       token = Token.create(action: 'PasswordReset', user_id: user.id)
       NotificationFactory::Mailer.notification(
         template: 'user_invite',

+ 2 - 1
spec/system/setup/first_steps_spec.rb

@@ -35,8 +35,9 @@ RSpec.describe 'First Steps', type: :system do
       click('button')
     end
 
-    wait.until { expect(User.last).to have_attributes(firstname: 'Bob', lastname: 'Smith', group_ids: [target_group.id]) }
     expect(page).to have_no_text 'Sending'
+
+    expect(User.last).to have_attributes(firstname: 'Bob', lastname: 'Smith', group_ids: [target_group.id])
   end
 
   it 'invites customer' do

+ 0 - 8
test/browser/abb_one_group_test.rb

@@ -64,10 +64,6 @@ class AgentTicketActionLevel0Test < TestCase
       fast: true,
       ajax: false,
     )
-    watch_for(
-      css:   'body div.modal',
-      value: 'Sending',
-    )
     watch_for_disappear(
       css:   'body div.modal',
       value: 'Sending',
@@ -101,10 +97,6 @@ class AgentTicketActionLevel0Test < TestCase
       fast: true,
       ajax: false,
     )
-    watch_for(
-      css:   'body div.modal',
-      value: 'Sending',
-    )
     watch_for_disappear(
       css:   'body div.modal',
       value: 'Sending',