cypress-on-rails 1.9.1 → 1.10.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19c6280b01cef6fe5088f9a3d1098acf69a116f6118e219992f961f7af7f1a6d
|
4
|
+
data.tar.gz: 8408f84cf6d400a87136243c34c49ed228ccde27f14e824aa88d053bf435ad78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d72faf8adc3ed46442e0bcd91b5420d3dda942192ba014f4ce435284448e06a44de95f72c5d5a007357902eab0d64a7f4965da839c966243997a56ebcecab3e9
|
7
|
+
data.tar.gz: 25e8fad0237b6e3f0a891a4d202273257210e42a0056db6026a70a3cbc0c6851a3763e7c2e70016ab76ec3efc7586d786741e271cd0855d52741e6387d6064ed
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## [1.10.0]
|
2
|
+
[Compare]: https://github.com/shakacode/cypress-on-rails/compare/v1.9.1...v1.10.0
|
3
|
+
|
4
|
+
### Changed
|
5
|
+
* improve error message received from failed command
|
6
|
+
|
1
7
|
## [1.9.1]
|
2
8
|
[Compare]: https://github.com/shakacode/cypress-on-rails/compare/v1.9.0...v1.9.1
|
3
9
|
|
@@ -56,15 +56,20 @@ module CypressOnRails
|
|
56
56
|
missing_command = commands.find {|command| !@file.exists?(command.file_path) }
|
57
57
|
|
58
58
|
if missing_command.nil?
|
59
|
-
results = commands.map { |command| @command_executor.perform(command.file_path, command.options) }
|
60
|
-
|
61
59
|
begin
|
62
|
-
|
63
|
-
rescue NoMethodError
|
64
|
-
output = {"message" => "Cannot convert to json"}.to_json
|
65
|
-
end
|
60
|
+
results = commands.map { |command| @command_executor.perform(command.file_path, command.options) }
|
66
61
|
|
67
|
-
|
62
|
+
begin
|
63
|
+
output = results.to_json
|
64
|
+
rescue NoMethodError
|
65
|
+
output = {"message" => "Cannot convert to json"}.to_json
|
66
|
+
end
|
67
|
+
|
68
|
+
[201, {'Content-Type' => 'application/json'}, [output]]
|
69
|
+
rescue => e
|
70
|
+
output = {"message" => e.message, "class" => e.class.to_s}.to_json
|
71
|
+
[500, {'Content-Type' => 'application/json'}, [output]]
|
72
|
+
end
|
68
73
|
else
|
69
74
|
[404, {}, ["could not find command file: #{missing_command.file_path}"]]
|
70
75
|
end
|
@@ -6,8 +6,12 @@ Cypress.Commands.add('appCommands', function (body) {
|
|
6
6
|
url: "/__cypress__/command",
|
7
7
|
body: JSON.stringify(body),
|
8
8
|
log: true,
|
9
|
-
failOnStatusCode:
|
9
|
+
failOnStatusCode: false
|
10
10
|
}).then((response) => {
|
11
|
+
if (response.status != 201) {
|
12
|
+
expect(response.body.message).to.be.empty
|
13
|
+
expect(response.body.status).to.be.equal(201)
|
14
|
+
}
|
11
15
|
return response.body
|
12
16
|
});
|
13
17
|
});
|
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.
|
4
|
+
version: 1.10.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: 2021-
|
12
|
+
date: 2021-04-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|