cypress-on-rails 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +3 -1
- data/CHANGELOG.md +6 -0
- data/README.md +6 -0
- data/lib/cypress_on_rails/smart_factory_wrapper.rb +8 -2
- data/lib/cypress_on_rails/version.rb +1 -1
- data/spec/cypress_on_rails/smart_factory_wrapper_spec.rb +16 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 49942b0febcf64950936386fdbcbec0601534923
|
4
|
+
data.tar.gz: dba819774cec41583fb545fe2517a9baceaf029a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd5ab5135eeec0405b53356e5205956a5ea2f7230341663ac206b76292eb895eef297a96e28345f94dd78ffc8cbda2c54ac0b408dec097dc18edfb760da2ef53
|
7
|
+
data.tar.gz: ca4fb0a7f72ad6341fcb3c14aa22b6142ed95ffa3a77a5e6e229eeb3fc0d6e9290bb67edec65edb99ecae093044b4a795dc1611c6c5b193e764dcc76a1072e71
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## [1.5.1]
|
2
|
+
[Compare]: https://github.com/shakacode/cypress-on-rails/compare/v1.5.0...v1.5.1
|
3
|
+
|
4
|
+
### Fixed
|
5
|
+
* fix FactoryBot Trait not registered error [PR 43](https://github.com/shakacode/cypress-on-rails/pull/43)
|
6
|
+
|
1
7
|
## [1.5.0]
|
2
8
|
[Compare]: https://github.com/shakacode/cypress-on-rails/compare/v1.4.2...v1.5.0
|
3
9
|
|
data/README.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.com/shakacode/cypress-on-rails.svg?branch=master)](https://travis-ci.org/shakacode/cypress-on-rails) [![Gem Version](https://badge.fury.io/rb/cypress-on-rails.svg)](https://badge.fury.io/rb/cypress-on-rails)
|
4
4
|
|
5
|
+
----
|
6
|
+
|
7
|
+
This project is sponsored by the software consulting firm [ShakaCode](https://www.shakacode.com), creator of the [React on Rails Gem](https://github.com/shakacode/react_on_rails). We focus on React front-ends, often with Ruby on Rails or Gatsby. The best way to see what we do is to see the details of [our recent work](https://www.shakacode.com/recent-work). Feel free to engage in discussions around this gem at our [forum category for Cypress](https://forum.shakacode.com/c/cypress-on-rails/55).
|
8
|
+
|
9
|
+
----
|
10
|
+
|
5
11
|
Gem for using [cypress.io](http://github.com/cypress-io/) in Rails and ruby rack applications
|
6
12
|
with the goal of controlling State as mentioned in [Cypress Best Practices](https://docs.cypress.io/guides/references/best-practices.html#Organizing-Tests-Logging-In-Controlling-State)
|
7
13
|
|
@@ -45,9 +45,15 @@ module CypressOnRails
|
|
45
45
|
@dir_system = dir_system
|
46
46
|
end
|
47
47
|
|
48
|
-
def create(*
|
48
|
+
def create(*options)
|
49
49
|
load_files
|
50
|
-
|
50
|
+
factory_name = options.shift
|
51
|
+
if options.last.is_a?(Hash)
|
52
|
+
args = options.pop
|
53
|
+
else
|
54
|
+
args = {}
|
55
|
+
end
|
56
|
+
factory.create(factory_name,*options.map(&:to_sym),args.symbolize_keys)
|
51
57
|
end
|
52
58
|
|
53
59
|
def create_list(*args)
|
@@ -43,7 +43,22 @@ RSpec.describe CypressOnRails::SmartFactoryWrapper do
|
|
43
43
|
|
44
44
|
it 'it sends delegates create to the factory' do
|
45
45
|
subject.create(:user)
|
46
|
-
expect(factory_double).to have_received(:create).with(:user)
|
46
|
+
expect(factory_double).to have_received(:create).with(:user, {})
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'it sends delegates create to the factory and symbolize keys' do
|
50
|
+
subject.create(:user, {'name' => "name"})
|
51
|
+
expect(factory_double).to have_received(:create).with(:user, {name: 'name'})
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'it sends delegates create to the factory and symbolize keys with trait' do
|
55
|
+
subject.create(:user, 'trait1', {'name' => "name"})
|
56
|
+
expect(factory_double).to have_received(:create).with(:user, :trait1, {name: 'name'})
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'it sends delegates create to the factory and symbolize keys with only trait' do
|
60
|
+
subject.create(:user, 'trait2')
|
61
|
+
expect(factory_double).to have_received(:create).with(:user, :trait2, {})
|
47
62
|
end
|
48
63
|
|
49
64
|
it 'it sends delegates create_list to the factory' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cypress-on-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- miceportal team
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-01-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
@@ -303,7 +303,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
303
303
|
- !ruby/object:Gem::Version
|
304
304
|
version: '0'
|
305
305
|
requirements: []
|
306
|
-
|
306
|
+
rubyforge_project:
|
307
|
+
rubygems_version: 2.6.14.4
|
307
308
|
signing_key:
|
308
309
|
specification_version: 4
|
309
310
|
summary: Integrates cypress with rails or rack applications
|