Skip to content

Commit

Permalink
chore: fix integration tests
Browse files Browse the repository at this point in the history
Refs: #943
  • Loading branch information
subzero10 committed Jan 13, 2023
1 parent a58440a commit a58408e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/js/test/integration/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,16 @@ describe('browser integration', function () {
})

it('sends user feedback for notice on submit', function (done) {
let apiKey;
let userFeedbackEndpoint;
sandbox.style.display = 'block';
sandbox.style.width = '800px';
sandbox.style.height = '800px';
sandbox
.run(function () {
apiKey = Honeybadger.config.apiKey
userFeedbackEndpoint = Honeybadger.config.userFeedbackEndpoint

Honeybadger.getUserFeedbackSubmitUrl = () => '/base/dist/browser/honeybadger-feedback-form.js'

Honeybadger.afterNotify(() => {
Expand All @@ -474,9 +479,9 @@ describe('browser integration', function () {
button.click()

setTimeout(() => {
const feedbackSubmitUrl = Honeybadger.config.userFeedbackEndpoint +
const feedbackSubmitUrl = userFeedbackEndpoint +
'?format=js' +
`&api_key=${Honeybadger.config.apiKey}` +
`&api_key=${apiKey}` +
`&token=test` +
`&name=${encodeURIComponent(name.value)}` +
`&email=${encodeURIComponent(email.value)}` +
Expand Down

0 comments on commit a58408e

Please sign in to comment.