Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const panelist1 = 'e20e2642-a78f-40fb-b455-a8c48b522ea4';
- // 3 qualification attempts approved: ['mobileTOL', 'desktopTOL', 'desktopApp'] (SOURCE OF TRUTH)
- const panelist1QualificationAttempts = {
- "_id" : "e20e2642-a78f-40fb-b455-a8c48b522ea4",
- "qualifications" : {
- "mobileTOL" : "approved",
- "desktopTOL" : "approved",
- "desktopApp" : "approved"
- }
- };
- // 2 qualifications as a panelist: ['mobileTOL', 'desktopTOL'], missing 1: 'desktopApp'
- let panelistQualifications = {
- "_id" : "e20e2642-a78f-40fb-b455-a8c48b522ea4",
- "qualifications" : [
- "mobileTOL",
- "desktopTOL"
- ]
- };
- // 2 qualifications in demographics: ['mobileTOL', 'desktopTOL'], missing 1: 'desktopApp'
- let panelistDemographics = {
- "panelistId" : "e20e2642-a78f-40fb-b455-a8c48b522ea4",
- "__meta__" : {
- "panelist" : {
- "qualifications" : [
- {
- "grantor" : "kadachi@userzoom.com",
- "key" : "desktopTOL"
- },
- {
- "key" : "mobileTOL",
- "grantor" : "sdada@userzoom.com"
- }
- ]
- }
- }
- };
- // 1 qualification in profile: 'mobileTOL', missing 2: ['desktopApp', 'desktopTOL']
- let panelistProfile = {
- "_id" : "d9d5f944-3e1d-4d97-acf1-05858cb8545f",
- "panelistId" : "e20e2642-a78f-40fb-b455-a8c48b522ea4",
- "qualifications" : [
- {
- "key" : "mobileTOL",
- "status" : "approved"
- }
- ]
- };
- /***** RUN MIGRATION *****/
- // All 3 qualifications present as a panelist present (added: 'desktopApp')
- panelistQualifications = {
- "_id" : "e20e2642-a78f-40fb-b455-a8c48b522ea4",
- "qualifications" : [
- "desktopApp",
- "mobileTOL",
- "desktopTOL"
- ]
- };
- // All 3 qualifications present as a panelist present (added: 'desktopApp')
- panelistDemographics = {
- "panelistId" : "e20e2642-a78f-40fb-b455-a8c48b522ea4",
- "__meta__" : {
- "panelist" : {
- "qualifications" : [
- {
- "grantor" : "kadachi@userzoom.com",
- "key" : "desktopTOL"
- },
- {
- "key" : "mobileTOL",
- "grantor" : "sdada@userzoom.com"
- },
- {
- "key" : "desktopApp",
- "reason" : "syncQualifications",
- "grantor" : "dbMigration",
- "createdAt" : "2019-06-06T12:40:43.794Z",
- "updatedAt" : "2019-06-06T12:40:43.794Z"
- }
- ]
- }
- }
- };
- // All 3 qualifications present in the profile (added both: ['desktopApp', 'desktopTOL'])
- panelistProfile = {
- "_id" : "d9d5f944-3e1d-4d97-acf1-05858cb8545f",
- "panelistId" : "e20e2642-a78f-40fb-b455-a8c48b522ea4",
- "qualifications" : [
- {
- "key" : "mobileTOL",
- "status" : "approved"
- },
- {
- "key" : "desktopTOL",
- "status" : "approved"
- },
- {
- "key" : "desktopApp",
- "status" : "approved"
- }
- ]
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement