calabash-cucumber-cn 0.0.7 → 0.0.8

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzNkYzc5NDFjYzkyZmI3M2JkOTg4YmYwZTc1NWZjODZjNDkwOGY0OA==
4
+ NjRhZDE2ZTJkYjgyNzc3ZTNjYmMzZWIxN2IzNmJjZWJiY2Q2YTc1Mg==
5
5
  data.tar.gz: !binary |-
6
- NGJmMWM5NDU4Mjg2ZDgyNDI5ZjI3NDUyN2E2Y2QwMGU2MGRlYmFlMg==
6
+ NGJhOGM5MWU2ZTE5ZGE4MmIyN2RmNjFiZjkwMmU0ZWExYWYzNzJjYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDM5NDZhZDQxNTU2MzlhMjBjZTliZGNhOGMzMzc4NTllZjllYmQxMGZkNDIy
10
- MDAxMjUzMDM1NWUyN2I3NWIzMGJlZDdkYjgxYThkMGI1MjFhNzYzZWFmZTJi
11
- ZmY2ZGM0YWM4YzNkMmYwZjE2MzZhNzliYjY5OWFlNzVmZjUxZmM=
9
+ YWY1MTZiMTgwY2NhYmQ0MGVlMTAxMDIwNjY1NDBlZjYwOTA4ZTU3YTkyYzNl
10
+ Y2Q4NTBiYzk1YWI4NTQ1N2Y3Yjc0OGRiMzc1NjAwNmQxYjZjOTc1MDgxMzky
11
+ M2ZhNmZjZTQ1YTZmNmVmMDgxODZjOTFhODE0YmE1OWU5OWExMWI=
12
12
  data.tar.gz: !binary |-
13
- NDM5YTVlYzU1MjIxODRjNmMwNTAxZmE3MDJhYTlkZWY3YjA5ZmM5NTk1ZTMw
14
- MzAzODQxMTE0MDAxOTc2NzVhOTU4NzM2NjU3M2E5N2E0YzM1ODk0ZWNhMTFh
15
- YjVmNTY5MGY4M2NmNDhlZmZkMzllNTcyZTBhZjcyNTVkY2NiYjU=
13
+ YTY4MDRjOTUzYTY2NWNlMWNkMjUxMDc1ZmNiODk4NGZmMmU2NjRjMTI1ZjYz
14
+ YjFmNzIzZWM1MzQ0NjgxNWUwZWVkMTFjOTIzZGMxODAwMzRhZTI2ZDVmMmUz
15
+ ZTIxMDJiMmEzNjc4OTNkNzMzYWE3NzMzZjRkNjQyMDQ5ODM5MWU=
@@ -5,7 +5,7 @@ Given /^应用正在运行$/ do
5
5
  end
6
6
 
7
7
  # -- Touch --#
8
- Then /^我点按屏幕左(\d+)上(\d+)$/ do |x, y|
8
+ Then /^我点按屏幕左(\d+%?)上(\d+%?)$/ do |x, y|
9
9
  if Calabash.const_defined?(:Android)
10
10
  macro %Q|I click on screen #{x} from the left and #{y} from the top|
11
11
  else
@@ -14,10 +14,14 @@ Then /^我点按屏幕左(\d+)上(\d+)$/ do |x, y|
14
14
  end
15
15
 
16
16
  Then /^我点按"([^\"]*)"$/ do |name|
17
- macro %Q|I press "#{name}"|
17
+ if Calabash.const_defined?(:Android)
18
+ macro %Q|I touch the "#{name}" text|
19
+ else
20
+ macro %Q|I press "#{name}"|
21
+ end
18
22
  end
19
23
 
20
- Then /^我点按"([^\"]*)"右(\d+)%下(\d+)$/ do |name,x,y|
24
+ Then /^我点按"([^\"]*)"右(\d+)%下(\d+)%$/ do |name,x,y|
21
25
  macro %Q|I press #{x}% right and #{y}% down from "#{name}"|
22
26
  end
23
27
 
@@ -66,6 +70,16 @@ end
66
70
 
67
71
  ## -- Entering text -- ##
68
72
 
73
+ Then /^我在当前文本框中输入"([^\"]*)"$/ do |text_to_type|
74
+ if Calabash.const_defined?(:Android)
75
+ raise NotImplementedError, "在当前文本框中输入,还没有实现"
76
+ else
77
+ wait_for_keyboard()
78
+ keyboard_enter_text text_to_type
79
+ sleep(STEP_PAUSE)
80
+ end
81
+ end
82
+
69
83
  Then /^我在"([^\"]*)"中输入"([^\"]*)"$/ do |field_name, text_to_type|
70
84
  if Calabash.const_defined?(:Android)
71
85
  macro %Q|I enter "#{text_to_type}" into "#{field_name}"|
@@ -1,8 +1,8 @@
1
1
  module Calabash
2
2
  module Cucumber
3
3
  module CN
4
- VERSION = '0.0.7'
5
- FRAMEWORK_VERSION = '0.0.7'
4
+ VERSION = '0.0.8'
5
+ FRAMEWORK_VERSION = '0.0.8'
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-cucumber-cn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Li Jie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-11 00:00:00.000000000 Z
11
+ date: 2014-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: calabash-cucumber