Browse Source

Maintenance: Prefer selector from used variable over hardcoded string.

Mantas Masalskis 5 years ago
parent
commit
89c74ba829
1 changed files with 2 additions and 2 deletions
  1. 2 2
      spec/system/ticket/update_spec.rb

+ 2 - 2
spec/system/ticket/update_spec.rb

@@ -41,7 +41,7 @@ RSpec.describe 'Ticket Update', type: :system do
 
       within(:active_content) do
         # update should work now
-        find('.edit [name=internal_name1]').select('name 2')
+        find(".edit [name=#{attribute.name}]").select('name 2')
         click('.js-attributeBar .js-submit')
         expect(page).to have_no_css('.js-submitDropdown .js-submit[disabled]', wait: 2)
       end
@@ -85,7 +85,7 @@ RSpec.describe 'Ticket Update', type: :system do
                                  },
                                })
 
-      # refresh browser to get macro accessable
+      # refresh browser to get macro accessible
       refresh
 
       # create a new ticket and attempt to update its state without the required select attribute