Browse Source

Maintenance: Update dependency rubocop-rspec to v2.25.0

renovatebot 1 year ago
parent
commit
e6358be945

+ 4 - 4
Gemfile.lock

@@ -538,9 +538,9 @@ GEM
       unicode-display_width (>= 2.4.0, < 3.0)
     rubocop-ast (1.30.0)
       parser (>= 3.2.1.0)
-    rubocop-capybara (2.18.0)
+    rubocop-capybara (2.19.0)
       rubocop (~> 1.41)
-    rubocop-factory_bot (2.23.1)
+    rubocop-factory_bot (2.24.0)
       rubocop (~> 1.33)
     rubocop-faker (1.1.0)
       faker (>= 2.12.0)
@@ -558,8 +558,8 @@ GEM
       activesupport (>= 4.2.0)
       rack (>= 1.1)
       rubocop (>= 1.33.0, < 2.0)
-    rubocop-rspec (2.24.1)
-      rubocop (~> 1.33)
+    rubocop-rspec (2.25.0)
+      rubocop (~> 1.40)
       rubocop-capybara (~> 2.17)
       rubocop-factory_bot (~> 2.22)
     ruby-progressbar (1.13.0)

+ 1 - 1
spec/system/admin/knowledge_base/delete_spec.rb

@@ -14,7 +14,7 @@ RSpec.describe 'Admin Panel > Knowledge Base > Delete', type: :system do
   it 'deletes the knowledge base' do
     find('input[name="title"]').fill_in with: knowledge_base.translations.first.title
 
-    click_on 'Delete Knowledge Base'
+    click_button 'Delete Knowledge Base'
 
     expect(KnowledgeBase.count).to be_zero
   end

+ 1 - 1
spec/system/admin_password_auth_spec.rb

@@ -50,7 +50,7 @@ RSpec.describe 'Admin password auth', type: :system do
 
         visit "/#login/admin/#{generated_tokens.first.token}"
 
-        expect(page).to have_selector '#username'
+        expect(page).to have_css '#username'
       end
     end
   end

+ 5 - 5
spec/system/apps/mobile/ticket_articles_spec.rb

@@ -26,7 +26,7 @@ RSpec.describe 'Mobile > Ticket > Articles', app: :mobile, authenticated_as: :ag
 
     it 'switches article to internal' do
       find('[data-name="article-context"]').click
-      click_on 'Set to internal'
+      click_button 'Set to internal'
       wait_for_gql('shared/entities/ticket-article/graphql/mutations/changeVisibility.graphql')
       expect(page).to have_css('.Article.Internal')
     end
@@ -36,8 +36,8 @@ RSpec.describe 'Mobile > Ticket > Articles', app: :mobile, authenticated_as: :ag
 
       it 'deletes article' do
         find('[data-name="article-context"]').click
-        click_on 'Delete Article'
-        click_on 'OK'
+        click_button 'Delete Article'
+        click_button 'OK'
 
         expect(page).to have_no_text(article.body)
       end
@@ -91,8 +91,8 @@ RSpec.describe 'Mobile > Ticket > Articles', app: :mobile, authenticated_as: :ag
 
       expect(page).to have_button('Delete Article')
 
-      click_on 'Delete Article'
-      click_on 'OK'
+      click_button 'Delete Article'
+      click_button 'OK'
 
       expect(page).to have_no_text(articles.last.body)
     end

+ 2 - 2
spec/system/apps/mobile/tickets/articles/create_spec.rb

@@ -172,8 +172,8 @@ RSpec.describe 'Mobile > Ticket > Article > Create', app: :mobile, authenticated
           find('[data-name="article-context"]').click
         end
 
-        click_on 'Delete Article'
-        click_on 'OK'
+        click_button 'Delete Article'
+        click_button 'OK'
 
         wait_for_subscription_update('ticketArticleUpdates', number: number)
       end

+ 15 - 15
spec/system/apps/mobile/tickets/articles/list_subscription_spec.rb

@@ -35,7 +35,7 @@ RSpec.describe 'Mobile > Ticket > Articles List subscription', app: :mobile, aut
 
     visit_ticket
 
-    expect(page).to have_selector('[role="comment"]', count: 3)
+    expect(page).to have_css('[role="comment"]', count: 3)
 
     article = create(:ticket_article, body: 'New Article', ticket: ticket)
 
@@ -49,7 +49,7 @@ RSpec.describe 'Mobile > Ticket > Articles List subscription', app: :mobile, aut
 
     visit_ticket
 
-    expect(page).to have_selector('[role="comment"]', count: 3)
+    expect(page).to have_css('[role="comment"]', count: 3)
 
     remove_article = articles.second
     remove_article_body = remove_article.body
@@ -58,7 +58,7 @@ RSpec.describe 'Mobile > Ticket > Articles List subscription', app: :mobile, aut
 
     wait_for_ticket_articles(number: 2)
 
-    expect(page).to have_selector('[role="comment"]', count: 2)
+    expect(page).to have_css('[role="comment"]', count: 2)
     expect(page).to have_no_text(remove_article_body)
   end
 
@@ -88,14 +88,14 @@ RSpec.describe 'Mobile > Ticket > Articles List subscription', app: :mobile, aut
 
       visit_ticket
 
-      expect(page).to have_selector('[role="comment"]', count: 2)
+      expect(page).to have_css('[role="comment"]', count: 2)
 
       article = articles.last
       article.update!(internal: false)
 
       wait_for_ticket_articles(number: 2)
 
-      expect(page).to have_selector('[role="comment"]', count: 3)
+      expect(page).to have_css('[role="comment"]', count: 3)
       expect(page).to have_text(article.body)
     end
 
@@ -104,14 +104,14 @@ RSpec.describe 'Mobile > Ticket > Articles List subscription', app: :mobile, aut
 
       visit_ticket
 
-      expect(page).to have_selector('[role="comment"]', count: 3)
+      expect(page).to have_css('[role="comment"]', count: 3)
 
       article = articles.last
       article.update!(internal: true)
 
       wait_for_ticket_articles(number: 2)
 
-      expect(page).to have_selector('[role="comment"]', count: 2)
+      expect(page).to have_css('[role="comment"]', count: 2)
       expect(page).to have_no_text(article.body)
     end
 
@@ -123,14 +123,14 @@ RSpec.describe 'Mobile > Ticket > Articles List subscription', app: :mobile, aut
       visit_ticket
 
       expect(page).to have_no_text('load 1 more')
-      expect(page).to have_selector('[role="comment"]', count: 6)
+      expect(page).to have_css('[role="comment"]', count: 6)
 
       article.update!(internal: false)
 
       wait_for_ticket_articles(number: 2)
 
       expect(page).to have_no_text('load 1 more')
-      expect(page).to have_selector('[role="comment"]', count: 7)
+      expect(page).to have_css('[role="comment"]', count: 7)
       expect(page).to have_text(article.body)
     end
 
@@ -140,14 +140,14 @@ RSpec.describe 'Mobile > Ticket > Articles List subscription', app: :mobile, aut
       visit_ticket
 
       expect(page).to have_no_text('load 1 more')
-      expect(page).to have_selector('[role="comment"]', count: 6)
+      expect(page).to have_css('[role="comment"]', count: 6)
 
       articles.second.update!(internal: true)
 
       wait_for_ticket_article_updates
 
       expect(page).to have_no_text('load 1 more')
-      expect(page).to have_selector('[role="comment"]', count: 5)
+      expect(page).to have_css('[role="comment"]', count: 5)
       expect(page).to have_no_text(articles.second.body)
     end
 
@@ -159,14 +159,14 @@ RSpec.describe 'Mobile > Ticket > Articles List subscription', app: :mobile, aut
       visit_ticket
 
       expect(page).to have_text('load 1 more')
-      expect(page).to have_selector('[role="comment"]', count: 6)
+      expect(page).to have_css('[role="comment"]', count: 6)
 
       article.update!(internal: false)
 
       wait_for_ticket_articles(number: 2)
 
       expect(page).to have_no_text('load 1 more')
-      expect(page).to have_selector('[role="comment"]', count: 8)
+      expect(page).to have_css('[role="comment"]', count: 8)
     end
 
     it 'updates the list after a non-visible article in between is switched to internal' do
@@ -175,14 +175,14 @@ RSpec.describe 'Mobile > Ticket > Articles List subscription', app: :mobile, aut
       visit_ticket
 
       expect(page).to have_text('load 1 more')
-      expect(page).to have_selector('[role="comment"]', count: 6)
+      expect(page).to have_css('[role="comment"]', count: 6)
 
       articles.second.update!(internal: true)
 
       wait_for_ticket_article_updates
 
       expect(page).to have_no_text('load 1 more')
-      expect(page).to have_selector('[role="comment"]', count: 6)
+      expect(page).to have_css('[role="comment"]', count: 6)
     end
   end
 

+ 1 - 1
spec/system/apps/mobile/tickets/ticket_mention_spec.rb

@@ -25,7 +25,7 @@ RSpec.describe 'Mobile > Ticket > Mentions', app: :mobile, authenticated_as: :ag
 
     expect(page).to have_button('Unsubscribe')
 
-    click_on 'Done'
+    click_button 'Done'
 
     expect(find_toggle('Get notified')).to be_toggled_on
     expect(Mention.subscribed?(ticket, agent)).to be true

+ 1 - 1
spec/system/apps/mobile/user/detail_view_edit_spec.rb

@@ -116,7 +116,7 @@ RSpec.describe 'Mobile > Search > User > Edit', app: :mobile, authenticated_as:
       find_autocomplete('Secondary organizations')
         .search_for_options(organizations[0..1].map(&:name))
 
-      click_on 'Save'
+      click_button 'Save'
 
       expect(page)
         .to have_multiple_texts(organizations[0..1].map(&:name))

+ 2 - 2
spec/system/channels/twitter_spec.rb

@@ -16,7 +16,7 @@ RSpec.describe 'Manage > Channels > Twitter', :use_vcr, type: :system do
           in_modal do
             fill_in 'Twitter Consumer Key *',    with: 'some_key',    exact: true
             fill_in 'Twitter Consumer Secret *', with: 'some_secret', exact: true
-            click_on 'Submit'
+            click_button 'Submit'
 
             expect(page).to have_css('.alert', text: '401 Unauthorized (Invalid credentials may be to blame.)')
           end
@@ -35,7 +35,7 @@ RSpec.describe 'Manage > Channels > Twitter', :use_vcr, type: :system do
             fill_in 'Twitter Access Token *',          with: 'some_oauth_token',        exact: true
             fill_in 'Twitter Access Token Secret *',   with: 'some_oauth_token_secret', exact: true
             fill_in 'Twitter Dev environment label *', with: 'some_env',                exact: true
-            click_on 'Submit'
+            click_button 'Submit'
 
             expect(page).to have_css('.alert', text: '401 Unauthorized (Invalid credentials may be to blame.)')
           end

+ 2 - 2
spec/system/chat_spec.rb

@@ -111,7 +111,7 @@ RSpec.describe 'Chat Handling', type: :system do
       expect(page).to have_no_css('.active .chat-window .chat-status.is-modified')
 
       # Keep focus outside of chat window to check .chat-status.is-modified later.
-      click_on 'Dashboard'
+      click_link 'Dashboard'
 
       using_session :customer do
         check_content('.zammad-chat .zammad-chat-agent-status', 'Online')
@@ -385,7 +385,7 @@ RSpec.describe 'Chat Handling', type: :system do
 
           visit chat_url
           click '.zammad-chat .js-chat-open'
-          expect(page).to have_selector('.js-restart', wait: 60)
+          expect(page).to have_css('.js-restart', wait: 60)
           click '.js-chat-toggle .zammad-chat-header-icon'
           expect(page).to have_no_selector('zammad-chat-is-open', wait: 60)
         end

Some files were not shown because too many files changed in this diff