spreewald 1.3.2 → 1.3.3

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: 415633e7a052e115f9212a4cff6afd6a6aa248d8
4
- data.tar.gz: acaba4221f5ee0fc9eb876ce7f0b9fed31d93d50
3
+ metadata.gz: a96ad90241f95da1aad6a504ca9a4b632b6aa140
4
+ data.tar.gz: 98203ad1472926314f97f49115de31f135b021d8
5
5
  SHA512:
6
- metadata.gz: aada1464402a29e3bfb0ad168821a48a4cfe9c65376a48ec33cadbb32237d45b28518de6ee02c888d2297c634f366fdc379a5c9bdb0464e5d5d8e005c1f25be3
7
- data.tar.gz: 26bfef269fdc97e9110690bc4583baf944707d1aa6c27fd0cdbd579240f8e788636feecfdeb0834f995df72196b75026da22b26e41661a9c1105c6b77b7db5dd
6
+ metadata.gz: 622f1028d8f4077591eeccc1f4afbfe46e574022ece90da191796c6d1c6634ceec82256649922156a76574594e302aa639bfde5b5db4ccebd0892844606dfd2d
7
+ data.tar.gz: 5838a95f80ed9d08e09844a4e8d243d72cebd75cd358c31bc9a9406f657770edfde61dca032ac6d0e703371e3e1207f5015a1d85182adc0c621f5a85f766ba15
data/README.md CHANGED
@@ -550,30 +550,30 @@ deprecation notice. Decide for yourself whether you want to use them:
550
550
 
551
551
 
552
552
 
553
- * **Then I should (not )?see an element "..."**
554
-
555
-
556
-
557
-
558
- * **Then I should (not )?see ((a |an |the )?("...")|...) element**
553
+ * **Then I should (not )?see an element "(...)"**
559
554
 
560
555
  Check that an element with the given selector is present on the page.
561
556
 
562
557
  Example:
563
558
 
564
- Then I should see a ".panel" element
565
- Then I should not see ".sidebar" element
566
- Then I should see the ".twitter-timeline" element
559
+ Then I should see an element ".panel"
560
+ Then I should not see an element ".sidebar"
561
+ Then I should see the an element ".twitter-timeline"
567
562
 
568
563
  We recommend to [define a `selector_for` method](https://github.com/makandra/spreewald/blob/master/examples/selectors.rb) in `features/support/selectors.rb`
569
564
  so you can refer to the selector in plain English:
570
565
 
571
- Then I should see a panel element
572
- Then I should not see a sidebar element
573
- Then I should see the Twitter timeline element
566
+ Then I should see an element for the panel
567
+ Then I should not an element for the sidebar
568
+ Then I should see an element for the Twitter timeline
574
569
 
575
570
 
576
571
 
572
+ * **Then I should (not )?see an element for ...**
573
+
574
+
575
+
576
+
577
577
  * **Then I should get a text response**
578
578
 
579
579
  Checks that the result has content type `text/plain`
@@ -39,12 +39,16 @@ require 'cgi'
39
39
  #
40
40
  # Then I should see "some text" within ".page_body"
41
41
  When /^(.*) within (.*[^:])$/ do |nested_step, parent|
42
- with_scope(parent) { step(nested_step) }
42
+ patiently do
43
+ with_scope(parent) { step(nested_step) }
44
+ end
43
45
  end
44
46
 
45
47
  # nodoc
46
48
  When /^(.*) within (.*[^:]):$/ do |nested_step, parent, table_or_string|
47
- with_scope(parent) { step("#{nested_step}:", table_or_string) }
49
+ patiently do
50
+ with_scope(parent) { step("#{nested_step}:", table_or_string) }
51
+ end
48
52
  end
49
53
 
50
54
  Given /^(?:|I )am on (.+)$/ do |page_name|
@@ -469,32 +473,31 @@ Then /^"([^"]*)" should link to "([^"]*)"$/ do |link_label, target|
469
473
  end
470
474
  end
471
475
 
472
- Then /^I should (not )?see an element "([^"]*)"$/ do |negate, selector|
473
- warn %(The step 'I should see an element "..."' is deprecated. Please use 'I should see a "..." element instead')
474
- expectation = negate ? :should_not : :should
475
- patiently do
476
- page.send(expectation, have_css(selector))
477
- end
478
- end
479
-
480
476
  # Check that an element with the given selector is present on the page.
481
477
  #
482
478
  # Example:
483
479
  #
484
- # Then I should see a ".panel" element
485
- # Then I should not see ".sidebar" element
486
- # Then I should see the ".twitter-timeline" element
480
+ # Then I should see an element ".panel"
481
+ # Then I should not see an element ".sidebar"
482
+ # Then I should see the an element ".twitter-timeline"
487
483
  #
488
484
  # We recommend to [define a `selector_for` method](https://github.com/makandra/spreewald/blob/master/examples/selectors.rb) in `features/support/selectors.rb`
489
485
  # so you can refer to the selector in plain English:
490
486
  #
491
- # Then I should see a panel element
492
- # Then I should not see a sidebar element
493
- # Then I should see the Twitter timeline element
487
+ # Then I should see an element for the panel
488
+ # Then I should not an element for the sidebar
489
+ # Then I should see an element for the Twitter timeline
494
490
  #
495
- Then /^I should (not )?see (?:(?:a |an |the )?("[^"]+")|([^"].*?)) element$/ do |negate, locator_with_quotes, locator_without_quotes|
491
+ Then /^I should (not )?see an element "([^"]+)"$/ do |negate, selector|
492
+ expectation = negate ? :should_not : :should
493
+ patiently do
494
+ page.send(expectation, have_css(selector))
495
+ end
496
+ end
497
+
498
+ Then /^I should (not )?see an element for (.*?)$/ do |negate, locator|
496
499
  expectation = negate ? :should_not : :should
497
- selector = _selector_for(locator_with_quotes || locator_without_quotes)
500
+ selector = _selector_for(locator)
498
501
  patiently do
499
502
  page.send(expectation, have_css(selector))
500
503
  end
@@ -1,3 +1,3 @@
1
1
  module Spreewald
2
- VERSION = '1.3.2'
2
+ VERSION = '1.3.3'
3
3
  end
@@ -0,0 +1,4 @@
1
+ .container1
2
+ .child1
3
+
4
+ .container2
@@ -86,9 +86,13 @@ Feature: Web steps
86
86
 
87
87
  Scenario: /^I should (not )?see (?:|a|an |the )(.*?) element$/
88
88
  When I go to "/static_pages/see_element"
89
- Then I should see a ".panel" element
90
- And I should see the ".panel" element
91
- And I should see a panel element
92
- But I should not see a ".timeline" element
93
- And I should not see the ".timeline" element
94
- And I should not see the timeline element
89
+ Then I should see an element ".panel"
90
+ And I should see an element for a panel
91
+ But I should not see an element ".timeline"
92
+ And I should not see an element for the timeline
93
+
94
+ Scenario: /^(.*) within (.*[^:])$/
95
+ When I go to "/static_pages/within"
96
+ Then I should see an element ".child1" within ".container1"
97
+ But I should not see an element ".child1" within ".container2"
98
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spreewald
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Kraze
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-24 00:00:00.000000000 Z
11
+ date: 2015-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber-rails
@@ -149,6 +149,7 @@ files:
149
149
  - tests/shared/app/views/static_pages/link_to_home.html.haml
150
150
  - tests/shared/app/views/static_pages/see_element.html.haml
151
151
  - tests/shared/app/views/static_pages/visibility.html.haml
152
+ - tests/shared/app/views/static_pages/within.html.haml
152
153
  - tests/shared/app/views/tables/table1.html.haml
153
154
  - tests/shared/config/cucumber.yml
154
155
  - tests/shared/config/database.yml
@@ -249,6 +250,7 @@ test_files:
249
250
  - tests/shared/app/views/static_pages/link_to_home.html.haml
250
251
  - tests/shared/app/views/static_pages/see_element.html.haml
251
252
  - tests/shared/app/views/static_pages/visibility.html.haml
253
+ - tests/shared/app/views/static_pages/within.html.haml
252
254
  - tests/shared/app/views/tables/table1.html.haml
253
255
  - tests/shared/config/cucumber.yml
254
256
  - tests/shared/config/database.yml