calabash-android 0.4.0.pre18 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Calabash
2
2
  module Android
3
- VERSION = "0.4.0.pre18"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -159,14 +159,10 @@ public class Query {
159
159
  }
160
160
 
161
161
  }
162
-
163
- public List<View> allVisibleViews() {
164
- return viewFetcher.getAllViews(false);
165
- }
166
162
 
167
163
  public List<View> rootViews() {
168
164
  Set<View> parents = new HashSet<View>();
169
- for (View v : allVisibleViews())
165
+ for (View v : viewFetcher.getAllViews(false))
170
166
  {
171
167
  View parent = viewFetcher.getTopParent(v);
172
168
  System.out.println(parent);
@@ -53,8 +53,10 @@ public class UIQueryASTClassName implements UIQueryAST {
53
53
  }
54
54
 
55
55
 
56
- }
57
- return result;
56
+ }
57
+
58
+ List filteredResult = visibility.evaluateWithViews(result, direction, visibility);
59
+ return filteredResult;
58
60
  }
59
61
  });
60
62
 
@@ -51,7 +51,7 @@ public class UIQueryASTPredicate implements UIQueryAST {
51
51
 
52
52
  }
53
53
 
54
- return filteredResult;
54
+ return visibility.evaluateWithViews(filteredResult, direction, visibility);
55
55
  }
56
56
  });
57
57
  }
@@ -149,6 +149,11 @@ public class UIQueryUtils {
149
149
  public static boolean isVisible(Object v) {
150
150
  if (!(v instanceof View)) { return true; }
151
151
  View view = (View) v;
152
+
153
+ if (view.getWidth() == 0 || view.getWidth() == 0) {
154
+ return false;
155
+ }
156
+
152
157
  return view.isShown() && viewFetcher.isViewSufficientlyShown(view);
153
158
  }
154
159
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-android
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.pre18
5
- prerelease: 6
4
+ version: 0.4.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jonas Maturana Larsen
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-19 00:00:00.000000000 Z
12
+ date: 2013-02-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber
@@ -844,9 +844,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
844
844
  required_rubygems_version: !ruby/object:Gem::Requirement
845
845
  none: false
846
846
  requirements:
847
- - - ! '>'
847
+ - - ! '>='
848
848
  - !ruby/object:Gem::Version
849
- version: 1.3.1
849
+ version: '0'
850
850
  requirements: []
851
851
  rubyforge_project:
852
852
  rubygems_version: 1.8.23