Skip to content
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

Feeds DOC for testing covering all test cases and scenarios #141

Closed
yatishTrootech opened this issue Apr 25, 2023 · 9 comments · Fixed by #142
Closed

Feeds DOC for testing covering all test cases and scenarios #141

yatishTrootech opened this issue Apr 25, 2023 · 9 comments · Fixed by #142
Assignees

Comments

@yatishTrootech yatishTrootech self-assigned this Apr 25, 2023
@yatishTrootech
Copy link
Contributor Author

Hey @suryaiiit At the time of the creation of the Feedback we create a post in the backend Here
By default, it is taking shared_with=self_department and we are setting only ORGS(of creator) in the post model here departments are blank for post

But if we create a regular/normal from post/polls section and post that is shared with = self department then we are setting departments in the post here ORGS are null Here

if we go according to the normal post logic feedback is following the opposite logic for it, Should set departments instead of ORGS

Should we make this change here for feedback post?

@yatishTrootech
Copy link
Contributor Author

Hey @suryaiiit We Have a Custom option while creating post/polls

Custom (shared_with=ORGANIZATION_DEPARTMENTS 40)
Front end will pass organizations if all departments are selected otherwise I will get only departments

EG:
ORGA: DeptA1, DeptA2
ORGB: DeptB1, DepatB2

for posts/polls custom selection

Case 1: if selected DeptA1, DeptB1, DepatB2 and create then front end will send me

organizations = [ORGB]
departments = [DeptA1, DeptB1, DepatB2]

Case 2: If selected DeptA1, DeptA2, DeptB1, DepatB2 and create then front end will send me

organizations = [ORGA, ORGB]
departments = [DeptA1, DeptB1, DepatB2]

Case 3: If selected DeptA1, DeptB1 and create then front end will send me
organizations = []
departments = [DeptA1, DeptB1,]

is this correct @suyeshkandpal28 ?

@yatishTrootech
Copy link
Contributor Author

Hey @suryaiiit We Have a Custom option while creating post/polls

Custom (shared_with=ORGANIZATION_DEPARTMENTS 40) Front end will pass organizations if all departments are selected otherwise I will get only departments

EG: ORGA: DeptA1, DeptA2 ORGB: DeptB1, DepatB2

for posts/polls custom selection

Case 1: if selected DeptA1, DeptB1, DepatB2 and create then front end will send me

organizations = [ORGB] departments = [DeptA1, DeptB1, DepatB2]

Case 2: If selected DeptA1, DeptA2, DeptB1, DepatB2 and create then front end will send me

organizations = [ORGA, ORGB] departments = [DeptA1, DeptB1, DepatB2]

Case 3: If selected DeptA1, DeptB1 and create then front end will send me organizations = [] departments = [DeptA1, DeptB1,]

Is this correct @suyeshkandpal28 ?

If yes then for case 3 post is working fine because at the time of creation, we are updating the initial data from this function Here and it updates the ORG if multi org is not enabled but while creating polls we are setting ORG in initial data Here
Which looks wrong to me Should I do the same for updating ORG here in the initial data?

@suryaiiit

@suyeshkandpal28
Copy link

Hey @suryaiiit We Have a Custom option while creating post/polls

Custom (shared_with=ORGANIZATION_DEPARTMENTS 40) Front end will pass organizations if all departments are selected otherwise I will get only departments

EG: ORGA: DeptA1, DeptA2 ORGB: DeptB1, DepatB2

for posts/polls custom selection

Case 1: if selected DeptA1, DeptB1, DepatB2 and create then front end will send me

organizations = [ORGB] departments = [DeptA1, DeptB1, DepatB2]

Case 2: If selected DeptA1, DeptA2, DeptB1, DepatB2 and create then front end will send me

organizations = [ORGA, ORGB] departments = [DeptA1, DeptB1, DepatB2]

Case 3: If selected DeptA1, DeptB1 and create then front end will send me organizations = [] departments = [DeptA1, DeptB1,]

is this correct @suyeshkandpal28 ?

Yes its correct @yatishTrootech

@yatishTrootech
Copy link
Contributor Author

yatishTrootech commented Apr 25, 2023

if we create a custom post through postman without setting Enable Multi Organization Post & Poll
it should throw

@yatishTrootech
Copy link
Contributor Author

Hey @suryaiiit At the time of the creation of the Feedback we create a post in the backend Here By default, it is taking shared_with=self_department and we are setting only ORGS(of creator) in the post model here departments are blank for post

But if we create a regular/normal from post/polls section and post that is shared with = self department then we are setting departments in the post here ORGS are null Here

if we go according to the normal post logic feedback is following the opposite logic for it, Should set departments instead of ORGS

Should we make this change here for feedback post?

Dont consider shared_witjh for feedback posts

@yatishTrootech yatishTrootech linked a pull request Apr 26, 2023 that will close this issue
@qanaveen1111
Copy link

qanaveen1111 commented Apr 27, 2023

Date-27-4-23
Server-Jack.skordev.com

MAC-D Happi app:-

For post/polls (post_type=USER_CREATED_POST or USER_CREATED_POLL):

   Case-1: if post is shared_with = self_department (departments only)
        a) If the user is an admin they can see all the posts which are not belongs to them of  
             Their ORG/DEPT/post created by Themselves
      b) Normal user must belongs to creator's Department or receiver of that post then only  
             he can access that post 

Test Scenarios- Android and iOS Post/poll

Post to My department

  • ( Parent Org ) Created post to (My dept only ) from hod1@mcd.com user is from hod dept and verified with hod dept user hod2@mcd.com post is showing and verified with another dept user steffi@mcd.com post Is not showing
  • (Parent Org) verified with same Org user but admin user admin@mcd.com from Corporate Mcd dept post is showing and verified with same Org but different department admin user naveen123@mcd.com post is showing ( so irrespective of the dept who are admins in same Org can see the post )
  • (Child Org) verified the post of parent Org with normal user emp@demo.com and admin user admin@mcddemo.com with same dept and another dept user demouser@mcd.com post is not displaying for affiliated child Orgs
  • (Parent Org ) admin user created post from naveen123@mcd.com (below manager dept) and verified with yustar@mcd.com user is from below manger dept post is showing and login from Steffi@mcd.com another dept user post is not showing
  • (Parent Org) admin user created post from admin@mcd.com (corporate Mcd) and verified with steffi@mcd.com corporate mcd dept post is showing and with hod1@mcd.com different dept post is not displaying.( if admin created post to logged user dept then that dept only can see the post and admins can see the post )
  • (child Org) Login with admin user and verified for post of parent Org admin created with admin@mcd.com admin user and login with emp@demo.com normal or admin user post is not displaying ( affiliated Orgs will not see the admin created post or normal users post )
  • Admin can delete, edit ,pin the post ,and report abuse for any post

Post to Public

      Case-2: if post is shared_with = ALL_DEPARTMENTS (public)
       a) If the user is an admin they can see all the posts which are not belongs to them of
            their ORG/DEPT/post created by Themselves
        b) Normal user must be creator’s ORG is same can access
  • (Parent Org) Created post as public with steffi@mcd.com (Corporate mcd dept) and verified with test1@mcd.com is from same dept post is showing and verified with hod1@mcd.com different dept post is showing ( all the users in the Org can see the post )
  • (Child Org ) verified the public post in child org with admin@mcddemo.com admin user and emp@demo.com normal user post is not showing ( public post created by parent org only will display to same Org not to affiliated Orgs)

Poll

Poll to my department

  • (Parent Org) Created poll from admin@mcd.com (Corporate mcd) and verified with steffi@mcd.com with same dept poll is showing and with hod1@mcd.com poll is not showing
  • (child Org) verified with poll of parent Org login with admin@mcddemo.com admin user and emp@demo.com normal user poll is not displaying
  • Admin can only pin the poll or delete the poll can't edit the poll

Poll to Public

  • (Parent Org ) Created public poll from admin@mcd.com(Corporate mcd)verified with steffi@mcd.com with same dept poll is showing and verify with hod1@mcd.com different dept poll is showing
  • (Parent)OrgCreated poll from dept (below manager ) naveen123@mcd.com admin user and login with yustar@mcd.com with same dept poll is showing and login with steffi@mcd.com poll is displaying
  • (Child Org) verified the 2 polls created in parent Org with admin@mcddemo.com and emp@demo.com poll is not disaplying in affiliated Orgs ( poll if public it will display to only the orgs which created poll)

Note-

  • Post -->Only admin/creator can update/delete - > admin user can delete ,edit, pin the post and report abuse
  • Poll--> Only admin can pin the poll or delete the poll
  • normal users can only report abuse he can only edit or delete his own post
  • Verified like/unlike/comment/report/pin/comment like/edit comment/delete comment/filter/ search working fine

