rewardz / Feeds

Feeds
Other
2 stars 1 forks source link

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

Closed yatishTrootech closed 1 year ago

yatishTrootech commented 1 year ago

For the feeds repo Post/polls, Appreciations, Rico, and Feedback posts sometimes fail and have issues with visibility according to shared with the flag of that post So prepare a document covering all the scenarios and test cases which is helpful for QA team to complete test covering all the scenarios for that

DOC: https://docs.google.com/document/d/1Lja7CVrivNseWvfdVszlvgEAMTNXA1BVu2rquKI-uBo/edit?usp=sharing

Linked Issues: [Feedback] Closed feedbacks are throwing errors #4832

Top Hero Api Changes #4777

[McD] In Profile Appreciation for Receive , Given ,post &poll count is displaying wrong #4763

[IFZA]User tag in comment notification is getting as feed not found #4750

organization recognition search only searches the start of name #127

[Feedback] User Unable to access comments and post detail #129

Issue With shared with "ORGANIZATION_DEPARTMENTS" posts/polls #122

NUHS app post/polls List issue with self department and ORGANIZATION_DEPARTMENT Post #125

Don't use affiliated Orgs to get posts everywhere #4569

[BOUS- M2]- Send Greetings with attachments #4026

[MCD]Backend issues #4377

Feedback List API - Affiliated Orgs #4224

[McD] Client feedback shared by Sudhanshu(Backend issues) #4235

[NUHS] Multi-org Post - User who created the post should be able to view #3855

yatishTrootech commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

yatishTrootech commented 1 year ago

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

qanaveen1111 commented 1 year ago

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

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

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

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
qanaveen1111 commented 1 year ago

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

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

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.

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.

qanaveen1111 commented 1 year ago

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

@yatishTrootech @suryaiiit @SteffiVinod5