Class: Bucky::TestEquipment::Verifications::ServiceVerifications
- Inherits:
-
Object
- Object
- Bucky::TestEquipment::Verifications::ServiceVerifications
- Defined in:
- lib/bucky/test_equipment/verifications/service_verifications.rb
Instance Attribute Summary collapse
-
#e2e_verification ⇒ Object
readonly
Returns the value of attribute e2e_verification.
Instance Method Summary collapse
-
#initialize(args) ⇒ ServiceVerifications
constructor
A new instance of ServiceVerifications.
- #method_missing(verification, **args) ⇒ Object
Constructor Details
#initialize(args) ⇒ ServiceVerifications
Returns a new instance of ServiceVerifications.
16 17 18 19 20 21 22 23 24 |
# File 'lib/bucky/test_equipment/verifications/service_verifications.rb', line 16 def initialize(args) @service = args[:service] @device = args[:device] @driver = args[:driver] @pages = args[:pages] @test_case_name = args[:method_name] collect_verifications @e2e_verification = Bucky::TestEquipment::Verifications::E2eVerification.new(@driver, @pages, @test_case_name) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(verification, **args) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/bucky/test_equipment/verifications/service_verifications.rb', line 26 def method_missing(verification, **args) if e2e_verification.respond_to? verification puts " #{verification} is defined in E2eVerificationClass." e2e_verification.send(verification, args[:exec]) elsif args[:exec].key?(:page) send(args[:exec][:page]).send(verification, args[:exec]) else raise StandardError, "Undefined verification method or invalid arguments. #{verification},#{args[:exec]}" end rescue StandardError => e Bucky::Core::Exception::WebdriverException.handle(e, "#{args[:step_number]}:#{args[:proc_name]}") end |
Instance Attribute Details
#e2e_verification ⇒ Object (readonly)
Returns the value of attribute e2e_verification.
9 10 11 |
# File 'lib/bucky/test_equipment/verifications/service_verifications.rb', line 9 def e2e_verification @e2e_verification end |