Rico (Appreciation)

For RICO (post_type=USER_CREATED_APPRECIATION or nomination_status=Approved):

Rico To Teams

     Case-1: if appreciation is shared_with = self_department (departments only Or Teams)
        a) If the user is an admin they can see all the posts which are not belongs to them of  
             Their ORG/DEPT/post created by Themselve  
       `b) Normal user must belongs to creator's Department or receiver of that post or creator or cc_user then only  he can access that post
  • Did Rico as teams from hod1@mcd.com (sender) and receiver is test2@mcd.com(child Org) and cc user is Yustar@mcd.com ( from parent Org different dept ) post is not showing to sender and receiver and cc users and there respective departments and other department users not showing

Rico To Private

  Case-2: if post is shared_with = ADMIN_ONLY (private) (N/A)
        a) If the user is an admin they can see all the posts which are not belongs to them of
            Their ORG/DEPT/post created by Themselves
        b) Normal user must be creator or admin can see the post
  • Did Rico as private from yustar@mcd.com to Steffi @mcd.com and cc is hod1@mcd.com in this sender and receiver and cc user and admins in both Orgs can see the post

Rico to public

    Case-3: if post is shared_with = ALL_DEPARTMENTS (public)
        a) If the user is an admin they can see all the posts which are not belongs to them of
            their ORG/DEPT/post created by Themselves
        b) Normal user must be creator’s ORG is same can access
  • Did Rico as public from yustar@mcd.com to Steffi @mcd.com and cc is hod1@mcd.com in this sender and receiver and cc user and admins in both Orgs can see the post and all the users in both departments and affiliated Orgs can see the post

@qanaveen1111
Copy link

qanaveen1111 commented Apr 27, 2023

NUHS App

Server-jack.skordev
Device-iOS

Post/poll

  Case-1: if post is shared_with = self_department (my departments only)
        a) Admin from creator's ORG can access this post
        b) Normal user must belongs to creator/ creator's department  can access the post.   

Post to My Dept--> Post will display only to particular department of logged in user

  • ORG-Parent (Post type -My department) -Created post from parent Org [user1@nuhs.edu.sg] (pharmacy dept)and login with same Org but different dept user [user4@nuhs.org] ( Dept Diagnostics) post is not displaying and with other dept
  • ORG- Parent (Admin post) Created post from [user3@nuhs.edu.sg](Diagonist dept) login with different dept user [user2@nuhs.edu.sg] (Pharmancy)post is not showing and login with same dept user (Diagonist) user[user4@nuhs.org] post is showing ( when admin post to there own dept that dept users only can see the post and another dept admins also can see the post in same Org)
  • ORG-Child (Post type -My department) -Created post from child Org (naveen@child.org) (clinical dept)and login with same Org but different dept user [ naveen@dept2.org] ( Dept Cardiac ) post is not displaying and with same dept user [clinic@nuhs.org] post is showing pass
  • ORG- child (Admin post) Created post from [admin2@nuhs.org](clinical dept) login with [naveen@dept2.org] post is not showing and login with admin user with another dept (cardiac) user[admin@nuhs.org] post is showing ( when admin post to there own dept that dept users only can see the post and another dept admins also can see the post in same Org)

    Post to My Org

       Case-2: if post is shared_with = ALL_DEPT (My ORG)
          a) Admin from creator's ORG can access this post
          b) Normal user can access the post if he belongs to same ORG of the post/creator
    
  • ORG-Parent (Post type-My ORG) -Created post from parent Org [user1@nuhs.edu.sg](pharmacy dept)and login with same Org but different dept user [user4@nuhs.org] ( Dept Diagnostics) post is displaying to all users in ORG
  • ORG-Child (Post type-My ORG) -Created post from parent Org [naveen@child.org](clinical dept)and login with same Org but different dept user [naveen@dept2.org] ( Dept cardic) post is displaying to all users in ORG

Post to Custom

   Case-3: if post is shared_with = ORGANIZATION_DEPARTMENTS (custom)
        a) Admin from creator's ORG can access this post
        b) Normal user can access the post if his dept belongs to post's shared Department or 
            he is a creator
  • ORG-Parent (Post type-Custom) -Created post from parent Org [user1@nuhs.edu.sg](pharmacy dept) to Child Org Cardiac dept ,login with child Org cardiac normal user and admin user post Is showing and admin user with different dept post is not showing and from user created post from another dept user, [user4@nuhs.org] post is not showing ( with same Org different dept user post is not showing )
  • ORG-child (Post type-Custom) -Created post from child Org naveen@child.org to parent Org [user1@nuhs.edu.sg] (Pharmacy) login with [user4@nuhs.org] (diagonist dept )post is not displaying to pharmacy users and only displaying and child Org also not displaying to another dept , admin users in both Org can see the post
  • ORG-Parent(Post type-custom )-Created multiple dept post from Parent Org[user1@nush.edu.sg] to child Org depts Cardiac and Clinic and verify the post with child Org users post is displaying for all the uses with this depts and admins in both child and parent can see the post

Poll to My Org- Poll will show to all the departments in same ORG but will not display to child ORG

  • ORG-Parent (poll type-My Org )-Created Poll from [[user3@nuhs.edu.sg] to My Org and login with same dept users and another dept users in same Org poll is displaying , login with child Org dept user[naveen@child.org] poll is not displaying
  • ORG-Child (Poll type-My Org)-Created poll from child org [admin@nuhs.org] to My Org and login with same dept user and another dept users in same Org poll is displaying , login with Parent Org dept user [user1@nuhs.edu.sg] poll is not displaying

Poll to My Dept--> Poll will display only to particular department of logged in user

  • Org-Parent (Poll type- My Dept)- Created poll from [[user3@nuhs.edu.sg] (Diagonist dept )to My dept and login with pharmacy dept user-[[user1@nuhs.edu.sg] poll is not displaying ,poll is displaying for only Diagonist dept and login with child Org user poll is not displaying
  • Org-Child (Poll type- My Dept)- Created poll from [admin@nuhs.org] (cardiac dept )to My dept and login with clinic dept user-[naveen@child.org] poll is not displaying ,poll is displaying for only cardiac dept and login with Parent Org user poll is not displaying

Poll to Custom-->This poll we can give to only selected departments in both parent and child Org admin can select any multiple depts that he want to poll.

  • Org-parent (Poll type -Custom)-Created poll form [user3@nuhs.edu.sg] diagonist dept to child Org (dept clinical) login with Parent Org pharmacy dept poll is not showing , login with diagonist dept(user4@nuhs.org) poll is not showing and login with child Org users with another dept cardiac poll is not showing, only showing for clinical( In creator Org admin can see the poll and in child Org admin cant see the poll with same or different dept )
  • ORG-child (poll type -Custom)-Created poll from [admin@nuhs.org] cardiac dept to parent Org (dept pharmacy) login with child Org clinical dept user poll is not showing and login with child org cardiac user poll is not showing and login with parent Org [user1@nuhs.edu.sg] pharmacy dept poll is showing
  • Org-parent (Poll type -Custom)-Created poll form [user3@nuhs.edu.sg ] to child Org multi depts cardiac and clinic and login with child Org depts, poll is displaying for both departments and not displaying in parent Org other dept users ,only displaying to created user dept (admin users in child and parent can see the poll)

Feedback Modules Test Scenario's: Verified by sumanth

I have tried to create feedback from NUHS App both in Android and IOS and it is working Fine

Users:
NUHS Parent Org:user3@nuhs.edu.sg/pass
NUHS Child Org: testnuhs103@nuhs.edu.sg/pass

I have verified login into the Microsite with admin user [user2@nuhs.edu.sg/testnuhs101@nuhs.edu.sg] and able to see the feedback posts created by the NUHS Parent Org users and as well as NUHS Child Org Users.

  • 2.I have closed the feedback from Microsite with admin user [user2@nuhs.edu.sg] and also able to see the Feedback posts in Microsite with status as Closed.
  • 3.I have verified login into the Microsite with admin user [user2@nuhs.edu.sg/testnuhs101@nuhs.edu.sg] and able to see the feedback posts created by the NUHS Parent Org users and as well as NUHS Child Org Users.

@qanaveen1111
Copy link

qanaveen1111 commented Apr 28, 2023

Date-28-4-23
Server-Skordev.com

  • Tested the above Nuhs and Mcd test scenarios all scenarios in skordev all are working fine.

@yatishTrootech @suryaiiit @SteffiVinod5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants