calandroid-widget-extension 0.0.4 → 0.0.5
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: 9a2ddb7e81f26cfc1199bbfa95e65f9f9cd26e11
|
4
|
+
data.tar.gz: 4881c6d3334a92be182ee71abaa19f025be4a55e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2be1598b477289d877aa7092daf16644c986033e8fa1c0739279d4cd14c81607dd1d2a32da0145a32d1527e9fc3fa14755a7a7a710bedc18c6a385621497d8fd
|
7
|
+
data.tar.gz: 1e0c2bd33fc7ee9e2a495553c3c0eb22c742b02108c47c6d23461d6beea6e301b7866a5eb1826ced67d519e3f7dfcc6e8dae19a9d57dc7af9e5cc299cb8aa06a
|
@@ -9,5 +9,10 @@ class ListView < Base
|
|
9
9
|
q = parse_query(aIdOrIndex)
|
10
10
|
Calabash::Android::Operations.query(q, :count).first
|
11
11
|
end
|
12
|
+
|
13
|
+
def scroll_to_index(aIndex)
|
14
|
+
q = parse_query(nil)
|
15
|
+
Calabash::Android::Operations.query(q, smoothScrollToPosition: aIndex)
|
16
|
+
end
|
12
17
|
end
|
13
18
|
end
|
data/spec/spec_list_view.rb
CHANGED
@@ -11,6 +11,26 @@ class SpecListView < Minitest::Spec
|
|
11
11
|
end
|
12
12
|
|
13
13
|
describe 'ListView' do
|
14
|
-
|
14
|
+
describe 'ListView.count' do
|
15
|
+
it 'should call Calabash query method with correct parameters' do
|
16
|
+
$stub_query_response = [1]
|
17
|
+
ListView.count.must_equal(1)
|
18
|
+
$uiquery.must_equal('ListView')
|
19
|
+
$args.first.must_equal(:count)
|
20
|
+
|
21
|
+
$stub_query_response = [3]
|
22
|
+
ListView.count.must_equal(3)
|
23
|
+
$uiquery.must_equal('ListView')
|
24
|
+
$args.first.must_equal(:count)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'ListView.scroll_to_index' do
|
29
|
+
it 'should call Calabash query method with correct parameters' do
|
30
|
+
ListView.scroll_to_index(10)
|
31
|
+
$uiquery.must_equal('ListView')
|
32
|
+
$args.first.must_equal({:smoothScrollToPosition=>10})
|
33
|
+
end
|
34
|
+
end
|
15
35
|
end
|
16
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calandroid-widget-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jani Jegoroff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: calabash-android
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0.
|
89
|
+
version: '0.27'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0.
|
96
|
+
version: '0.27'
|
97
97
|
description: Calabash-android widget extension provides convenient metaclasses for
|
98
98
|
Calabash usage.
|
99
99
|
email:
|
@@ -154,3 +154,4 @@ test_files:
|
|
154
154
|
- spec/spec_list_view.rb
|
155
155
|
- spec/spec_text_view.rb
|
156
156
|
- spec/stubs/calabash_android_operations_stub.rb
|
157
|
+
has_rdoc:
|