calabash-cucumber 0.9.14 → 0.9.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -270,7 +270,7 @@ end
270
270
 
271
271
  ### Assertions ###
272
272
  Then /^I should see "([^\"]*)"$/ do |expected_mark|
273
- res = (element_exists( "view marked:'#{expected_mark}'" ) ||
273
+ res = (element_exists( "view marked:'#{expected_mark}'" ) or
274
274
  element_exists( "view text:'#{expected_mark}'"))
275
275
  if not res
276
276
  screenshot_and_raise "No element found with mark or text: #{expected_mark}"
@@ -278,8 +278,11 @@ Then /^I should see "([^\"]*)"$/ do |expected_mark|
278
278
  end
279
279
 
280
280
  Then /^I should not see "([^\"]*)"$/ do |expected_mark|
281
- check_element_does_not_exist("view marked:'#{expected_mark}'") &&
282
- check_element_does_not_exist("view text:'#{expected_mark}'")
281
+ res = query("view marked:'#{expected_mark}'")
282
+ res.concat query("view text:'#{expected_mark}'")
283
+ unless res.empty?
284
+ screenshot_and_raise "Expected no element with text nor accessibilityLabel: #{expected_mark}, found #{res}"
285
+ end
283
286
  end
284
287
 
285
288
  Then /^I should see a "([^\"]*)" button$/ do |expected_mark|
@@ -333,13 +336,19 @@ Then /^I see (\d+) (?:input|text) field(?:s)?$/ do |count|
333
336
  end
334
337
 
335
338
  Then /^I should see a "([^\"]*)" (?:input|text) field$/ do |expected_mark|
336
- check_element_exists("textField placeholder:'#{expected_mark}'") ||
337
- check_element_exists("textField marked:'#{expected_mark}'")
339
+ res = element_exists("textField placeholder:'#{expected_mark}'") or
340
+ element_exists("textField marked:'#{expected_mark}'")
341
+ unless res
342
+ screenshot_and_raise "Expected textfield with placeholder or accessibilityLabel: #{txt}"
343
+ end
338
344
  end
339
345
 
340
346
  Then /^I should not see a "([^\"]*)" (?:input|text) field$/ do |expected_mark|
341
- check_element_does_not_exist("textField placeholder:'#{expected_mark}'") &&
342
- check_element_does_not_exist("textField marked:'#{expected_mark}'")
347
+ res = query("textField placeholder:'#{expected_mark}'")
348
+ res.concat query("textField marked:'#{expected_mark}'")
349
+ unless res.empty?
350
+ screenshot_and_raise "Expected no textfield with placeholder nor accessibilityLabel: #{txt}, found #{res}"
351
+ end
343
352
  end
344
353
 
345
354
 
@@ -1,5 +1,5 @@
1
1
  module Calabash
2
2
  module Cucumber
3
- VERSION = "0.9.14"
3
+ VERSION = "0.9.15"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.14
4
+ version: 0.9.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber
16
- requirement: &70280043557400 !ruby/object:Gem::Requirement
16
+ requirement: &70346973311600 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70280043557400
24
+ version_requirements: *70346973311600
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70280043556000 !ruby/object:Gem::Requirement
27
+ requirement: &70346973310380 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.7.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70280043556000
35
+ version_requirements: *70346973310380
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: json
38
- requirement: &70280043542440 !ruby/object:Gem::Requirement
38
+ requirement: &70346973309200 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70280043542440
46
+ version_requirements: *70346973309200
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: slowhandcuke
49
- requirement: &70280043541860 !ruby/object:Gem::Requirement
49
+ requirement: &70346973308360 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70280043541860
57
+ version_requirements: *70346973308360
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: net-http-persistent
60
- requirement: &70280043541060 !ruby/object:Gem::Requirement
60
+ requirement: &70346973307820 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70280043541060
68
+ version_requirements: *70346973307820
69
69
  description: calabash-cucumber drives tests for native iOS apps. You must link your
70
70
  app with calabash-ios-server framework to execute tests.
71
71
  email: