-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firefox and Safari integration tests fixes #1029
Conversation
987851b
to
f8ac9e2
Compare
src/raven.js
Outdated
// E.g. throwing a string or raw object in Firefox | ||
// Generating synthetic error doesn't add any value here | ||
// | ||
// We should probably somehow let user know that he should fix his code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should say "they should fix their code"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in_app and filename are the only changed keys here, right? would it be simpler to just make the normalized
object assign filename : frame.url || stackInfoUrl
, and rely on the existing logic for in_app? or does in_app actually return a false positive in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. Just wanted to be a little more explicit, as we don't have function
nor filename
which are used in tests for in_app
logic. I still left it on a separate line now though, as it's more readable with this long comment this way.
view: window | ||
} | ||
|
||
if ('MouseEvent' in window) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't hurt to comment these branches with the browsers they're active on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these factories are way better though 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely fix the comment, the normalizedFrame thing being cleaner or not is up to you. Exciting to have green tests cross browser, this is long overdue! 💯
src/raven.js
Outdated
// E.g. throwing a string or raw object in Firefox | ||
// Generating synthetic error doesn't add any value here | ||
// | ||
// We should probably somehow let user know that he should fix his code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in_app and filename are the only changed keys here, right? would it be simpler to just make the normalized
object assign filename : frame.url || stackInfoUrl
, and rely on the existing logic for in_app? or does in_app actually return a false positive in this case?
"test": "npm run lint && grunt build.test && npm run test:unit && npm run test:integration && npm run test:typescript", | ||
"test:unit": "mocha-chrome test/index.html", | ||
"test:integration": "mocha-chrome test/integration/index.html --chrome-flags '[\"--disable-web-security\"]' --ignore-resource-errors --ignore-exceptions", | ||
"test:typescript": "tsc --noEmit --noImplicitAny typescript/raven-tests.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I generally link linking to the version found in node_modules
because collaborators often don't have node_modules/.bin
on their PATH
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think when you run things using yarn/npm, it'll add node_modules/.bin
to search path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah
Dismissing @MaxBittker's review because his comments appear addressed and this seems good to merge. |
- Fix MouseEvents related integration tests on Chrome - Fix Mouse/KeyboardEvents related integration tests on Firefox - Update captureException test assertion for Safari - Fix non-error throws in onerror handler on Firefox - Simplify _normalizeFrame edgecase and comment on event factories
- Use Headless Chrome instead of PhantomJS - Reconfigure TravisCI to utilize new setup - Remove PhantomJS guards in integration tests - Start partial migration to npm scripts instead of Grunt - Remove lodash and use native functions instead - Remove redundant packages
ece5380
to
bafa99c
Compare
Rebased and merged |
A PR closing this issue has just been released 🚀This issue was referenced by PR #14643, which was included in the 8.45.0 release. |
There are 2 considerations we have to take into account.
In
Update captureException test assertion for Safari
commit, I decreased required frames to1
, as Safari is not able to gather any more information about manually caught errors coming fromnon-error
source, eg. strings/object. We need "at least"captureMessage
call with appropriate message attached, as this is whatcaptureException
defaults to when passing non-error argument to it.In
Fix non-error throws on onerror handler on Firefox
I modifiednormalizeFrames
method to account for the worst case possible. Quoting my comment in the code:I'd appreciate feedback on both of those issue.
When this PR and #1026 get merged, we'll be all green on Chrome, Firefox and Safari on OSX and we'll be able to move forward with more tests.
NOTE: I have to update Input related tests on Phantom.js (will do that first time in the morning)