Skip to content

Commit

Permalink
Support rails 7.1 by adding content-type header to generated on-rails…
Browse files Browse the repository at this point in the history
….js file (#148)
  • Loading branch information
anark committed Jan 4, 2024
1 parent bce4b18 commit fd5a631
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

### Fixed
* fix update index.js in install generatpr [PR 147](https://github.com/shakacode/cypress-on-rails/pull/147) by [Judahmeek]
* Support rails 7.1 by adding content-type header to generated on-rails.js file [PR 148](https://github.com/shakacode/cypress-on-rails/pull/148) by [anark]

## [1.16.0]
[Compare]: https://github.com/shakacode/cypress-on-rails/compare/v1.15.1...v1.16.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Cypress.Commands.add('appCommands', function (body) {
method: 'POST',
url: "/__e2e__/command",
body: JSON.stringify(body),
headers: {
'Content-Type': 'application/json',
},
log: false,
failOnStatusCode: false
}).then((response) => {
Expand Down Expand Up @@ -52,6 +55,9 @@ Cypress.on('fail', (err, runnable) => {
Cypress.$.ajax({
url: '/__e2e__/command',
data: JSON.stringify({name: 'log_fail', options: {error_message: err.message, runnable_full_title: runnable.fullTitle() }}),
headers: {
'Content-Type': 'application/json',
},
async: false,
method: 'POST'
});
Expand Down

0 comments on commit fd5a631

Please sign in to comment.