{"info":{"name":"nPVR_Convergence_Catchup_Transactional","_postman_id":"badc952a-5464-4c56-af44-e042940fb2d4","description":"","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Library","description":"03/04/2017 10:00","item":[{"name":"Initialization library","event":[{"listen":"test","script":{"type":"text/javascript","exec":["try {","    eval(responseBody);","    pushGlobal(\"module:library\", responseBody, false);","}catch (err) { ","    console.log(\"Error init framework: \"+ err.message);","    postman.setNextRequest(null);","}","tests['Framework ready'] = (typeof checkCore === 'function');"]}}],"request":{"method":"GET","header":[{"key":"Cache-Control","value":"no-cache, no-store"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url_initialization_library}}","host":["{{url_initialization_library}}"]},"description":null},"response":[]},{"name":"Initialization script","event":[{"listen":"test","script":{"type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","try {","    eval(responseBody);","    pushGlobal(\"module:script\", responseBody, false);","}catch (err) { ","    console.log(\"Error init script: \"+ err.message);","    postman.setNextRequest(null);","}","tests['Script ready'] = (typeof checkScripts === 'function');",""]}}],"request":{"method":"GET","header":[{"key":"Cache-Control","value":"no-cache, no-store"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url_initialization_script}}","host":["{{url_initialization_script}}"]},"description":null},"response":[]},{"name":"Get CycleID","event":[{"listen":"test","script":{"type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","getCycleID();"]}},{"listen":"prerequest","script":{"type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","setJiraToken();"]}}],"request":{"method":"GET","header":[{"key":"Authorization","value":"{{jira_token}}"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url_zephyr_get_cycle_id}}","host":["{{url_zephyr_get_cycle_id}}"]},"description":null},"response":[]}]},{"name":"EIT-4028 - End user is not allowed to access Transactional SOTV event without ENABLER subscription","description":"Scenario:\r\nAn enabler must be associated by an user to watch a transactional sotv event. Otherwise user should not be allowed to purchase/watch the transactional sotv event\r\n\r\n\r\nPrerequisites:\r\n1. Created one technical package and commercial package with ENABLER type (Enabler Creation)\r\n2. Created a LIVE_SUB technical package, Subscription type Commercial Package (Subscription Creation)\r\n3. Creating a channel with above LIVE_SUB technical package association (Not along with SOTV_CHANNEL solution offer)\r\n4. EPG Ingestion with IsSOTV as Y(Not along with SOTV_EVENT solution offer)\r\n5. SOTV_PACKAGE ingestion with enabler association and channel associating\r\n\r\nSteps:\r\n1.Register a user\r\n2. Login to AVS Portal\r\n3. User navigates to Live Catalogue section\r\n4. User tries to watch the transactional sotv event\r\n5. User wants to purchase that content\r\n6. User tries to purchase the SOTV_PACKAGE subscription\r\n7. Operator associates the enabler to user\r\n8. Now User tries to purchase the transactional sotv event\r\n9. user watches the transactional sotv event\r\n\r\nExpected Results:\r\n1. User is registered\r\n2. User should be successfully logged in\r\n3. SOTV Transactional Events should be available \r\n4. User should not able to watch transactional sotv event as he did not purchased that.\r\n5. User should not able to purchase SOTV_PACKAGE as he should be associated the respective enabler first\r\n6. Enabler should be associated to User\r\n7. System should show SOTV_PACKAGE subscription details to purchase\r\n8.Now User should able to purchase the transactional sotv event's SOTV_PACKAGE \r\n9. User should be able to watch the content\r\n\r\n\r\n||priceCateforyFor||priceCategoryName||priceCategoryDescription||price||frequency||currencyType||\r\n|LIVESUBSCRIPTION|Rec Action Movies usd|Rec Action Movies usd|4.99|Monthly|USD|\r\n|SOTV_PACKAGE|Smart rub|Smart rub|9.00|NoFrequency|RUB|\r\n\r\n||paymentMethod||\r\n|INVOICE|\r\n|PAYPAL|\r\n|BRAINTREE|\r\n\r\n||Scenario||Enabler_SolutionOffer_Desc||Enabler_SolutionOffer_Id||ChannelId||SOTV_PACKAGE_SolutionOffer_Name||SOTV_PACKAGE_SolutionOffer_Id||\r\n|1|63IT_ENabler_CommPKg|13433|332018| SOTV_PACKAGE_ENABLER_11649|13027|","item":[{"name":"EIT-4028 - Load TC","event":[{"listen":"test","script":{"type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","tests[\"Load TC\"] = loadTestCase();"]}},{"listen":"prerequest","script":{"type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","pushGlobal(ZEPHYR_KEY, getZephyrKey());"]}}],"request":{"method":"GET","header":[{"key":"Authorization","value":"{{jira_token}}"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url_zephyr_tc}}","host":["{{url_zephyr_tc}}"]},"description":"Zephyr API integration on Postman"},"response":[]},{"name":"EIT-4028 - Load Execution","event":[{"listen":"test","script":{"type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","tests[\"Start execution\"] = loadExecutionId();"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"{{jira_token}}"}],"body":{"mode":"raw","raw":"{\r\n  \"cycleId\": \"{{cycleID}}\",\r\n  \"issueId\": \"{{issueId}}\",\r\n  \"projectId\": \"{{Jira_projectId}}\",\r\n  \"versionId\": \"{{versionId}}\"\r\n}"},"url":{"raw":"{{url_zephyr_execution}}","host":["{{url_zephyr_execution}}"]},"description":"Zephyr API integration on Postman"},"response":[]},{"name":"EIT-4028 - Load Steps","event":[{"listen":"test","script":{"type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","","var dati = getTCData();","tests[\"Load steps\"] = loadTestCaseSteps(dati.num_of_steps);"]}}],"request":{"method":"GET","header":[{"key":"Authorization","value":"{{jira_token}}"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url_zephyr_steps}}","host":["{{url_zephyr_steps}}"]},"description":null},"response":[]},{"name":"EIT-4028 - Header","event":[{"listen":"test","script":{"type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","startHeader(function(regs, iCount) {","    var nanoParams = regs[iCount].object.nanoParams;","    if (!isUndefined(nanoParams)) {","        pushGlobal(\"tenant\", nanoParams.tenant);","        pushGlobal(\"appversion\", nanoParams.appversion);","        pushGlobal(\"cluster\", nanoParams.cluster);","        pushGlobal(\"locale\", nanoParams.locale);","        pushGlobal(\"propertyName\", nanoParams.propertyName);","    }","});"]}}],"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url_dummy}}","host":["{{url_dummy}}"]},"description":"Header of TC"},"response":[]},{"name":"EIT-4028 - POST CRMAccountListMgmt","event":[{"listen":"test","script":{"id":"dbf7459f-3dd7-4772-bc70-1e4c97c4e2a8","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","testShell(function(dati, i, expected) {","    setTests(\"checkReg\", checkRegistrationAMS(expected));","    var resp = JSON.parse(responseBody);","    if (getLastTests()) {","        var userId = resp.subscriber[0].userId;","        pushGlobal(\"partyId\", userId);","        var USERNAME = resp.subscriber[0].crmAccountId;","        pushGlobal(\"USERNAME\", USERNAME);","    }","}, false);"]}},{"listen":"prerequest","script":{"id":"de98c688-b395-488d-9fe9-df8c0f7d5e11","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","preRequestShell(function(dati, n) {","    var userData = dati.scenarios[n];","    var dm = getLoginDMParams();","    pushGlobal(\"username\", userData.username);","    pushGlobal(\"password\", userData.password);","    pushGlobal(\"optional_params\", dm);","});"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"operationType\": \"CREATE\",\r\n    \"tenantName\": \"tenant_1\",\r\n    \r\n    \"subscriberList\": [{\r\n        \"crmAccountId\": \"{{username}}\",\r\n        \"userType\": \"R\",\r\n        \"qualitySetting\": \"1\",\r\n        \"userPaymentMethod\":\"5\",\r\n        \"userPinPurchase\": \"0000\",\r\n        \"userPinParentalControl\": \"0000\",\r\n        \"crmAccountRetailerDomain\": \"0001\",\r\n        \"newsLetters\": \"Y\",\r\n        \"blackList\": \"N\",\r\n        \"fiscalCode\": \"AS99DD87D92HJ\",\r\n        \"address\": \"str1234\",\r\n        \"addressNumber\": \"str1234\",\r\n        \"marketingFlag\": \"Y\",\r\n        \"personalizedServicesFlag\": \"Y\",\r\n        \"thirdPartiesFlag\": \"Y\",\r\n\r\n        \"serviceStartDate\": \"2017-12-13\",\r\n        \"geoCountry\": { \"geoCountryId\": \"1\" },\r\n\t\t\"geoState\": { \"geoStateId\": \"4\" },\r\n\t\t\"geoProvince\": { \"geoProvinceId\": \"214\" },\r\n\t\t\"geoCity\": { \"geoCityId\": \"2059\" },\r\n        \"geoZipCode\": {\r\n\t\t\t\"geoZipCodeId\": \"12087\",\r\n\t\t\t\"geoZipCodeValue\": \"500059\"\r\n\t\t\t},\r\n\r\n        \"serviceEndDate\": \"2030-12-13\",\r\n        \"maxBWOverride\": \"100\",\r\n        \"maxHDStreams\": \"100\",\r\n        \"accessBWProfile\": \"100\",\r\n        \"maxHDSetTopBoxes\": \"99\",\r\n        \"accountList\": [{\r\n        \r\n            \"isMaster\": \"Y\",\r\n            \"userStatus\": \"1\",\r\n            \"username\": \"{{username}}\",\r\n            \"password\": \"{{password}}\",\r\n            \"firstname\": \"Avs\",\r\n            \"surname\": \"Pt\",\r\n            \"birthDate\": \"1980-03-30\",\r\n            \"gender\": \"M\",\r\n            \"email\": \"21mar6@mailinator.com\",\r\n            \"crmAccountMobileNumber\": \"43434343434343\",\r\n            \"userLanguage\": \"ENG\",\r\n            \"userPcLevelVod\": \"9\",\r\n            \"userPcLevelEpg\": \"0\",\r\n            \"isAdmin\": \"true\",\r\n            \"lockUnratedShows\": \"Y\",\r\n            \"showAllTitles\": \"Y\",\r\n            \"showGuideInformation\": \"Y\",\r\n            \"audioLanguageType\": \"ENG\",\r\n            \"uiLanguageType\": \"ENG\",\r\n            \"nickName\": \"ap\",\r\n            \"advTags\": \"str1234\",\r\n            \"purchaseEnabled\": \"true\"\r\n        }],\r\n        \"userRememberPinFlag\": \"N\",\r\n        \"userRememberPurchasePinflag\": \"N\",\r\n        \"pcFlag\": \"N\"\r\n    }]\r\n}"},"url":{"raw":"{{url_registration}}","host":["{{url_registration}}"]},"description":null},"response":[]},{"name":"EIT-4028 - POST USER/SESSIONS","event":[{"listen":"test","script":{"id":"4c84b715-9cc0-4487-8531-b4a9f77cbeed","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","testShell(function(dati, i, expected) {","    setTests(\"NanoLogin\", baseCheckResponse());","});"]}},{"listen":"prerequest","script":{"id":"0964289c-3c10-4b0f-a254-964a92c37b2c","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","preRequestShell(function(dati, n) {","    var userData = dati.scenarios[n];","    var dm = getLoginDMParams();","    //pushGlobal(\"username\", userData.user);","    pushGlobal(\"password\", userData.password);","    pushGlobal(\"optional_params\", dm);","});"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n        \"credentialStdAuth\":{\r\n        \"username\" : \"{{USERNAME}}\",\r\n        \"password\" : \"{{password}}\"\r\n        }\r\n} "},"url":{"raw":"{{url_USER_SESSIONS}}","host":["{{url_USER_SESSIONS}}"]},"description":null},"response":[]},{"name":"EIT-4028 - GET TRAY/SEARCH/PROGRAM","event":[{"listen":"test","script":{"id":"f3ca1b2d-d353-4518-a3d3-2c3acb67d72b","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","testShell(function(dati, i, expected) {","     setTests(\"SEARCH/PROGRAM\", baseCheckResponse());","    if (getLastTests()) {","        //check hits not empty","        var json = JSON.parse(responseBody);","        var hits = json.resultObj.containers;","        setTests(\"Container filled\", !isEmptyList(hits));","        if (getLastTests()) {","            ","            var contentId =json.resultObj.containers[0].metadata.contentId;","            var contentType = json.resultObj.containers[0].metadata.contentType;","            pushGlobal(\"contentId\", contentId);","            pushGlobal(\"contentType\", contentType);","            ","        ","        }","    }","});"]}},{"listen":"prerequest","script":{"id":"e2350901-8fb1-4e87-a272-11619f95f1d1","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","preRequestShell(function(dati, n) {","    var scenario = dati.scenarios[n];","    pushGlobal(\"channelId\", scenario.channelId);","   /* pushGlobal(\"lang\", scenario.lang);","    pushGlobal(\"tenant\", scenario.tenant);","    pushGlobal(\"appversion\", scenario.appversion);","    pushGlobal(\"cluster\", scenario.cluster);","    pushGlobal(\"propertyName\", scenario.propertyName);*/","});"]}}],"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"http://avs63-it.avs-accenture.com/AGL/1.2/R/ENG/PCTV/ALL/TRAY/SEARCH/PROGRAM?filter_channelIds={{channelId}}&filter_airingTime=now","protocol":"http","host":["avs63-it","avs-accenture","com"],"path":["AGL","1.2","R","ENG","PCTV","ALL","TRAY","SEARCH","PROGRAM"],"query":[{"key":"filter_channelIds","value":"{{channelId}}","equals":true},{"key":"filter_airingTime","value":"now","equals":true}]},"description":null},"response":[]},{"name":"EIT-4028 - GET CONTENT/USERDATA","event":[{"listen":"test","script":{"id":"ae0bc820-b233-437e-9fc7-b285d3fe4146","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","testShell(function(dati, i, expected) {","    setTests(\"CONTENT/USERDATA\", baseCheckResponse());","    if (getLastTests()) {","        var json = JSON.parse(responseBody);","        var rights = json.resultObj.containers[0].entitlement.assets[0].rights;","        setTests(\"Verifying Content rights before Enabler association\", rights === expected.rights);","    }","});"]}},{"listen":"prerequest","script":{"id":"a09e2140-293c-4e67-b3e1-b26e0ba4ce6a","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","preRequestShell(function(dati, n) {","    var scenario = dati.scenarios[n];","   /* pushGlobal(\"locale\", scenario.locale);","    pushGlobal(\"tenant\", scenario.tenant);","    pushGlobal(\"appversion\", scenario.appversion);","    pushGlobal(\"cluster\", scenario.cluster_R);","    pushGlobal(\"propertyName\", scenario.propertyName);","    pushGlobal(\"contentType\", scenario.contentType);","    pushGlobal(\"contentId\", scenario.channelId_A);*/","});"]}}],"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url_CONTENT_USERDATA}}","host":["{{url_CONTENT_USERDATA}}"]},"description":null},"response":[]},{"name":"EIT-4028 - POST USER/PURCHASES","event":[{"listen":"test","script":{"id":"179ce9ca-fca7-4de8-90d3-42ce83796b72","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","testShell(function(dati, i, expected) {","    setTests(\"USER/PURCHASES OK\", baseCheckResponse());","    ","});"]}},{"listen":"prerequest","script":{"id":"3c0ef780-5c45-47d2-a0a1-e1e522d4452f","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","preRequestShell(function(dati, n) {","","    //solutionOfferId should be a global variable","        var   solutionOfferId = dati.scenarios[n].LIVESUBSCRIPTIONID;","    pushGlobal(\"liveSolutionOfferId\", solutionOfferId);","});"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\"commercialPackageId\": \"{{liveSolutionOfferId}}\",\n\"pin\":\"0000\"\n}"},"url":{"raw":"{{url_USER_PURCHASES}}","host":["{{url_USER_PURCHASES}}"]},"description":null},"response":[]},{"name":"EIT-4028 - POST UpdateCrmAccountListCommercialProfile","event":[{"listen":"test","script":{"id":"9e5a9aff-fc4e-462c-96d7-88c955056293","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","testShell(function(dati, i, expected) {","","    setTests(\"UpdateCrmAccountListCommercialProfile = OK\", JSON.parse(responseBody).subscriber[0].resultCode === expected.resultCode && JSON.parse(responseBody).subscriber[0].resultDescription === expected.resultDescription);","","}, false);"]}},{"listen":"prerequest","script":{"id":"cc729756-6657-49d3-83eb-fbf0092ee69a","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","preRequestShell(function(dati, n) {","","    var tenantName = dati.scenarios[n].tenantName;","    pushGlobal(\"tenantName\", tenantName);","    // insert crmAccountId from data input file if it is not a global variable","","    var checkSolutionOfferCompatability = dati.scenarios[n].checkSolutionOfferCompatability;","    pushGlobal(\"checkSolutionOfferCompatability\", checkSolutionOfferCompatability);","    ","    var   CS_solutionOfferId_2 = dati.scenarios[n].Enabler_SolutionOffer_Id;","    pushGlobal(\"CS_solutionOfferId_2\", CS_solutionOfferId_2);","    //var solutionOfferID should be a global variable","","    var operationType = dati.scenarios[n].operationType;","    pushGlobal(\"operationType\", operationType);","});"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"tenantName\": \"{{tenantName}}\",\r\n  \"subscriberPackageList\": [\r\n    {\r\n      \"crmAccountId\": \"{{USERNAME}}\",\r\n      \"checkSolutionOfferCompatability\": \"{{checkSolutionOfferCompatability}}\",\r\n      \"commProfileList\": [\r\n        {\r\n          \"solutionOfferID\": \"{{CS_solutionOfferId_2}}\",\r\n          \"operationType\": \"{{operationType}}\"\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n} "},"url":{"raw":"{{url_updateCrmAccountListCommercialProfile}}","host":["{{url_updateCrmAccountListCommercialProfile}}"]},"description":null},"response":[]},{"name":"EIT-4028 - GET CONTENT/USERDATA 2","event":[{"listen":"test","script":{"id":"ef8c0b65-3b86-4779-9d5e-e9a983544dde","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","testShell(function(dati, i, expected) {","    setTests(\"CONTENT/USERDATA\", baseCheckResponse());","    if (getLastTests()) {","        var json = JSON.parse(responseBody);","        var rights = json.resultObj.containers[0].entitlement.assets[0].rights;","        var solutionOfferId = json.resultObj.containers[0].entitlement.assets[0].commercialPackages[0].id;","        pushGlobal(\"solutionOfferId\", solutionOfferId);","        setTests(\"User should get rights as BUY\", rights === expected.rights);","        ","    }","});"]}},{"listen":"prerequest","script":{"id":"d26d13fc-6dc4-4349-8d04-c3240e46de2c","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","preRequestShell(function(dati, n) {","    var scenario = dati.scenarios[n];","/*    pushGlobal(\"locale\", scenario.locale);","    pushGlobal(\"tenant\", scenario.tenant);","    pushGlobal(\"appversion\", scenario.appversion);","    pushGlobal(\"cluster\", scenario.cluster_R);","    pushGlobal(\"propertyName\", scenario.propertyName);","    pushGlobal(\"contentType\", scenario.contentType);","    pushGlobal(\"contentId\", scenario.channelId_A);*/","});"]}}],"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url_CONTENT_USERDATA}}","host":["{{url_CONTENT_USERDATA}}"]},"description":null},"response":[]},{"name":"EIT-4028 - POST USER/PURCHASES","event":[{"listen":"test","script":{"id":"179ce9ca-fca7-4de8-90d3-42ce83796b72","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","testShell(function(dati, i, expected) {","    setTests(\"USER/PURCHASES OK\", baseCheckResponse());","    ","});"]}},{"listen":"prerequest","script":{"id":"a29c7be2-225e-4a19-9169-dcac6325edb9","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","preRequestShell(function(dati, n) {","","    //solutionOfferId should be a global variable","        //var   solutionOfferId = dati.scenarios[n].SOTV_PACKAGE_SolutionOffer_Id;","    //pushGlobal(\"solutionOfferId\", solutionOfferId);","});"]}}],"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\"commercialPackageId\": \"{{solutionOfferId}}\",\n\"pin\":\"0000\",\n\"programId\":\"{{contentId}}\"\n}"},"url":{"raw":"{{url_USER_PURCHASES}}","host":["{{url_USER_PURCHASES}}"]},"description":null},"response":[]},{"name":"EIT-4028 - GET CONTENT/USERDATA/ENTITLEMENT","event":[{"listen":"prerequest","script":{"id":"009001da-694d-46c2-aad2-0c34fa7d0768","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","preRequestShell(function(dati, n) {","    //contentId should be a global variable","/*    var contentType = dati.scenarios[n].contentType;","    pushGlobal(\"contentType\", contentType);*/","    pushGlobal(\"optional_params\", \"\");","});"]}},{"listen":"test","script":{"id":"e96d4957-982d-4705-9192-5e7e2edebbaa","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","testShell(function(dati, i, expected) {","    setTests(\"CONTENT/USERDATA\", baseCheckResponse());","    if (getLastTests()) {","        var json = JSON.parse(responseBody);","        var assetId= json.resultObj.containers[0].entitlement.assets[0].assetId;","        pushGlobal(\"assetId\", assetId);","        var rights = json.resultObj.containers[0].entitlement.assets[0].rights;","        setTests(\"User should get rights as WATCH\", rights === expected.rights);","    }","});"]}}],"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url_CONTENT_USERDATA}}","host":["{{url_CONTENT_USERDATA}}"]},"description":null},"response":[]},{"name":"EIT-4028 - GET CONTENT/VIDEOURL","event":[{"listen":"test","script":{"id":"675ae946-9a7f-4eef-b5ea-a6d160624e1e","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","testShell(function(dati, i, expected) {","    setTests(\"CONTENT/VIDEOURL\", baseCheckResponse());","});"]}},{"listen":"prerequest","script":{"id":"0f28365a-06af-4cf2-a45e-7a6d1e02137e","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","preRequestShell(function(dati, n) {","    var scenario = dati.scenarios[n];","  /*  pushGlobal(\"locale\", scenario.locale);","    pushGlobal(\"tenant\", scenario.tenant);","    pushGlobal(\"appversion\", scenario.appversion);","    pushGlobal(\"cluster\", scenario.cluster);","    pushGlobal(\"propertyName\", scenario.propertyName);","    pushGlobal(\"contentId\", scenario.channel);*/","    //var user = scenario.userData;","    //pushGlobal(\"optional_params\", user.gps ? \"?geoZipCode=\"+user.zipCode : \"\");","});"]}}],"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url_CONTENT_VIDEOURL}}","host":["{{url_CONTENT_VIDEOURL}}"]},"description":null},"response":[]},{"name":"EIT-4028 - DELETE USER/SESSIONS","event":[{"listen":"test","script":{"type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","testShell(function(dati, i, expected) {","    setTests(\"Logout\", baseCheckResponse());","});"]}}],"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url_USER_SESSIONS}}","host":["{{url_USER_SESSIONS}}"]},"description":null},"response":[]},{"name":"EIT-4028 - Catch Exception","event":[{"listen":"test","script":{"type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","checkUpdateStep();"]}},{"listen":"prerequest","script":{"type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","prepareUpdateStep();"]}}],"request":{"method":"PUT","header":[{"key":"Authorization","value":"{{jira_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"status\": \"{{zephyr_status_step}}\",\n  \"comment\": \"{{comment}}\"\n}"},"url":{"raw":"{{url_zephyr_update_step}}","host":["{{url_zephyr_update_step}}"]},"description":null},"response":[]},{"name":"EIT-4028 - Footer","event":[{"listen":"test","script":{"type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","setIteration();"]}},{"listen":"prerequest","script":{"type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","prepareFooter();"]}}],"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"{{jira_token}}"}],"body":{"mode":"raw","raw":"{\n  \"status\": \"{{zephyr_status_tc}}\",\n  \"comment\": \"{{comment_tc}}\"\n}"},"url":{"raw":"{{url_zephyr_update_execution_status}}","host":["{{url_zephyr_update_execution_status}}"]},"description":"Footer of TC"},"response":[]}]}]}