spreewald 4.3.5 → 4.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8841cf880bda6d58ed1632050b3c3a28292e476acb6f961922beaa3f842498a3
4
- data.tar.gz: 830f0798c36a968717bf946ba987372e78df20c2a1ce4a5e4ec570733256c0b1
3
+ metadata.gz: 319d2bf7ea1d7a001c53922c7142a1ccad262f3f7da34d48882c2fd9d825c3d6
4
+ data.tar.gz: cbd10a35c3a70400453854840e4fa0b2fe5c0646e9fec8efa9dc7a057eb109e1
5
5
  SHA512:
6
- metadata.gz: 8f4afbf809ee2f17478eea159da1d1659a72e62d45b39bc8e221c4bb0fc94ed5fcad15ca17f4557e3163b2f9d6aa182041ab6aa4f13e1db72d290307a5724e82
7
- data.tar.gz: 88b21029149764ec1023134a50e99ced4a51b8fe1e8f4a96ff1681cc4809013d52dcc2e995eba79e315b9626fe36b16bb65bd8da5ca100bbf3213b0ece67932a
6
+ metadata.gz: dc7159b50dde000619bbcf67e7fcc8b3623b3e4a8a3924917368475baf8e1a07c0ab81e412b66ca9b38bf8b4e2a344aa008f8c82a4e6a6726a758d46bd765ab6
7
+ data.tar.gz: aab557914fbde6a4b6affbea66cde6c3a2e325176dd544afc603204cf7800a50a126651ab4aadf48738931cacc1fdd075b3f7c63f43f085f2f923fb77b195ec7
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## 4.3.6
7
+ - Use capybara's `make_visible` [option](https://github.com/teamcapybara/capybara/blob/0468de5a810aae75ab9de20447e246c5c35473f0/lib/capybara/node/actions.rb#L279) in step `I attach the file "..." to "..."`
8
+ - This will make CSS-Hacks like setting the opacity in tests obsolete
9
+
6
10
  ## 4.3.5
7
11
  - Fix deprecation warning for using keyword arguments as last argument when running with ruby 2.7
8
12
 
data/README.md CHANGED
@@ -4,6 +4,10 @@ Spreewald is a collection of useful steps for cucumber. Feel free to fork.
4
4
 
5
5
  You can find a list of all contained steps at the end of this README.
6
6
 
7
+ ## Supported versions
8
+
9
+ Spreewald is currently tested against and Ruby 2.6.6 and 3.0.0 with Rails 6 and Capybara 3.
10
+
7
11
  ## Installation
8
12
 
9
13
  Add this line to your application's Gemfile:
@@ -12,18 +16,7 @@ Add this line to your application's Gemfile:
12
16
 
13
17
  And then execute:
14
18
 
15
- $ bundle
16
-
17
- Or install it yourself as:
18
-
19
- $ gem install spreewald
20
-
21
-
22
- ## Supported versions
23
-
24
- Spreewald is currently tested against and Ruby 2.6.6 with Rails 6 and Capybara 3.
25
-
26
- ## Usage
19
+ $ bundle install
27
20
 
28
21
  Require all Spreewald steps by putting
29
22
 
@@ -32,19 +25,28 @@ Require all Spreewald steps by putting
32
25
  into either your `support/env.rb` or `step_definitions/spreewald_steps.rb`.
33
26
 
34
27
  Steps are grouped into a number of categories. If you only want to use a subset
35
- of Spreewald's steps, you can pick and choose single categories by requiring
36
- single files like this:
28
+ of Spreewald's steps, insead of `require 'spreewald/all_steps'`, you can pick
29
+ and choose single categories by requiring [single files](https://github.com/makandra/spreewald/tree/master/lib/spreewald) like this:
37
30
 
38
31
  require 'spreewald/email_steps'
39
32
  require 'spreewald/web_steps'
40
33
 
41
- Have a look at our [recommended Capybara defaults](#recommended-capybara-defaults) as they impact the behavior of many Spreewald steps.
34
+ After that you are good to go and use the steps [described below](#steps).
35
+
36
+ ### Recommended additional setup
37
+
38
+ We recommend using a `features/support/paths.rb` file in your project to define mappings between verbal phrases and your project's routes. You can then use these phrases in steps like `Then I should be on ...` or `When I go to ...`.
39
+ You can find [an example in this repository](https://github.com/makandra/spreewald/blob/master/examples/paths.rb). Please note that you may have to adapt it depending on the namespaces and other setup of your application's routes.
40
+
41
+ Similarly, you may define a `features/support/paths.rb` file in your project to define mappings of verbal phrases to CSS selectors. You can also find [an example for that in this repository](https://github.com/makandra/spreewald/blob/master/examples/selectors.rb). These mappings can be used with steps like `Then I should( not)? see (an|the) element for ...` or `When I click on the element for ...`.
42
+
43
+ We also suggest to look at our [recommended Capybara defaults](#recommended-capybara-defaults) as they impact the behavior of many Spreewald steps.
42
44
 
43
45
  ## Spreewald binary
44
46
 
45
47
  Spreewald comes with a binary that prints a list of all Cucumber steps from
46
48
  Spreewald _and your project_. It will filter the list by any string you
47
- pass it. Example usage:
49
+ pass it. Example usage (e.g. on a linux shell in the root folder of the project which uses Spreewald):
48
50
 
49
51
  ```bash
50
52
  spreewald # lists all steps
@@ -94,7 +96,7 @@ Capybara.default_normalize_ws = true
94
96
 
95
97
  This will affect all Spreewald steps that are using Capybara's `:text` option.
96
98
 
97
- Furthermore, we recommend setting [Capybara's matching strategy](https://github.com/teamcapybara/capybara/blob/master/README.md#strategy) to `:prefer_exact`. This will positively affect Spreewald steps as it prevents the `Capybara::Ambiguous` error in the edge case when two fields are matching the given name, but one of the matches includes the name only as a substring,
99
+ Furthermore, we recommend setting [Capybara's matching strategy](https://github.com/teamcapybara/capybara/blob/master/README.md#strategy) to `:prefer_exact`. This will positively affect Spreewald steps as it prevents the `Capybara::Ambiguous` error in the edge case when two fields are matching the given name, but one of the matches includes the name only as a substring.
98
100
 
99
101
  ```ruby
100
102
  Capybara.match = :prefer_exact
@@ -119,14 +121,11 @@ Spreewald has different kind of tests:
119
121
 
120
122
  Run all tests for your current ruby version with `rake` or `rake matrix:tests`. To bundle use `rake matrix:install` first.
121
123
 
122
- Please note that you need [geordi](https://github.com/makandra/geordi) to run the integration tests.
123
-
124
-
125
124
  ### If you would like to contribute:
126
125
 
127
126
  - Fork the repository
128
127
  - Push your changes with specs
129
- - Make sure `rake` passes
128
+ - Make sure `rake matrix:tests` passes
130
129
  - Regenerate the "Steps" section of this Readme with `rake update_readme`, if needed
131
130
  - Make a pull request
132
131
 
@@ -160,8 +160,11 @@ end.overridable
160
160
 
161
161
  # Attach a file to a file upload form field
162
162
  When /^(?:|I )attach the file "([^"]*)" to "([^"]*)"$/ do |path, field|
163
+ options = {}
164
+ options[:make_visible] = true if javascript_capable?
165
+
163
166
  patiently do
164
- attach_file(field, File.expand_path(path))
167
+ attach_file(field, File.expand_path(path), options)
165
168
  end
166
169
  end.overridable
167
170
 
@@ -1,3 +1,3 @@
1
1
  module Spreewald
2
- VERSION = '4.3.5'
2
+ VERSION = '4.3.6'
3
3
  end
data/spreewald.gemspec CHANGED
@@ -9,6 +9,7 @@ Gem::Specification.new do |gem|
9
9
  gem.summary = %q{Collection of useful cucumber steps.}
10
10
  gem.homepage = "https://github.com/makandra/spreewald"
11
11
  gem.license = 'MIT'
12
+ gem.metadata = { 'rubygems_mfa_required' => 'true' }
12
13
 
13
14
  gem.files = `git ls-files`.split($\)
14
15
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- spreewald (4.3.5)
4
+ spreewald (4.3.6)
5
5
  cucumber
6
6
  cucumber_priority (>= 0.3.0)
7
7
  rspec (>= 2.13.0)
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: 4.3.5
4
+ version: 4.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Kraze
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-10 00:00:00.000000000 Z
11
+ date: 2022-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -334,7 +334,8 @@ files:
334
334
  homepage: https://github.com/makandra/spreewald
335
335
  licenses:
336
336
  - MIT
337
- metadata: {}
337
+ metadata:
338
+ rubygems_mfa_required: 'true'
338
339
  post_install_message:
339
340
  rdoc_options: []
340
341
  require_paths: