Skip to content

Commit

Permalink
follow rubocop(target_ver:3.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
T-Y89 committed Oct 23, 2024
1 parent c809fb2 commit 8d872bd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/bucky/core/test_core/test_class_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def add_test_procedure(procedures)
procedure[:proc] ||= ''.dup
puts " #{step_number}:#{procedure[:proc]}"
method = procedure[:exec].key?(:operate) ? :operate : :verify
send(method, exec: procedure[:exec], step_number: step_number, proc_name: procedure[:proc])
send(method, exec: procedure[:exec], step_number:, proc_name: procedure[:proc])
end
end

Expand Down Expand Up @@ -75,7 +75,7 @@ def generate_test_class(data: [], linkstatus_url_log: {}, w_pipe: {})
define_method(method_name) do
puts "\n#{simple_test_class_name(name)}"
t_case[:urls].each do |url|
linkstatus_check_args = { url: url, device: data[:suite][:device], exclude_urls: data[:suite][:exclude_urls], link_check_max_times: test_cond[:link_check_max_times], url_log: linkstatus_url_log }
linkstatus_check_args = { url:, device: data[:suite][:device], exclude_urls: data[:suite][:exclude_urls], link_check_max_times: test_cond[:link_check_max_times], url_log: linkstatus_url_log }
linkstatus_check(linkstatus_check_args)
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def create_webdriver(device_type)
driver_args = create_driver_args(device_type)
# Correctly create an options object
options = generate_desire_caps(device_type)
driver = Selenium::WebDriver.for :remote, url: driver_args[:url], options: options, http_client: driver_args[:http_client]
driver = Selenium::WebDriver.for :remote, url: driver_args[:url], options:, http_client: driver_args[:http_client]
driver.manage.window.resize_to(1920, 1080)
driver.manage.timeouts.implicit_wait = @@config[:find_element_timeout]
driver
Expand Down
2 changes: 1 addition & 1 deletion lib/bucky/test_equipment/test_case/e2e_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def shutdown; end
def t_equip_setup
@driver = create_webdriver(suite_data[:device])
@pages = Bucky::TestEquipment::PageObject::Pages.new(suite_data[:service], suite_data[:device], @driver)
service_verifications_args = { service: suite_data[:service], device: suite_data[:device], driver: @driver, pages: @pages, method_name: method_name }
service_verifications_args = { service: suite_data[:service], device: suite_data[:device], driver: @driver, pages: @pages, method_name: }
@service_verifications = Bucky::TestEquipment::Verifications::ServiceVerifications.new(service_verifications_args)
user_operator_args = { app: suite_data[:service], device: suite_data[:device], driver: @driver, pages: @pages }
@user_operator = Bucky::TestEquipment::UserOperation::UserOperator.new(user_operator_args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def collect_verifications
page_class_name = page_name.split('_').map(&:capitalize).join

# Get instance of page object
page_class = eval(format('Services::%<module_service_name>s::%<device>s::Verifications::%<page_class_name>s', module_service_name: module_service_name, device: @device.capitalize, page_class_name: page_class_name))
page_class = eval(format('Services::%<module_service_name>s::%<device>s::Verifications::%<page_class_name>s', module_service_name:, device: @device.capitalize, page_class_name:))
page_instance = page_class.new(@driver, @pages, @test_case_name)

self.class.class_eval do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
let(:e2e_verification) { double('e2e_verification') }
let(:assert_title_mock) { double('assert_title_mock') }
let(:page_name) { :sample_page }
let(:args) { { service: 'service_a', device: 'pc', driver: 'driver', method_name: 'test_case_name', pages: pages } }
let(:args) { { service: 'service_a', device: 'pc', driver: 'driver', method_name: 'test_case_name', pages: } }
let(:bucky_home) { './spec/test_code' }

subject { Bucky::TestEquipment::Verifications::ServiceVerifications.new(args) }
Expand Down

0 comments on commit 8d872bd

Please sign in to comment.