-
Notifications
You must be signed in to change notification settings - Fork 82
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
Feat/integ tests notifications #1597
base: main
Are you sure you want to change the base?
Conversation
assert_that(list_notifications(client1, filter={'read': True})).is_not_none() | ||
assert_that(list_notifications(client1, filter={'unread': True})).is_not_none() | ||
assert_that(list_notifications(client1, filter={'archived': True})).is_not_none() | ||
|
||
|
||
def test_count_unread_notification(client1, session_share_1): | ||
def test_count_unread_notification(client1): | ||
assert_that(count_unread_notificiations(client1)).is_greater_than_or_equal_to(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.
countReadNotifications and countDeletedNotifications are not used in the frontend. Maybe we should delete them from the backend and remove the tests for countReadNotifications. wdyt?
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.
deleteNotification is also not used in the frontend
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.
removed all 3 ops
response = client.query(query=query) | ||
return response.data.countUnreadNotifications | ||
|
||
|
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.
As commented already, count_read_notificiations
and count_deleted_notificiations
are not used in the FE
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.
removed all 3 ops
assert_that(list_notifications(client1)).is_not_none() | ||
assert_that(list_notifications(client1, filter={'read': True})).is_not_none() | ||
assert_that(list_notifications(client1, filter={'unread': True})).is_not_none() | ||
assert_that(list_notifications(client1, filter={'archived': True})).is_not_none() |
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.
Maybe we can assert the keys of the response, not only that it is not None
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.
asserted contains_key(...)
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 part of notifications is fine, I am not approving because of the changes in shares; which I am not sure how they interact with other shares tests
Is there another PR for shares that I should wait for on shares before testing once more that all shares tests + notification tests work in tandem? @dlpzx |
Feature or Bugfix
Detail
Relates
Security
Please answer the questions below briefly where applicable, or write
N/A
. Based onOWASP 10.
fetching data from storage outside the application (e.g. a database, an S3 bucket)?
eval
or similar functions are used?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.