calabash-android 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ 0.2.2:
2
+ Fixed path problems with Ant on Windows.
3
+
1
4
  0.2.1:
2
5
  Path to custom keystores can now be relative.
3
6
  Setup only deals with custom keystores.
@@ -19,9 +19,9 @@ def calabash_build(app)
19
19
  "package",
20
20
  "-Dtested.package_name=#{package_name(app)}",
21
21
  "-Dtested.main_activity=#{main_activity(app)}",
22
- "-Dtested.project.apk='#{app}'",
22
+ "-Dtested.project.apk=\"#{app}\"",
23
23
  "-Dandroid.api.level=#{api_level}",
24
- "-Dkey.store='#{File.expand_path keystore["keystore_location"]}'",
24
+ "-Dkey.store=\"#{File.expand_path keystore["keystore_location"]}\"",
25
25
  "-Dkey.store.password=#{keystore["keystore_password"]}",
26
26
  "-Dkey.alias=#{keystore["keystore_alias"]}",
27
27
  "-Dkey.alias.password=#{keystore["keystore_alias_password"]}",
@@ -1,6 +1,6 @@
1
1
  module Calabash
2
2
  module Android
3
- VERSION = "0.2.1"
4
- FRAMEWORK_VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
+ FRAMEWORK_VERSION = "0.2.2"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,75 +1,72 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: calabash-android
3
- version: !ruby/object:Gem::Version
4
- hash: 21
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.2
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 2
9
- - 1
10
- version: 0.2.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Jonas Maturana Larsen
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-08-01 00:00:00 +02:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-08-02 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: cucumber
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
33
22
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: json
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
39
25
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: json
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
47
38
  type: :runtime
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: slowhandcuke
51
39
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
53
41
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: slowhandcuke
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
61
54
  type: :runtime
62
- version_requirements: *id003
63
- description: "calabash-android drives tests for native and hybrid Android apps. "
64
- email:
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: ! 'calabash-android drives tests for native and hybrid Android apps. '
63
+ email:
65
64
  - jonas@lesspainful.com
66
- executables:
65
+ executables:
67
66
  - calabash-android
68
67
  extensions: []
69
-
70
68
  extra_rdoc_files: []
71
-
72
- files:
69
+ files:
73
70
  - .calabash_settings
74
71
  - CHANGES.txt
75
72
  - Gemfile
@@ -606,41 +603,28 @@ files:
606
603
  - test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/TokenBuffer.java
607
604
  - test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/VersionUtil.java
608
605
  - test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/package-info.java
609
- - test-server/calabash-js/src/calabash.js
610
- - test-server/calabash-js/src/set_text.js
611
- has_rdoc: true
612
606
  homepage: http://github.com/calabash
613
607
  licenses: []
614
-
615
608
  post_install_message:
616
609
  rdoc_options: []
617
-
618
- require_paths:
610
+ require_paths:
619
611
  - lib
620
- required_ruby_version: !ruby/object:Gem::Requirement
612
+ required_ruby_version: !ruby/object:Gem::Requirement
621
613
  none: false
622
- requirements:
623
- - - ">="
624
- - !ruby/object:Gem::Version
625
- hash: 3
626
- segments:
627
- - 0
628
- version: "0"
629
- required_rubygems_version: !ruby/object:Gem::Requirement
614
+ requirements:
615
+ - - ! '>='
616
+ - !ruby/object:Gem::Version
617
+ version: '0'
618
+ required_rubygems_version: !ruby/object:Gem::Requirement
630
619
  none: false
631
- requirements:
632
- - - ">="
633
- - !ruby/object:Gem::Version
634
- hash: 3
635
- segments:
636
- - 0
637
- version: "0"
620
+ requirements:
621
+ - - ! '>='
622
+ - !ruby/object:Gem::Version
623
+ version: '0'
638
624
  requirements: []
639
-
640
625
  rubyforge_project:
641
- rubygems_version: 1.6.2
626
+ rubygems_version: 1.8.23
642
627
  signing_key:
643
628
  specification_version: 3
644
629
  summary: Client for calabash-android for automated functional testing on Android
645
630
  test_files: []
