-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Added e2e tests for page.published webhook #15662
Conversation
I need some help with this test |
Hey @Dark-Knight11 the issue you are running into might have to do with the "authors" matcher behaving slightly differently when run solo or as a part of all suites. This same issue was discussed deeper in a recent PR. The solution might be adding |
Codecov ReportBase: 52.75% // Head: 52.76% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #15662 +/- ##
=======================================
Coverage 52.75% 52.76%
=======================================
Files 1468 1468
Lines 95976 95976
Branches 10740 10740
=======================================
+ Hits 50636 50640 +4
+ Misses 44092 44087 -5
- Partials 1248 1249 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Nope that didn't work |
e5f7483
to
bdfb6ea
Compare
Looks to me like you need to update your snapshots? |
bdfb6ea
to
9720459
Compare
.body({ | ||
pages: [ | ||
{ | ||
title: 'testing page.published webhook', |
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.
The snapshot tests here are failing most likely because the post title is a bit long and the "anyLocalUrl" matcher did not handle it properly (here is a fix for it form another PR). to make things easier, might just give the page a single-word title OR reuse the fix from the linked above PR
Note from our bot: Some changes have been requested on this pull request. Updating your code is great, but won't notify us, so please leave a comment so that we (and our bot) can see when you've made the changes. Thank you 🙏 |
6eb08cc
to
37f87d1
Compare
I think I'm facing some other issue over here
|
config.development.json
Outdated
"server": { | ||
"host": "0.0.0.0" | ||
} | ||
} |
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.
This should not be in the commit 😬
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.
oh sorry my bad
it wasn't there before though
I'll remove it
6f61ef8
to
8927432
Compare
Just to be clear - the above comment from Naz is correct, the tests are failing because your snapshots need to be regenerated. As you work through these kinds of changes, the snapshots need to be regenerated regularly, especially as there is more than one person working on this - it means we're always adding new snapshots and in this case, there's been a change to one of the matcher regexes. |
ref TryGhost#15537 - this adds an e2e test and test snapshot for the page.published webhook so we can prevent regressions and bugs in the future
8927432
to
bb0aa06
Compare
Yeah but like I do test them on updated snapshots and the tests still fail for |
fixed the issue 👍 |
closing it as someone already made a PR for it |
refs: #15537
This adds an e2e test and test snapshot for the
page.published
webhook so we can prevent regressions and bugs in the futureGot some code for us? Awesome 🎊!
Please include a description of your change & check your PR against this list, thanks!
yarn test:all
andyarn lint
)We appreciate your contribution!
Also, if you'd be interested in writing code like this for us more regularly, we're hiring:
https://careers.ghost.org