-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fixed : Comment notification settings are visible even if comments ar… #4552
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
Conversation
…e disabled Added a UX condition to display comment notification settings, only if the user has enabled the comment notifications.
Thanks for offering this @tusharnain4578, Please could you remove the changes from 718adf3 from this PR? Also, would you be willing to add a test case to cover this functionality? Just something to add to our existing UserPreference tests. |
718adf3
to
6a5361d
Compare
@ssddanbrown Sorry for your troubles, i have removed the unnecessary commit from the PR, but i couldn't get what you mean by 'add a testcase', could you please elaborate more, sir? |
@tusharnain4578 No problem, no need to apologise, everyone is new to things at one point, and a lot of things kind of thing can be project specific.
We have a big set of automated tests that specific things, which is ran via phpunit. BookStack/tests/User/UserPreferencesTest.php Lines 108 to 125 in dfaf6f7
This loads the `/preferences/notifications' view, then checks the response to ensure it has the content we expect (In that case, a book we're watching). There's a bit of guidance on this in our devdocs here although I've just noticed it's not very well documented and under the wrong heading, I'll look to address that at some point. If it's too much to learn/understand/get-involved-with just let me know and I can instead add the testing myself during review and merge. |
Added Testcases for preferences menu of Comment Notifications visibility when comments are enabled/disabled.
I have added 2 test cases in UserPreferencesTest.php for this functionality, please review, sir. |
Combined testcases, updated to use actual text strings, and set comments setting via correct method. Made during review of #4552
Thanks @tusharnain4578, now merged into development to be part of the next feature release. |
Following on from my comment yesterday, regarding our bad documentation for PHP tests, I've now updated and expanded the document for this into it's own document: https://github.com/BookStackApp/BookStack/blob/development/dev/docs/php-testing.md |
Sorry guys for maybe abuse asking... Notifications in emails by new comments on WATCHed pages - is it in perspective roadmap? |
…e disabled
Added a UX condition to display comment notification settings, only if the user has enabled the comment notifications.