646
-
@@ -1,125 +0,0 @@
1
- (function () {
2
- /** David Mark's isHostMethod function,
3
- * http://peter.michaux.ca/articles/feature-detection-state-of-the-art-browser-scripting
4
- * Modified to use strict equality
5
- */
6
- function isHostMethod (object, property)
7
- {
8
- var t = typeof object[property];
9
- return t==='function' ||
10
- (!!(t==='object' && object[property])) ||
11
- t==='unknown';
12
- }
13
- //http://www.w3.org/TR/DOM-Level-2-Core/core.html
14
- var NODE_TYPES = {
15
- /*ELEMENT_NODE : */ 1 : 'ELEMENT_NODE',
16
- /*ATTRIBUTE_NODE : */ 2: 'ATTRIBUTE_NODE',
17
- /*TEXT_NODE : */ 3 : 'TEXT_NODE',
18
- /*DOCUMENT_NODE : */ 9 : 'DOCUMENT_NODE'
19
- };
20
-
21
- function computeRectForNode(object)
22
- {
23
- var res = {}, boundingBox;
24
- if (isHostMethod(object,'getBoundingClientRect'))
25
- {
26
- boundingBox = object.getBoundingClientRect();
27
- res['rect'] = boundingBox;
28
- res['rect'].center_x = boundingBox.left + Math.floor(boundingBox.width/2);
29
- res['rect'].center_y = boundingBox.top + Math.floor(boundingBox.height/2);
30
- }
31
- res.nodeType = NODE_TYPES[object.nodeType] || res.nodeType + ' (Unexpected)';
32
- res.nodeName = object.nodeName;
33
- res.id = object.id || '';
34
- res['class'] = object.className || '';
35
- if (object.href)
36
- {
37
- res.href = object.href;
38
- }
39
- res.html = object.outerHTML || '';
40
- res.textContent = object.textContent;
41
- return res;
42
- }
43
- function toJSON(object)
44
- {
45
- var res, i, N, spanEl, parentEl;
46
- if (typeof object==='undefined')
47
- {
48
- throw {message:'Calling toJSON with undefined'};
49
- }
50
- else if (object instanceof Text)
51
- {
52
- parentEl = object.parentElement;
53
- if (parentEl)
54
- {
55
- spanEl = document.createElement("calabash");
56
- spanEl.style.display = "inline";
57
- spanEl.innerHTML = object.textContent;
58
- parentEl.replaceChild(spanEl, object);
59
- res = computeRectForNode(spanEl);
60
- res.nodeType = NODE_TYPES[object.nodeType];
61
- delete res.nodeName;
62
- delete res.id;
63
- delete res['class'];
64
-
65
- parentEl.replaceChild(object,spanEl);
66
- }
67
- else
68
- {
69
- res = object;
70
- }
71
-
72
-
73
- }
74
- else if (object instanceof Node)//TODO: support for frames!
75
- {
76
- res = computeRectForNode(object);
77
- }
78
- else if (object instanceof NodeList || //TODO: support for frames!
79
- (typeof object=='object' && object &&
80
- typeof object.length === 'number' &&
81
- object.length > 0 //array like
82
- && typeof object[0] !== 'undefined'))
83
- {
84
- res = [];
85
- for (i=0,N=object.length;i<N;i++)
86
- {
87
- res[i] = toJSON(object[i]);
88
- }
89
- }
90
- else
91
- {
92
- res = object;
93
- }
94
- return res;
95
- }
96
- ///TODO: no support for now frames
97
- //idea would be map XPath across window.frames
98
- //must take care of visibility questions
99
-
100
- var exp = '%@'/* dynamic */,
101
- queryType = '%@',
102
- nodes = null,
103
- res = [],
104
- i,N;
105
- try
106
- {
107
- if (queryType==='xpath')
108
- {
109
- nodes = document.evaluate(exp, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
110
- for (i=0,N=nodes.snapshotLength;i<N;i++)
111
- {
112
- res[i] = nodes.snapshotItem(i);
113
- }
114
- }
115
- else
116
- {
117
- res = document.querySelectorAll(exp);
118
- }
119
- }
120
- catch (e)
121
- {
122
- return JSON.stringify({error:'Exception while running query: '+exp, details:e.toString()})
123
- }
124
- return JSON.stringify(toJSON(res));
125
- })();
@@ -1,133 +0,0 @@
1
- (function () {
2
- function simulateKeyEvent(elem, character) {
3
- var ch = character.charCodeAt(0);
4
-
5
- var evt;
6
- evt = document.createEvent('KeyboardEvent');
7
- evt.initKeyboardEvent('keydown', true, true, window, 0, 0, 0, 0, 0, ch);
8
- elem.dispatchEvent(evt);
9
-
10
- evt = document.createEvent('KeyboardEvent');
11
- evt.initKeyboardEvent('keyup', true, true, window, 0, 0, 0, 0, 0, ch);
12
- elem.dispatchEvent(evt);
13
- evt = document.createEvent('KeyboardEvent');
14
- evt.initKeyboardEvent('keypress', true, true, window, 0, 0, 0, 0, 0, ch);
15
- elem.dispatchEvent(evt);
16
- }
17
-
18
-
19
- function enterTextIntoInputField(elem, text) {
20
- elem.value = "";
21
- for (var i = 0; i < text.length; i++) {
22
- var ch = text.charAt(i);
23
- elem.value += ch;
24
- simulateKeyEvent(elem, ch);
25
- }
26
- }
27
-
28
-
29
- function fireHTMLEvent(elem, eventName) {
30
- var evt = document.createEvent("HTMLEvents");
31
- evt.initEvent(eventName, true, true );
32
- return !elem.dispatchEvent(evt);
33
- }
34
-
35
- function selectInputField(elem) {
36
- elem.click();
37
- elem.focus();
38
- }
39
-
40
-
41
- function deselectInputField(elem) {
42
- fireHTMLEvent(elem, 'change');
43
- fireHTMLEvent(elem, 'blur');
44
- }
45
-
46
-
47
- /** David Mark's isHostMethod function,
48
- * http://peter.michaux.ca/articles/feature-detection-state-of-the-art-browser-scripting
49
- * Modified to use strict equality
50
- */
51
- function isHostMethod (object, property)
52
- {
53
- var t = typeof object[property];
54
- return t==='function' ||
55
- (!!(t==='object' && object[property])) ||
56
- t==='unknown';
57
- }
58
- //http://www.w3.org/TR/DOM-Level-2-Core/core.html
59
- var NODE_TYPES = {
60
- /*ELEMENT_NODE : */ 1 : 'ELEMENT_NODE',
61
- /*ATTRIBUTE_NODE : */ 2: 'ATTRIBUTE_NODE',
62
- /*TEXT_NODE : */ 3 : 'TEXT_NODE',
63
- /*DOCUMENT_NODE : */ 9 : 'DOCUMENT_NODE'
64
- };
65
-
66
- function toJSON(object)
67
- {
68
- var res, i, N;
69
- if (typeof object==='undefined')
70
- {
71
- throw {message:'Calling toJSON with undefined'};
72
- }
73
- else if (object instanceof Node)//TODO: support for frames!
74
- {
75
- res = {}
76
- if (isHostMethod(object,'getBoundingClientRect'))
77
- {
78
- res['rect'] = object.getBoundingClientRect();
79
- }
80
- res.nodeType = NODE_TYPES[object.nodeType] || res.nodeType + ' (Unexpected)';
81
- res.nodeName = object.nodeName;
82
- res.id = object.id || '';
83
- res['class'] = object.className || '';
84
- res.html = object.outerHTML || '';
85
- res.nodeValue = object.nodeValue;
86
- }
87
- else if (object instanceof NodeList || //TODO: support for frames!
88
- (typeof object=='object' && object &&
89
- typeof object.length === 'number' &&
90
- object.length > 0 //array like
91
- && typeof object[0] !== 'undefined'))
92
- {
93
- res = [];
94
- for (i=0,N=object.length;i<N;i++)
95
- {
96
- res[i] = toJSON(object[i]);
97
- }
98
- }
99
- else
100
- {
101
- res = object;
102
- }
103
- return res;
104
- }
105
-
106
- ///TODO: no support for now frames
107
- //idea would be map XPath across window.frames
108
- //must take care of visibility questions
109
-
110
- try
111
- {
112
- var exp = JSON.parse('%@')/* dynamic */,
113
- el,
114
- text = '%@',
115
- i,N;
116
-
117
- el=document.elementFromPoint(exp.rect.left, exp.rect.top);
118
- if (/input/i.test(el.tagName))
119
- {
120
- selectInputField(el);
121
- enterTextIntoInputField(el, text);
122
- }
123
- else
124
- {
125
-
126
- }
127
- }
128
- catch (e)
129
- {
130
- return JSON.stringify({error:'Exception while running query: '+exp, details:e.toString()})
131
- }
132
- return JSON.stringify(toJSON(el));
133
- })();