automation_object 0.7.6 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/automation_object/blue_print.rb +1 -0
- data/lib/automation_object/blue_print/composite/{automatic_onload_modal.rb → automatic_modal_change.rb} +3 -4
- data/lib/automation_object/blue_print/composite/base.rb +1 -0
- data/lib/automation_object/blue_print/composite/custom_method.rb +2 -3
- data/lib/automation_object/blue_print/composite/element.rb +2 -3
- data/lib/automation_object/blue_print/composite/element_array.rb +2 -3
- data/lib/automation_object/blue_print/composite/element_hash.rb +2 -3
- data/lib/automation_object/blue_print/composite/helpers/container_helper.rb +75 -0
- data/lib/automation_object/blue_print/composite/helpers/element_helper.rb +30 -1
- data/lib/automation_object/blue_print/composite/helpers/multiple_elements_helper.rb +1 -0
- data/lib/automation_object/blue_print/composite/hook.rb +18 -6
- data/lib/automation_object/blue_print/composite/hook_action.rb +3 -4
- data/lib/automation_object/blue_print/composite/hook_element_requirements.rb +3 -4
- data/lib/automation_object/blue_print/composite/modal.rb +12 -9
- data/lib/automation_object/blue_print/composite/screen.rb +17 -14
- data/lib/automation_object/blue_print/composite/top.rb +3 -2
- data/lib/automation_object/blue_print/composite/view.rb +8 -7
- data/lib/automation_object/blue_print/hash_adapter.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/{automatic_onload_modal.rb → automatic_modal_change.rb} +3 -2
- data/lib/automation_object/blue_print/hash_adapter/composite.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/custom_method.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/element.rb +2 -0
- data/lib/automation_object/blue_print/hash_adapter/element_array.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/element_hash.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/helpers/element_helper.rb +8 -2
- data/lib/automation_object/blue_print/hash_adapter/helpers/multiple_elements_helper.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/helpers/validation_error.rb +2 -1
- data/lib/automation_object/blue_print/hash_adapter/helpers/validation_helper.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/helpers/validators/validate.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/helpers/validators/validate_allowed_keys.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/helpers/validators/validate_element_presence_of.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/helpers/validators/validate_instance_of.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/helpers/validators/validate_modal_presence_of.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/helpers/validators/validate_presence_of.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/helpers/validators/validate_screen_presence_of.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/helpers/validators/validate_view_presence_of.rb +1 -0
- data/lib/automation_object/blue_print/hash_adapter/hook.rb +2 -1
- data/lib/automation_object/blue_print/hash_adapter/hook_action.rb +4 -3
- data/lib/automation_object/blue_print/hash_adapter/hook_element_requirements.rb +2 -1
- data/lib/automation_object/blue_print/hash_adapter/modal.rb +2 -1
- data/lib/automation_object/blue_print/hash_adapter/screen.rb +14 -13
- data/lib/automation_object/blue_print/hash_adapter/top.rb +3 -2
- data/lib/automation_object/blue_print/hash_adapter/view.rb +12 -11
- data/lib/automation_object/blue_print/yaml_adapter.rb +1 -0
- data/lib/automation_object/driver.rb +1 -0
- data/lib/automation_object/driver/appium_adapter/driver.rb +2 -1
- data/lib/automation_object/driver/appium_adapter/element.rb +1 -0
- data/lib/automation_object/driver/base.rb +1 -0
- data/lib/automation_object/driver/common_selenium/driver.rb +1 -0
- data/lib/automation_object/driver/common_selenium/element.rb +1 -0
- data/lib/automation_object/driver/common_selenium/element_geometry.rb +1 -0
- data/lib/automation_object/driver/driver.rb +1 -0
- data/lib/automation_object/driver/element.rb +1 -0
- data/lib/automation_object/driver/nokogiri_adapter/driver.rb +5 -8
- data/lib/automation_object/driver/nokogiri_adapter/element.rb +9 -14
- data/lib/automation_object/driver/nokogiri_adapter/error.rb +1 -0
- data/lib/automation_object/driver/nokogiri_adapter/form.rb +1 -0
- data/lib/automation_object/driver/nokogiri_adapter/request.rb +1 -0
- data/lib/automation_object/driver/nokogiri_adapter/session.rb +1 -0
- data/lib/automation_object/driver/nokogiri_adapter/window.rb +1 -0
- data/lib/automation_object/driver/selenium_adapter/driver.rb +1 -0
- data/lib/automation_object/driver/selenium_adapter/element.rb +1 -0
- data/lib/automation_object/dsl.rb +4 -2
- data/lib/automation_object/dsl/_base.rb +11 -1
- data/lib/automation_object/dsl/_error.rb +71 -0
- data/lib/automation_object/dsl/_proxy.rb +1 -0
- data/lib/automation_object/dsl/element.rb +2 -2
- data/lib/automation_object/dsl/element_array.rb +2 -2
- data/lib/automation_object/dsl/element_hash.rb +2 -2
- data/lib/automation_object/dsl/modal.rb +47 -2
- data/lib/automation_object/dsl/screen.rb +67 -3
- data/lib/automation_object/dsl/top.rb +19 -0
- data/lib/automation_object/framework.rb +18 -1
- data/lib/automation_object/helpers/composite.rb +3 -1
- data/lib/automation_object/helpers/composite_hook.rb +1 -0
- data/lib/automation_object/helpers/file.rb +1 -0
- data/lib/automation_object/helpers/hash.rb +1 -0
- data/lib/automation_object/helpers/kernel.rb +1 -0
- data/lib/automation_object/helpers/reflection.rb +1 -0
- data/lib/automation_object/helpers/string.rb +1 -0
- data/lib/automation_object/proxy/mutex_proxy.rb +1 -0
- data/lib/automation_object/proxy/proxy.rb +1 -0
- data/lib/automation_object/proxy/throttle_proxy.rb +2 -1
- data/lib/automation_object/state.rb +5 -1
- data/lib/automation_object/state/_base.rb +2 -1
- data/lib/automation_object/state/_common_element.rb +5 -0
- data/lib/automation_object/state/_error.rb +1 -0
- data/lib/automation_object/state/automatic_modal_change.rb +13 -0
- data/lib/automation_object/state/automatic_screen_changes.rb +13 -0
- data/lib/automation_object/state/element.rb +2 -1
- data/lib/automation_object/state/element_array.rb +2 -1
- data/lib/automation_object/state/element_hash.rb +2 -1
- data/lib/automation_object/state/element_proxy.rb +1 -0
- data/lib/automation_object/state/helpers/automatic_routing.rb +96 -0
- data/lib/automation_object/state/helpers/container_helper.rb +46 -0
- data/lib/automation_object/state/hook.rb +1 -0
- data/lib/automation_object/state/hook_action.rb +1 -0
- data/lib/automation_object/state/hook_actions/action_loop.rb +1 -0
- data/lib/automation_object/state/hook_actions/change_screen.rb +1 -0
- data/lib/automation_object/state/hook_actions/change_to_previous_screen.rb +1 -0
- data/lib/automation_object/state/hook_actions/close_modal.rb +1 -0
- data/lib/automation_object/state/hook_actions/close_screen.rb +1 -0
- data/lib/automation_object/state/hook_actions/element_requirement.rb +1 -0
- data/lib/automation_object/state/hook_actions/new_screen.rb +1 -0
- data/lib/automation_object/state/hook_actions/possible_screen_changes.rb +1 -0
- data/lib/automation_object/state/hook_actions/reset_screen.rb +1 -0
- data/lib/automation_object/state/hook_actions/show_modal.rb +1 -0
- data/lib/automation_object/state/hook_actions/sleep.rb +1 -0
- data/lib/automation_object/state/hook_actions/wait_for_elements.rb +1 -0
- data/lib/automation_object/state/modal.rb +5 -14
- data/lib/automation_object/state/screen.rb +33 -19
- data/lib/automation_object/state/top.rb +17 -2
- data/lib/automation_object/step_definitions.rb +3 -4
- data/lib/automation_object/step_definitions/element.rb +22 -23
- data/lib/automation_object/step_definitions/element_array.rb +26 -27
- data/lib/automation_object/step_definitions/element_hash.rb +26 -27
- data/lib/automation_object/step_definitions/modal.rb +31 -0
- data/lib/automation_object/step_definitions/screen.rb +22 -10
- data/lib/automation_object/step_definitions/support/cache.rb +5 -2
- data/lib/automation_object/step_definitions/support/element_array.rb +1 -1
- data/lib/automation_object/step_definitions/support/parse.rb +1 -1
- data/lib/automation_object/version.rb +2 -1
- metadata +59 -39
- data/lib/automation_object/step_definitions/support/minitest.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb61b7d19da29a48f5444b2b1abe5ef3813daf05
|
4
|
+
data.tar.gz: afe8919e786499ef1ba563f93c5060d9bdab3c44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d7b4c210aee08a2ee8a568cdf5d9cfb19e0e3885ee94e011233aa42761fa79cd84bd6a833b7542fefd084fd7eb6d09ada93981b45afd8bb99b750a105fc0c87
|
7
|
+
data.tar.gz: 61866d54c863b0f462eb3c8cab35fcf10c890c8d46ad1cea36e9ce3ed9621288b85385fd66b179f1014105f6072bef07df53e8e34cc02cf8862bbb26363ab719
|
@@ -1,14 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
# Require parent class
|
3
4
|
require_relative 'base'
|
4
5
|
|
5
6
|
module AutomationObject
|
6
7
|
module BluePrint
|
7
8
|
module Composite
|
8
|
-
#
|
9
|
-
|
10
|
-
# classes use this as a template to add additional adapters
|
11
|
-
class AutomaticOnloadModal < Base
|
9
|
+
# AutomaticModalChange composite class
|
10
|
+
class AutomaticModalChange < Base
|
12
11
|
# @return [Symbol, nil]
|
13
12
|
def modal_name
|
14
13
|
adapter.modal_name
|
@@ -1,13 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
# Require parent class
|
3
4
|
require_relative 'base'
|
4
5
|
|
5
6
|
module AutomationObject
|
6
7
|
module BluePrint
|
7
8
|
module Composite
|
8
|
-
# CustomMethod composite class
|
9
|
-
# Hoping to improve code completion and standard interface where
|
10
|
-
# classes use this as a template to add additional adapters
|
9
|
+
# CustomMethod composite class
|
11
10
|
class CustomMethod < Base
|
12
11
|
# @return [Symbol, nil]
|
13
12
|
def element_method
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
# Require parent class
|
3
4
|
require_relative 'base'
|
4
5
|
|
@@ -10,9 +11,7 @@ require_relative 'helpers/element_helper'
|
|
10
11
|
module AutomationObject
|
11
12
|
module BluePrint
|
12
13
|
module Composite
|
13
|
-
# Element composite class
|
14
|
-
# Hoping to improve code completion and standard interface where
|
15
|
-
# classes use this as a template to add additional adapters
|
14
|
+
# Element composite class
|
16
15
|
class Element < Base
|
17
16
|
include ElementHelper
|
18
17
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
# Require parent class
|
3
4
|
require_relative 'base'
|
4
5
|
|
@@ -10,9 +11,7 @@ require_relative 'helpers/multiple_elements_helper'
|
|
10
11
|
module AutomationObject
|
11
12
|
module BluePrint
|
12
13
|
module Composite
|
13
|
-
# ElementArray composite class
|
14
|
-
# Hoping to improve code completion and standard interface where
|
15
|
-
# classes use this as a template to add additional adapters
|
14
|
+
# ElementArray composite class
|
16
15
|
class ElementArray < Base
|
17
16
|
include ElementHelper
|
18
17
|
include MultipleElementsHelper
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
# Require parent class
|
3
4
|
require_relative 'base'
|
4
5
|
|
@@ -10,9 +11,7 @@ require_relative 'helpers/multiple_elements_helper'
|
|
10
11
|
module AutomationObject
|
11
12
|
module BluePrint
|
12
13
|
module Composite
|
13
|
-
# ElementHash composite class
|
14
|
-
# Hoping to improve code completion and standard interface where
|
15
|
-
# classes use this as a template to add additional adapters
|
14
|
+
# ElementHash composite class
|
16
15
|
class ElementHash < Base
|
17
16
|
include ElementHelper
|
18
17
|
include MultipleElementsHelper
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Require parent class
|
4
|
+
module AutomationObject
|
5
|
+
module BluePrint
|
6
|
+
module Composite
|
7
|
+
# Screen composite class
|
8
|
+
module ContainerHelper
|
9
|
+
# @return [Array<AutomationObject::BluePrint::Composite::AutomaticModalChange>]
|
10
|
+
def automatic_modal_changes
|
11
|
+
adapter.automatic_modal_changes
|
12
|
+
end
|
13
|
+
|
14
|
+
# @return [Array<Symbol>]
|
15
|
+
def automatic_screen_changes
|
16
|
+
adapter.automatic_screen_changes
|
17
|
+
end
|
18
|
+
|
19
|
+
# @return [AutomationObject::BluePrint::Composite::Hook]
|
20
|
+
def load
|
21
|
+
adapter.load
|
22
|
+
end
|
23
|
+
|
24
|
+
# @return [Hash<AutomationObject::BluePrint::Composite::Element>]
|
25
|
+
def elements
|
26
|
+
adapter.elements
|
27
|
+
end
|
28
|
+
|
29
|
+
# @return [Hash<AutomationObject::BluePrint::Composite::ElementArray>]
|
30
|
+
def element_arrays
|
31
|
+
adapter.element_arrays
|
32
|
+
end
|
33
|
+
|
34
|
+
# @return [Hash<AutomationObject::BluePrint::Composite::ElementHash>]
|
35
|
+
def element_hashes
|
36
|
+
adapter.element_hashes
|
37
|
+
end
|
38
|
+
|
39
|
+
# Get possible changes
|
40
|
+
# @return [Array<Symbol>]
|
41
|
+
def changes
|
42
|
+
changes = []
|
43
|
+
elements.merge(element_arrays).merge(element_hashes).each_value do |element|
|
44
|
+
changes += element.changes
|
45
|
+
end
|
46
|
+
|
47
|
+
changes.uniq.compact
|
48
|
+
end
|
49
|
+
|
50
|
+
# @param name [Symbol] name of container you want to go to
|
51
|
+
# @return [Symbol, Symbol] name and type of element
|
52
|
+
def element_to_container(name)
|
53
|
+
elements.merge(element_arrays).merge(element_hashes).each do |element_name, element|
|
54
|
+
next unless element.changes.include?(name)
|
55
|
+
|
56
|
+
element_type = nil
|
57
|
+
|
58
|
+
case element
|
59
|
+
when Element
|
60
|
+
element_type = :elements
|
61
|
+
when ElementArray
|
62
|
+
element_type = :element_arrays
|
63
|
+
when ElementHash
|
64
|
+
element_type = :element_hashes
|
65
|
+
end
|
66
|
+
|
67
|
+
return element_name, element_type
|
68
|
+
end
|
69
|
+
|
70
|
+
[nil, nil]
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -1,9 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module AutomationObject
|
3
4
|
module BluePrint
|
4
5
|
module Composite
|
5
6
|
# Helper module for Element composite classes
|
6
7
|
module ElementHelper
|
8
|
+
# @return [String, nil] text input for automatic screen/modal change if needed
|
9
|
+
def default_input
|
10
|
+
adapter.default_input
|
11
|
+
end
|
12
|
+
|
7
13
|
# @return [Array<Symbol, String>, nil] params as an array for driver find_element args
|
8
14
|
def selector_params
|
9
15
|
adapter.selector_params
|
@@ -23,10 +29,33 @@ module AutomationObject
|
|
23
29
|
adapter.method_hook?(name)
|
24
30
|
end
|
25
31
|
|
26
|
-
# @return [Hash<Hook>]
|
32
|
+
# @return [Hash<AutomationObject::BluePrint::Composite::Hook>] hash of Hook that are defined under the element
|
27
33
|
def method_hooks
|
28
34
|
adapter.method_hooks
|
29
35
|
end
|
36
|
+
|
37
|
+
# Get possible changes
|
38
|
+
# @return [Array<Symbol>]
|
39
|
+
def changes
|
40
|
+
changes = []
|
41
|
+
method_hooks.each_value do |hook|
|
42
|
+
changes += hook.changes
|
43
|
+
end
|
44
|
+
|
45
|
+
changes.uniq.compact
|
46
|
+
end
|
47
|
+
|
48
|
+
# @param name [Symbol] name of container you want to go to
|
49
|
+
# @return [Symbol] method name
|
50
|
+
def method_to_container(name)
|
51
|
+
method_hooks.each do |method_name, hook|
|
52
|
+
next unless hook.changes.include?(name)
|
53
|
+
|
54
|
+
return method_name
|
55
|
+
end
|
56
|
+
|
57
|
+
nil
|
58
|
+
end
|
30
59
|
end
|
31
60
|
end
|
32
61
|
end
|
@@ -1,28 +1,40 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
# Require parent class
|
3
4
|
require_relative 'base'
|
4
5
|
|
5
6
|
module AutomationObject
|
6
7
|
module BluePrint
|
7
8
|
module Composite
|
8
|
-
# Hook composite class
|
9
|
-
# Hoping to improve code completion and standard interface where
|
10
|
-
# classes use this as a template to add additional adapters
|
9
|
+
# Hook composite class
|
11
10
|
class Hook < Base
|
12
|
-
# @return [HookAction]
|
11
|
+
# @return [AutomationObject::BluePrint::Composite::HookAction]
|
13
12
|
def before
|
14
13
|
adapter.before
|
15
14
|
end
|
16
15
|
|
17
|
-
# @return [HookAction]
|
16
|
+
# @return [AutomationObject::BluePrint::Composite::HookAction]
|
18
17
|
def after
|
19
18
|
adapter.after
|
20
19
|
end
|
21
20
|
|
22
|
-
# @return [Array<HookElementRequirements>] array of element requirements
|
21
|
+
# @return [Array<AutomationObject::BluePrint::Composite::HookElementRequirements>] array of element requirements
|
23
22
|
def live?
|
24
23
|
adapter.live?
|
25
24
|
end
|
25
|
+
|
26
|
+
# Get possible changes
|
27
|
+
# @return [Array<Symbol>]
|
28
|
+
def changes
|
29
|
+
[before.change_screen, before.new_screen,
|
30
|
+
after.change_screen, after.new_screen, before.show_modal, after.show_modal].uniq.compact
|
31
|
+
end
|
32
|
+
|
33
|
+
# @param name [Symbol]
|
34
|
+
# @return [Boolean]
|
35
|
+
def changes_to_container?(name)
|
36
|
+
changes.include?(name)
|
37
|
+
end
|
26
38
|
end
|
27
39
|
end
|
28
40
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
# Require parent class
|
3
4
|
require_relative 'base'
|
4
5
|
|
@@ -7,9 +8,7 @@ require_relative 'hook_element_requirements'
|
|
7
8
|
module AutomationObject
|
8
9
|
module BluePrint
|
9
10
|
module Composite
|
10
|
-
# HookAction composite class
|
11
|
-
# Hoping to improve code completion and standard interface where
|
12
|
-
# classes use this as a template to add additional adapters
|
11
|
+
# HookAction composite class
|
13
12
|
class HookAction < Base
|
14
13
|
# Get the order to run the hook in
|
15
14
|
# @return [Array<Symbol>] list of hook methods to run in given order
|
@@ -75,7 +74,7 @@ module AutomationObject
|
|
75
74
|
end
|
76
75
|
|
77
76
|
# Custom method for array of children instead of Hash
|
78
|
-
# @return [Array<HookElementRequirements>] array of wait for element children
|
77
|
+
# @return [Array<AutomationObject::BluePrint::Composite::HookElementRequirements>] array of wait for element children
|
79
78
|
def wait_for_elements
|
80
79
|
adapter.wait_for_elements
|
81
80
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
# Require parent class
|
3
4
|
require_relative 'base'
|
4
5
|
|
@@ -7,9 +8,7 @@ require_relative 'element'
|
|
7
8
|
module AutomationObject
|
8
9
|
module BluePrint
|
9
10
|
module Composite
|
10
|
-
# HookElementRequirements composite class
|
11
|
-
# Hoping to improve code completion and standard interface where
|
12
|
-
# classes use this as a template to add additional adapters
|
11
|
+
# HookElementRequirements composite class
|
13
12
|
class HookElementRequirements < Base
|
14
13
|
# Get the order to run the hook in
|
15
14
|
# @return [Array<Symbol>] list of hook methods to run in given order
|
@@ -29,7 +28,7 @@ module AutomationObject
|
|
29
28
|
adapter.element_name
|
30
29
|
end
|
31
30
|
|
32
|
-
#
|
31
|
+
# Convenience for getting element blueprints
|
33
32
|
# @return [AutomationObject::BluePrint::Composite::Element]
|
34
33
|
def element_blueprints(composite_object = nil)
|
35
34
|
adapter.element_blueprints(composite_object)
|
@@ -1,42 +1,45 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
# Require parent class
|
3
4
|
require_relative 'base'
|
4
5
|
|
5
|
-
require_relative '
|
6
|
+
require_relative 'automatic_modal_change'
|
6
7
|
require_relative 'hook'
|
7
8
|
|
8
9
|
require_relative 'element'
|
9
10
|
require_relative 'element_array'
|
10
11
|
require_relative 'element_hash'
|
11
12
|
|
13
|
+
require_relative 'helpers/container_helper'
|
14
|
+
|
12
15
|
module AutomationObject
|
13
16
|
module BluePrint
|
14
17
|
module Composite
|
15
|
-
# Modal composite class
|
16
|
-
# Hoping to improve code completion and standard interface where
|
17
|
-
# classes use this as a template to add additional adapters
|
18
|
+
# Modal composite class
|
18
19
|
class Modal < Base
|
20
|
+
include ContainerHelper
|
21
|
+
|
19
22
|
# @return [Array<Symbol>]
|
20
23
|
def included_views
|
21
|
-
adapter.
|
24
|
+
adapter.included_views
|
22
25
|
end
|
23
26
|
|
24
|
-
# @return [Hook]
|
27
|
+
# @return [AutomationObject::BluePrint::Composite::Hook]
|
25
28
|
def load
|
26
29
|
adapter.load
|
27
30
|
end
|
28
31
|
|
29
|
-
# @return [Hash<Element>]
|
32
|
+
# @return [Hash<AutomationObject::BluePrint::Composite::Element>]
|
30
33
|
def elements
|
31
34
|
adapter.elements
|
32
35
|
end
|
33
36
|
|
34
|
-
# @return [Hash<ElementArray>]
|
37
|
+
# @return [Hash<AutomationObject::BluePrint::Composite::ElementArray>]
|
35
38
|
def element_arrays
|
36
39
|
adapter.element_arrays
|
37
40
|
end
|
38
41
|
|
39
|
-
# @return [Hash<ElementHash>]
|
42
|
+
# @return [Hash<AutomationObject::BluePrint::Composite::ElementHash>]
|
40
43
|
def element_hashes
|
41
44
|
adapter.element_hashes
|
42
45
|
end
|
@@ -1,8 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
# Require parent class
|
3
4
|
require_relative 'base'
|
4
5
|
|
5
|
-
require_relative '
|
6
|
+
require_relative 'automatic_modal_change'
|
6
7
|
require_relative 'hook'
|
7
8
|
|
8
9
|
require_relative 'modal'
|
@@ -10,16 +11,18 @@ require_relative 'element'
|
|
10
11
|
require_relative 'element_array'
|
11
12
|
require_relative 'element_hash'
|
12
13
|
|
14
|
+
require_relative 'helpers/container_helper'
|
15
|
+
|
13
16
|
module AutomationObject
|
14
17
|
module BluePrint
|
15
18
|
module Composite
|
16
|
-
# Screen composite class
|
17
|
-
# Hoping to improve code completion and standard interface where
|
18
|
-
# classes use this as a template to add additional adapters
|
19
|
+
# Screen composite class
|
19
20
|
class Screen < Base
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
include ContainerHelper
|
22
|
+
|
23
|
+
# @return [Array<AutomationObject::BluePrint::Composite::AutomaticModalChange>]
|
24
|
+
def automatic_modal_changes
|
25
|
+
adapter.automatic_modal_changes
|
23
26
|
end
|
24
27
|
|
25
28
|
# @return [Array<Symbol>]
|
@@ -27,37 +30,37 @@ module AutomationObject
|
|
27
30
|
adapter.automatic_screen_changes
|
28
31
|
end
|
29
32
|
|
30
|
-
# @return [Hook]
|
33
|
+
# @return [AutomationObject::BluePrint::Composite::Hook]
|
31
34
|
def accept
|
32
35
|
adapter.accept
|
33
36
|
end
|
34
37
|
|
35
|
-
# @return [Hook]
|
38
|
+
# @return [AutomationObject::BluePrint::Composite::Hook]
|
36
39
|
def dismiss
|
37
40
|
adapter.dismiss
|
38
41
|
end
|
39
42
|
|
40
|
-
# @return [Hook]
|
43
|
+
# @return [AutomationObject::BluePrint::Composite::Hook]
|
41
44
|
def load
|
42
45
|
adapter.load
|
43
46
|
end
|
44
47
|
|
45
|
-
# @return [Hash<Modal>]
|
48
|
+
# @return [Hash<AutomationObject::BluePrint::Composite::Modal>]
|
46
49
|
def modals
|
47
50
|
adapter.modals
|
48
51
|
end
|
49
52
|
|
50
|
-
# @return [Hash<Element>]
|
53
|
+
# @return [Hash<AutomationObject::BluePrint::Composite::Element>]
|
51
54
|
def elements
|
52
55
|
adapter.elements
|
53
56
|
end
|
54
57
|
|
55
|
-
# @return [Hash<ElementArray>]
|
58
|
+
# @return [Hash<AutomationObject::BluePrint::Composite::ElementArray>]
|
56
59
|
def element_arrays
|
57
60
|
adapter.element_arrays
|
58
61
|
end
|
59
62
|
|
60
|
-
# @return [Hash<ElementHash>]
|
63
|
+
# @return [Hash<AutomationObject::BluePrint::Composite::ElementHash>]
|
61
64
|
def element_hashes
|
62
65
|
adapter.element_hashes
|
63
66
|
end
|