{
	"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-3993 - End user wants to watch a transactional CUTV event - CUTV_CHANNEL 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_CHANNEL level.\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, along with CUTV_CHANNEL solution offer and Enabler associated to the same.\r\n4. EPG Ingestion with IsCatchUp enabled events.\r\n\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_CHANNEL 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_CHANNEL as he should be associated the respective enabler first\r\n6. Enabler should be associated to User\r\n7. System should show CUTV_CHANNEL subscription details to purchase\r\n8.Now User should able to purchase the transactional cutv event's CUTV_CHANNEL solution offer\r\n9. User should be able to watch the content\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_CHANNEL|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_CHANNEL_SolutionOffer_Name||CUTV_CHANNEL_SolutionOffer_Id||\r\n|1|63IT_ENabler_CommPKg|13433|322310|SOL_CUTV_CH_322310|13449|",
			"item": [
				{
					"name": "EIT-3993 - 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-3993 - 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-3993 - 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-3993 - 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-3993 - POST CRMAccountListMgmt",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "c396b599-32e4-4adc-b81d-4f4c3b21a1b4",
								"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": "3326dd61-c25b-44a6-9c1a-1280bcf2301b",
								"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-3993 - POST USER/SESSIONS",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "a0b665ba-a305-4f82-a3b5-8fc7d98e83f4",
								"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": "3e769573-6819-48bb-bb25-58a7a2660650",
								"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(\"password\", userData.password);",
									"",
									"});"
								]
							}
						}
					],
					"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-3993 - GET TRAY/EPG",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "705e5901-958e-4b42-b81a-1e8fa069109c",
								"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": "1168b3ee-eef9-40b1-b4a1-e0e9bc67cb29",
								"type": "text/javascript",
								"exec": [
									"eval(postman.getGlobalVariable(\"module:library\"));",
									"eval(postman.getGlobalVariable(\"module:script\"));",
									"",
									"preRequestShell(function(dati, n) {",
									"    var userData = dati.scenarios[n];",
									"    pushGlobal(\"filter_query\", userData.filter_query);",
									"    pushGlobal(\"channelId\", userData.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": "{{url_TRAY_EPG}}",
							"host": [
								"{{url_TRAY_EPG}}"
							]
						},
						"description": null
					},
					"response": []
				},
				{
					"name": "EIT-3993 - GET CONTENT/USERDATA",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "4cc66eb5-7ff6-4d21-8666-5de26e6d0c76",
								"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": "1adb4eea-c516-4c5f-b1a3-e69b0c276d6c",
								"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-3993 - POST USER/PURCHASES",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "22428b56-0573-4b37-85d6-b08e20aa7b7c",
								"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": "105e1d90-6e10-4788-979f-1d431feecda0",
								"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-3993 - POST UpdateCrmAccountListCommercialProfile",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "19d5aed8-9b99-4def-9109-d81f07f3c2d6",
								"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": "bbc86347-27bd-4824-8dbe-b402f5993f5c",
								"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-3993 - GET CONTENT/USERDATA 2",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "bc3733d8-2da3-4e66-b95e-4b860e9eacae",
								"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": "ab656ec8-8c73-494e-8e14-4209dbda7d9b",
								"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-3993 - POST USER/PURCHASES",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "22428b56-0573-4b37-85d6-b08e20aa7b7c",
								"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": "473a24ef-ad8f-48eb-a776-47d4537e3fb1",
								"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].CUTV_CHANNEL_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-3993 - GET CONTENT/USERDATA/ENTITLEMENT",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"id": "4bb67323-9e66-4150-99ec-259c28f31998",
								"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": "ce59cd48-5309-48ce-8bd2-a05b04dc1633",
								"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-3993 - GET CONTENT/VIDEOURL",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "763e3b6d-ddc7-414b-bf36-ad65ff2e71c4",
								"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": "13b10eb0-9e3f-41a8-8250-829dbc6688af",
								"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-3993 - 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-3993 - 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-3993 - 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": []
				}
			]
		},
		{
			"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": []
				}
			]
		},
		{
			"name": "EIT-3987 - End user wants to watch a transactional CUTV event - CUTV_EVENT 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_EVENT level.\r\n\r\n*Prerequisites*:\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 (Do not add any solution offer list inside channel ingest XML)\r\n4. EPG Ingestion with IsCatchUp enabled events, along with CUTV_EVENT solution offer and Enabler associated to the same.\r\n\r\n\r\n*Steps*:\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_EVENT 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\n**Expected Results:*\r\n*1. 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_EVENT as he should be associated the respective enabler first\r\n6. Enabler should be associated to User\r\n7. System should show CUTV_EVENT subscription details to purchase\r\n8.Now User should able to purchase the transactional cutv event's CUTV_EVENT solution offer\r\n9. User should be able to watch the content\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_EVENT|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_CHANNEL_SolutionOffer_Name||CUTV_CHANNEL_SolutionOffer_Id||\r\n|1|63IT_ENabler_CommPKg|13433|382018|will be captured at run time|will be captured at run time|",
			"item": [
				{
					"name": "EIT-3987 - 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-3987 - 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-3987 - 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-3987 - 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-3987 - POST CRMAccountListMgmt",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "9e457a38-d917-4341-9b38-5747f7613e00",
								"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": "e56325ba-9eea-4145-a66b-56cc5b6ff46c",
								"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-3987 - POST USER/SESSIONS",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "37f25e31-f3fc-40ee-ae83-24edae375ade",
								"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": "cab4215d-96cf-4f26-8c05-9d44e1424e5b",
								"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-3987 - GET TRAY/EPG",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "faca4fd5-3e67-4dcb-be0d-7199cc77be6c",
								"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": "6febe92e-c43d-448c-9cf2-09537b64a3fd",
								"type": "text/javascript",
								"exec": [
									"eval(postman.getGlobalVariable(\"module:library\"));",
									"eval(postman.getGlobalVariable(\"module:script\"));",
									"",
									"preRequestShell(function(dati, n) {",
									"    var scenario = dati.scenarios[n];",
									"        pushGlobal(\"filter_query\", scenario.filter_query);",
									"        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": "{{url_TRAY_EPG}}",
							"host": [
								"{{url_TRAY_EPG}}"
							]
						},
						"description": null
					},
					"response": []
				},
				{
					"name": "EIT-3987 - GET CONTENT/USERDATA",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "b4b2d624-5bd8-4d46-94a2-9f2429ca47a7",
								"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": "3e43f4d9-dd5a-4061-aa53-026b57ac322c",
								"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-3987 - POST USER/PURCHASES",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "c6dcc45b-1603-4d09-bf19-39ad5a404f2f",
								"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": "3d3b2ec8-6df0-4dd7-a317-9673461804b0",
								"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-3987 - POST UpdateCrmAccountListCommercialProfile",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "bfa1a094-d366-45dd-bbb2-67ab03ebf37d",
								"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": "14e8297e-1119-4354-b274-c96868b2b4df",
								"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-3987 - GET CONTENT/USERDATA 2",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "60d3ad47-9db2-42f0-9847-896fc91b49f2",
								"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": "4b637917-42b5-4c9c-b41a-93db7c84ea87",
								"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-3987 - POST USER/PURCHASES",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "c6dcc45b-1603-4d09-bf19-39ad5a404f2f",
								"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": "df3dbb93-dc2f-4ca3-8129-9f5c814863fa",
								"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].CUTV_EVENT_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-3987 - GET CONTENT/USERDATA/ENTITLEMENT",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"id": "df77645b-31c7-4687-90a6-b87e4124621c",
								"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": "f79a00ca-90b6-46d5-b1f0-8b4a71657f45",
								"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-3987 - GET CONTENT/VIDEOURL",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "c882fc08-4700-4aa8-b550-103d0158b8de",
								"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": "e4bebb4e-1491-49cf-a88b-1b86c76dfc79",
								"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-3987 - 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-3987 - 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-3987 - 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": []
				}
			]
		},
		{
			"name": "EIT-3995 - When user wants to purchases the transactional cutv event having PACKAGE, CHANNEL and EVENT level Solution offer associated",
			"description": "*Scenario*:\r\nWhen an event is associated with CUTV_EVENT, CUTV_CHANNEL and CUTV_PACKAGE level, then if user wants to watch that content, system should ask the user to purchase the CUTV_EVENT's solution offer and price info also should be based on that.\r\n\r\n*Prerequisites*:\r\n1. Created a LIVE_SUB technical package, Subscription type Commercial Package (Subscription Creation)\r\n2. Creating a channel with above LIVE_SUB technical package association along with CUTV_CHANNEL solution offer assocaited\r\n3. EPG Ingestion with IsCatchUp enabled events, along with CUTV_EVENT solution offer associated.\r\n4. CUTV_PACKAGE ingestor with above channel associating\r\n\r\n\r\n*Steps*:\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_EVENT subscription\r\n7. user watches the tranasactional cutv event\r\n\r\n**Expected Results:*\r\n*1. 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. Though PACKAGE, CHANNEL level subscriptions are associated, system should show CUTV_EVENT subscription details to purchase\r\n6.Now User should able to purchase the transactional cutv event's CUTV_EVENT solution offer\r\n7. User should be able to watch the content\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_CHANNEL|NR_42102504|NR_42102504|5.00|NoFrequency|EUR|\r\n|CUTV_EVENT|Basic eur|Basic eur|6.00|NoFrequency|EUR|\r\n|CUTV_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||SolutionOfferFor||Sol_Offer_Name||Sol_Offer_Id||\r\n|LIVE_SUB|LIVE CHANNEL_TranCUTV_All_Levels|12703|\r\n|CUTV_CHANNEL|CUTV_CHANNEL_All_Level_342018|12705|\r\n|CUTV_EVENT|will be captured at run time|will be captured at run time|\r\n|CUTV_PACKAGE|SOL_CUTV_PK_10897|12707|\r\n\r\n||ChannelId||\r\n|342018|",
			"item": [
				{
					"name": "EIT-3995 - 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-3995 - 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-3995 - 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-3995 - 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-3995 - POST CRMAccountListMgmt",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "b60fbeb9-907c-4403-9c6a-6d250800b516",
								"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": "c16a2e81-9359-4ece-a291-40949978ac47",
								"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-3995 - POST USER/SESSIONS",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "dd8711ec-003d-49b7-9ce3-f38fba58fd81",
								"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": "3d8e2e1e-36bc-4860-9c62-6c2654a207f0",
								"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-3995 - GET TRAY/EPG",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "574717a5-fc03-4c65-a90d-7b51373c4272",
								"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": "8590313b-26e1-4e78-9fbc-6b931c6305be",
								"type": "text/javascript",
								"exec": [
									"eval(postman.getGlobalVariable(\"module:library\"));",
									"eval(postman.getGlobalVariable(\"module:script\"));",
									"",
									"preRequestShell(function(dati, n) {",
									"    var scenario = dati.scenarios[n];",
									"   /* pushGlobal(\"lang\", scenario.lang);",
									"    pushGlobal(\"tenant\", scenario.tenant);",
									"    pushGlobal(\"appversion\", scenario.appversion);",
									"    pushGlobal(\"cluster\", scenario.cluster);",
									"    pushGlobal(\"propertyName\", scenario.propertyName);*/",
									"    pushGlobal(\"channelId\", scenario.channelId);",
									"     pushGlobal(\"filter_query\", scenario.filter_query);",
									"});"
								]
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "{{url_TRAY_EPG}}",
							"host": [
								"{{url_TRAY_EPG}}"
							]
						},
						"description": null
					},
					"response": []
				},
				{
					"name": "EIT-3995 - POST USER/PURCHASES",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "601b5d3a-1325-48b4-99c5-002e72eca1f3",
								"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": "865b63a2-245b-4c4a-bd89-3f97e736be66",
								"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-3995 - GET CONTENT/USERDATA",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "47e42c5d-c7e4-47ca-b353-404eaaa65a08",
								"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;",
									"        var solutionOfferType = json.resultObj.containers[0].entitlement.assets[0].commercialPackages[0].type;",
									"        pushGlobal(\"solutionOfferId\", solutionOfferId);",
									"        setTests(\"User should get rights as BUY\", rights === expected.rights);",
									"       if (getLastTests()) {",
									"           ",
									"            setTests(\"Solution offer Type should be CUTV_EVENT\", solutionOfferType === \"CUTV_EVENT\");",
									"           ",
									"       }",
									"        ",
									"    }",
									"});"
								]
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"id": "9b4400f2-d3da-4ead-bb27-5bcb0e3ab307",
								"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-3995 - POST USER/PURCHASES",
					"event": [
						{
							"listen": "test",
							"script": {
								"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": {
								"type": "text/javascript",
								"exec": [
									"eval(postman.getGlobalVariable(\"module:library\"));",
									"eval(postman.getGlobalVariable(\"module:script\"));",
									"",
									"preRequestShell(function(dati, n) {",
									"",
									"    //solutionOfferId should be a global variable",
									"});"
								]
							}
						}
					],
					"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-3995 - GET CONTENT/USERDATA/ENTITLEMENT",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"id": "4d7a5654-ff10-4471-ba91-1bb5ca145be2",
								"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": "ba417924-78ac-4948-9c61-666fea313e62",
								"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-3995 - GET CONTENT/VIDEOURL",
					"event": [
						{
							"listen": "test",
							"script": {
								"id": "2b5c4135-cfcc-4663-a4b2-3d540914a079",
								"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": "48d5a6f0-41a2-4f7b-a4f9-660dca0e49b8",
								"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-3995 - 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-3995 - 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-3995 - 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": []
				}
			]
		},
		{
			"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": []
				}
			]
		}
	]
}