calios-uikit-extension 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ceae5deeeea5e86148a7c27182a7cdd642022cc0
|
4
|
+
data.tar.gz: b0ed25e7c5b7d29d9b3f79edda3f3a5bf8752793
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cddc8a5f1f57d3342143e848a7015a14596e906f93ffad43d690dd97880635e344651791b3179d64b2972e269159328e7d45b4766ccb0e7676189df44605343d
|
7
|
+
data.tar.gz: b17499b124e79cdc0f065186a1747b9c617b579a5a1cfc195c9ec52a4bbf1e16eb4e3f91c3d57bdfa154a317c06870916c9ea6230a747429203a78ee633e8f08
|
@@ -7,6 +7,7 @@ require 'calios-uikit-extension/ui_button'
|
|
7
7
|
require 'calios-uikit-extension/ui_collection_view'
|
8
8
|
require 'calios-uikit-extension/ui_collection_view_cell'
|
9
9
|
require 'calios-uikit-extension/ui_label'
|
10
|
+
require 'calios-uikit-extension/ui_search_bar'
|
10
11
|
require 'calios-uikit-extension/ui_switch'
|
11
12
|
require 'calios-uikit-extension/ui_table_view'
|
12
13
|
require 'calios-uikit-extension/ui_table_view_cell'
|
@@ -0,0 +1,131 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
class SpecUISearchBar < Minitest::Spec
|
4
|
+
before do
|
5
|
+
$uiquery = nil
|
6
|
+
$args = nil
|
7
|
+
end
|
8
|
+
|
9
|
+
after do
|
10
|
+
# nop
|
11
|
+
end
|
12
|
+
|
13
|
+
describe 'UISearchBar' do
|
14
|
+
describe 'UISearchBar.class_name' do
|
15
|
+
it 'should return class name' do
|
16
|
+
UISearchBar.class_name.must_equal('UISearchBar')
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe 'UISearchBar.text' do
|
21
|
+
it 'should call Calabash query method with correct parameters' do
|
22
|
+
$stub_query_response = %w(abc def ghi)
|
23
|
+
|
24
|
+
UISearchBar.text.must_equal('abc')
|
25
|
+
$uiquery.must_equal("#{UISearchBar.class_name}")
|
26
|
+
$args.first.must_equal(:text)
|
27
|
+
|
28
|
+
UISearchBar.text(0).must_equal('abc')
|
29
|
+
$uiquery.must_equal("#{UISearchBar.class_name} index:0")
|
30
|
+
$args.first.must_equal(:text)
|
31
|
+
|
32
|
+
UISearchBar.text('myId').must_equal('abc')
|
33
|
+
$uiquery.must_equal("#{UISearchBar.class_name} marked:'myId'")
|
34
|
+
$args.first.must_equal(:text)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe 'UISearchBar.touch and aliases' do
|
39
|
+
it 'should call Calabash touch method with correct parameters' do
|
40
|
+
UISearchBar.touch
|
41
|
+
$uiquery.must_equal("#{UISearchBar.class_name}")
|
42
|
+
|
43
|
+
UISearchBar.touch(0)
|
44
|
+
$uiquery.must_equal("#{UISearchBar.class_name} index:0")
|
45
|
+
|
46
|
+
UISearchBar.touch('myId')
|
47
|
+
$uiquery.must_equal("#{UISearchBar.class_name} marked:'myId'")
|
48
|
+
|
49
|
+
UISearchBar.tap
|
50
|
+
$uiquery.must_equal("#{UISearchBar.class_name}")
|
51
|
+
|
52
|
+
UISearchBar.tap(0)
|
53
|
+
$uiquery.must_equal("#{UISearchBar.class_name} index:0")
|
54
|
+
|
55
|
+
UISearchBar.tap('myId')
|
56
|
+
$uiquery.must_equal("#{UISearchBar.class_name} marked:'myId'")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
describe 'UISearchBar.double_tap' do
|
61
|
+
it 'should call Calabash double_tap method with correct parameters' do
|
62
|
+
UISearchBar.double_tap
|
63
|
+
$uiquery.must_equal(UISearchBar.class_name)
|
64
|
+
|
65
|
+
UISearchBar.double_tap(0)
|
66
|
+
$uiquery.must_equal("#{UISearchBar.class_name} index:0")
|
67
|
+
|
68
|
+
UISearchBar.double_tap('myId')
|
69
|
+
$uiquery.must_equal("#{UISearchBar.class_name} marked:'myId'")
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe 'UISearchBar.property and aliases' do
|
74
|
+
it 'should call Calabash query method with correct parameters' do
|
75
|
+
UISearchBar.property(:finland)
|
76
|
+
$uiquery.must_equal("#{UISearchBar.class_name}")
|
77
|
+
$args.first.must_equal(:finland)
|
78
|
+
|
79
|
+
UISearchBar.prop(:finland)
|
80
|
+
$uiquery.must_equal("#{UISearchBar.class_name}")
|
81
|
+
$args.first.must_equal(:finland)
|
82
|
+
|
83
|
+
UISearchBar.p(:finland)
|
84
|
+
$uiquery.must_equal("#{UISearchBar.class_name}")
|
85
|
+
$args.first.must_equal(:finland)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
describe 'UISearchBar.accessibility_label and aliases' do
|
90
|
+
it 'should call Calabash query method with correct parameters' do
|
91
|
+
UISearchBar.accessibility_label
|
92
|
+
$uiquery.must_equal("#{UISearchBar.class_name}")
|
93
|
+
$args.first.must_equal(:accessibilityLabel)
|
94
|
+
|
95
|
+
UISearchBar.label
|
96
|
+
$uiquery.must_equal("#{UISearchBar.class_name}")
|
97
|
+
$args.first.must_equal(:accessibilityLabel)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
describe 'UISearchBar.accessibility_identifier and aliases' do
|
102
|
+
it 'should call Calabash query method with correct parameters' do
|
103
|
+
UISearchBar.accessibility_identifier
|
104
|
+
$uiquery.must_equal("#{UISearchBar.class_name}")
|
105
|
+
$args.first.must_equal(:accessibilityIdentifier)
|
106
|
+
|
107
|
+
UISearchBar.identifier
|
108
|
+
$uiquery.must_equal("#{UISearchBar.class_name}")
|
109
|
+
$args.first.must_equal(:accessibilityIdentifier)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
describe 'UISearchBar.enabled?' do
|
114
|
+
it 'should call Calabash query method with correct parameters' do
|
115
|
+
$stub_query_response = [true, false]
|
116
|
+
|
117
|
+
UISearchBar.enabled?.must_equal(true)
|
118
|
+
$uiquery.must_equal("#{UISearchBar.class_name}")
|
119
|
+
$args.first.must_equal(:isEnabled)
|
120
|
+
|
121
|
+
UISearchBar.enabled?(0).must_equal(true)
|
122
|
+
$uiquery.must_equal("#{UISearchBar.class_name} index:0")
|
123
|
+
$args.first.must_equal(:isEnabled)
|
124
|
+
|
125
|
+
UISearchBar.enabled?('myId').must_equal(true)
|
126
|
+
$uiquery.must_equal("#{UISearchBar.class_name} marked:'myId'")
|
127
|
+
$args.first.must_equal(:isEnabled)
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calios-uikit-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jani Jegoroff
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- lib/calios-uikit-extension/ui_collection_view.rb
|
95
95
|
- lib/calios-uikit-extension/ui_collection_view_cell.rb
|
96
96
|
- lib/calios-uikit-extension/ui_label.rb
|
97
|
+
- lib/calios-uikit-extension/ui_search_bar.rb
|
97
98
|
- lib/calios-uikit-extension/ui_switch.rb
|
98
99
|
- lib/calios-uikit-extension/ui_table_view.rb
|
99
100
|
- lib/calios-uikit-extension/ui_table_view_cell.rb
|
@@ -105,6 +106,7 @@ files:
|
|
105
106
|
- spec/spec_ui_collection_view.rb
|
106
107
|
- spec/spec_ui_collection_view_cell.rb
|
107
108
|
- spec/spec_ui_label.rb
|
109
|
+
- spec/spec_ui_search_bar.rb
|
108
110
|
- spec/spec_ui_switch.rb
|
109
111
|
- spec/spec_ui_table_view.rb
|
110
112
|
- spec/spec_ui_table_view_cell.rb
|
@@ -142,6 +144,7 @@ test_files:
|
|
142
144
|
- spec/spec_ui_collection_view.rb
|
143
145
|
- spec/spec_ui_collection_view_cell.rb
|
144
146
|
- spec/spec_ui_label.rb
|
147
|
+
- spec/spec_ui_search_bar.rb
|
145
148
|
- spec/spec_ui_switch.rb
|
146
149
|
- spec/spec_ui_table_view.rb
|
147
150
|
- spec/spec_ui_table_view_cell.rb
|