{"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-3994 - End user wants to watch a transactional CUTV event - CUTV_PACKAGE level","description":"Scenario:\r\nAn enabler must be associated by an user to watch a transactional cutv event.\r\nSub Scenario: An enabler is associated at CUTV_PACKAGE level.\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 CUTV_CHANNEL solution offer)\r\n4. EPG Ingestion with IsCatchUp as Y(Not along with CUTV_EVENT solution offer)\r\n5. CUTV_PACKAGE ingestor 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 cutv event\r\n5. User wants to purchase that content\r\n6. User tries to purchase the CUTV_PACKAGE subscription\r\n7. Operator associates the enabler to user\r\n8. Now User tries to purchase the transactional cutv event\r\n9. user watches the tranasactional cutv event\r\n\r\nExpected Results:\r\n1. User is registered\r\n2. User should be successfully logged in\r\n3. CUTV Transactional Events should be available \r\n4. User should not able to watch transactional cutv event as he did not purchased that.\r\n5. User should not able to purchase CUTV_PACKAGE as he should be associated the respective enabler first\r\n6. Enabler should be associated to User\r\n7. System should show CUTV_PACKAGE subscription details to purchase\r\n8.Now User should able to purchase the transactional cutv event's CUTV_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|CUTV_PACKAGE|Basic eur|Basic eur|6.00|NoFrequency|EUR|\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||CUTV_PACKAGE_SolutionOffer_Name||CUTV_PACKAGE_SolutionOffer_Id||\r\n|1|63IT_ENabler_CommPKg|13433|354310|SOL_CUTV_PK_11537|13477|","item":[{"name":"EIT-3994 - 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-3994 - 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-3994 - 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-3994 - 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-3994 - POST CRMAccountListMgmt","event":[{"listen":"test","script":{"id":"e126d834-ca9b-4a61-934f-dbf0b8f25850","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":"f4f267fb-6a32-4367-947b-178f439b6cc3","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-3994 - POST USER/SESSIONS","event":[{"listen":"test","script":{"id":"fe170e17-595f-4ba9-8fe8-817526762b45","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":"602f62c3-dc79-4cdd-8c90-e9b0ef936da0","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","preRequestShell(function(dati, n) {","    var userData = dati.scenarios[n];","     //var scneario = dati.scenarios[n].nanoParams;","    var dm = getLoginDMParams();","  //pushGlobal(\"username\", getGlobal(\"USERNAME\"));","pushGlobal(\"password\", userData.password);","   /* pushGlobal(\"optional_params\", dm);","    ","    pushGlobal(\"lang\", scenario.lang);","    pushGlobal(\"tenant\", scenario.tenant);","    pushGlobal(\"appversion\", scenario.appversion);","    pushGlobal(\"cluster\", scenario.cluster);","    pushGlobal(\"propertyName\", scenario.propertyName);*/","});"]}}],"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-3994 - GET TRAY/EPG","event":[{"listen":"test","script":{"id":"2f920821-7e22-41cc-ba9c-f9fceb263f5c","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","testShell(function(dati, i, expected) {","    setTests(\"TRAY/EPG\", baseCheckResponse());","    if (getLastTests()) {","        //check hits not empty","        var json = JSON.parse(responseBody);","        var hits = json.resultObj.containers;","        setTests(\"Container filled\", !isEmptyList(hits));","        if (getLastTests()) {","            //get a channel ID","            var channelId = dati.scenarios[i].channelId;","            //var channelFound = \"TRUE\";","             //setTests(\"ChannelId present\", (isInList(channelId, hits, channelId)) === true);","             console.log(\"channel id is \"+json.resultObj.containers[0].metadata.channelId);","             console.log(\"channel id from data file \"+ channelId);","             setTests(\"ChannelId present\", ((json.resultObj.containers[0].metadata.channelId) == channelId));","        //Add further checks","        if (getLastTests())","        {","            var contentId =json.resultObj.containers[0].containers[0].metadata.contentId;","            var contentType = json.resultObj.containers[0].containers[0].metadata.contentType;","            pushGlobal(\"contentId\", contentId);","            pushGlobal(\"contentType\", contentType);","            ","        }","        }","    }","});"]}},{"listen":"prerequest","script":{"id":"271ef9e8-e7ae-48ba-84f3-2209d9de6fc8","type":"text/javascript","exec":["eval(postman.getGlobalVariable(\"module:library\"));","eval(postman.getGlobalVariable(\"module:script\"));","","preRequestShell(function(dati, n) {","    var userData = dati.scenarios[n];","    pushGlobal(\"channelId\", userData.channelId);","    pushGlobal(\"filter_query\", userData.filter_query);","    /*var scneario = dati.scenarios[n].nanoParams;","    pushGlobal(\"lang\", scenario.lang);","    pushGlobal(\"tenant\", scenario.tenant);","    pushGlobal(\"appversion\", scenario.appversion);","    pushGlobal(\"cluster\", scenario.cluster);","    pushGlobal(\"propertyName\", scenario.propertyName);","    pushGlobal(\"filter_query\", userData.filter_query);","*/    ","    ","    ","});"]}}],"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url_TRAY_EPG}}","host":["{{url_TRAY_EPG}}"]},"description":null},"response":[]},{"name":"EIT-3994 - GET CONTENT/USERDATA","event":[{"listen":"test","script":{"id":"956d16e1-80e0-4ef9-a735-26441509c963","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":"833ec7c6-d5e4-4902-a08b-48f616b1bdc4","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);*/","","});"]}}],"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url_CONTENT_USERDATA}}","host":["{{url_CONTENT_USERDATA}}"]},"description":null},"response":[]},{"name":"EIT-3994 - POST USER/PURCHASES","event":[{"listen":"test","script":{"id":"37ee3b2f-6b29-40de-a86c-7eb3942a7c80","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":"45689968-4a75-4498-b542-423cf47dd60b","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-3994 - POST UpdateCrmAccountListCommercialProfile","event":[{"listen":"test","script":{"id":"05a11c44-cc10-443a-9a3a-eaeac3aa7087","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":"705ec9a3-662c-4956-9bd5-81dd8e2a072b","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-3994 - GET CONTENT/USERDATA 2","event":[{"listen":"test","script":{"id":"e223868b-83be-46e0-ae2f-0c346c5474ab","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":"966c6d2a-d022-4135-a330-ba4a9b184eba","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-3994 - POST USER/PURCHASES","event":[{"listen":"test","script":{"id":"37ee3b2f-6b29-40de-a86c-7eb3942a7c80","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":"bc998095-8c35-471a-a885-3affba41cf75","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-3994 - GET CONTENT/USERDATA/ENTITLEMENT","event":[{"listen":"prerequest","script":{"id":"60fe237c-7eef-4a72-8096-a78ed6814e55","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":"29e84d97-c23a-425d-aed0-6be2ba148778","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-3994 - GET CONTENT/VIDEOURL","event":[{"listen":"test","script":{"id":"7c0a4720-56d1-4d2d-8d94-f448cd1568fe","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":"31797b27-ecab-4353-a27f-d4e503942957","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-3994 - 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-3994 - 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-3994 - 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":[]}]}]}