calandroid-widget-extension 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe244c03b0226ece2148f4e59ba5c4e1243da0bb
4
- data.tar.gz: e3e3b683b598fee170b50214ce311915f7612fbf
3
+ metadata.gz: 9a2ddb7e81f26cfc1199bbfa95e65f9f9cd26e11
4
+ data.tar.gz: 4881c6d3334a92be182ee71abaa19f025be4a55e
5
5
  SHA512:
6
- metadata.gz: a1c2f372e777a0961e7050121f9911e6f049f2001008dfcb609d3cac4a63d2bb489625d58b7a502e364d1378a33581abb31ebef62163ff300f8b9e50aaa6fffc
7
- data.tar.gz: bc8f7b35a0888ca9ac04a0b61b8ec3a5c4a28c2a0cb3e953c36bc3fd5ad3167e865b0dd9960c8f075caa55eb15caba6871399dab5781af21658e5e3dc6cf1a2c
6
+ metadata.gz: 2be1598b477289d877aa7092daf16644c986033e8fa1c0739279d4cd14c81607dd1d2a32da0145a32d1527e9fc3fa14755a7a7a710bedc18c6a385621497d8fd
7
+ data.tar.gz: 1e0c2bd33fc7ee9e2a495553c3c0eb22c742b02108c47c6d23461d6beea6e301b7866a5eb1826ced67d519e3f7dfcc6e8dae19a9d57dc7af9e5cc299cb8aa06a
@@ -1,5 +1,3 @@
1
- # rubocop:disable Metrics/LineLength
2
-
3
1
  include Calabash::Android::Operations
4
2
 
5
3
  #
@@ -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
@@ -2,5 +2,5 @@
2
2
  # Gem version
3
3
  #
4
4
  module CalandroidWidgetExtension
5
- VERSION = '0.0.4'
5
+ VERSION = '0.0.5'
6
6
  end
@@ -11,6 +11,26 @@ class SpecListView < Minitest::Spec
11
11
  end
12
12
 
13
13
  describe 'ListView' do
14
- # Nothing here yet
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
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: 2014-10-05 00:00:00.000000000 Z
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.26'
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.26'
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: