<commit_before>describe("Signature Manual Test", function() {
	
	var ENABLE9K = 9000;
	var ENABLE5K = 5000;
	var timeoutFlag = false;
	var ReadFlag = false;
	var takecallbackfired = false;
	var decodedata = '';
	
	var callbacktake = function (data){
		//takecallbackdata(JSON.stringify(data));
		takecallbackdata(data);
		takecallbackfired = true;
	}

	var callbackUri = function (data){
		//URIcallbackdata(JSON.stringify(data));
		URIcallbackdata(data);
		takecallbackfired = true;
	}

	var callbackVector = function (data){
		//vectorcallbackdata(JSON.stringify(data));
		vectorcallbackdata(data);
		takecallbackfired1 = true;
	}

	describe("Signature Test " , function() {

		beforeEach(function() {
			timeoutFlag = false;
			ReadFlag = false;
			nulldata ='';
			document.getElementById("actResult").innerHTML = "init";
			takecallbackdata(nulldata);
			URIcallbackdata(nulldata);
			vectorcallbackdata(nulldata);
			takecallbackfired = false;
			takecallbackfired1 = false;

		});

		afterEach(function() {
			//Rho.Signature.clearAllProperties();
		});

			it("VT299-001 | Call takeFullScreen with callback as function and returned status OK |", function() {

				runs(function()
				{
					setObjective("VT299-001 |Call takeFullScreen with callback as function and returned status OK|");
					setInstruction("Wait for 10 sec for Fullscreen Signature box to comeup and press capture after drawing any signature on signature area");
					setExpected("The returned status should be OK and URI of the captured signature image should be returned");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});

					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-002 | Call takeFullScreen with callback as function and returned status cancel |", function() {

				runs(function()
				{
					setObjective("VT299-001 |Call takeFullScreen with callback as function and returned status cancel |");
					setInstruction("Wait for 10 sec for Fullscreen Signature box to comeup and press cancel after drawing any signature on signature area");
					setExpected("The returned status should be cancel and no URI of the signature image should be returned");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});

					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-004 | Call takeFullScreen with callback as anonymous function |", function() {

				runs(function()
				{
					setObjective("VT299-003 |Call takeFullScreen with callback as anonymous function|");
					setInstruction("Wait for 10 sec for Fullscreen Signature box to comeup and press capture after drawing any signature on signature area");
					setExpected("The returned status should be OK and URI of the captured signature image should be returned");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({},function(data){takecallbackdata(data);takecallbackfired = true;});
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});

					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-006 | Call takeFullScreen with callback as function and minimize |", function() {

				runs(function()
				{
					setObjective("VT299-006 |Call takeFullScreen with callback as function and minimize|");
					setInstruction("Wait for 10 sec for Fullscreen Signature box to comeup and minimize appliaction after drawing any signature on signature area and then restore app after 5 sec");
					setExpected("The signature are should be visible after restore.Callback should fire with ok after pressing capture");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({},function(data){callbacktake(data);});
					setTimeout(function() {
						timeoutFlag = true;
					}, 20000);
					});

					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 21000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-007 | Call takeFullScreen with callback as function and suspend the device |", function() {

				runs(function()
				{
					setObjective("VT299-007 |Call takeFullScreen with callback as function and suspend the device|");
					setInstruction("Wait for 10 sec for Fullscreen Signature box to comeup and suspend the device after drawing any signature on signature area and then resume device after 5 sec");
					setExpected("The signature are should be visible after restore.Callback should fire with ok after pressing capture");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, 20000);
					});

					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 21000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-008 | Call capture with callback as function and returned status OK |", function() {

				runs(function()
				{
					setObjective("VT299-008 |Call capture with callback as function and returned status OK|");
					setInstruction("Wait for 10 sec for Signature box(NonFullScreen) to comeup and draw any signature on signature area and wait for");
					setExpected("The returned status should be OK and URI of the captured signature image should be returned");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.show();
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE5K);
					});
										
					waitsFor(function()
					{
						//var stat = timeoutFlag || takecallbackfired;
						return timeoutFlag;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.capture(callbacktake);
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-010 | Call capture with callback as anonymous function |", function() {

				runs(function()
				{
					setObjective("VT299-010 |Call capture with callback as anonymous function|");
					setInstruction("Wait for 10 sec for Signature box(NonFullScreen) to comeup and draw any signature on signature area and wait for");
					setExpected("The returned status should be OK and URI of the captured signature image should be returned");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.show();
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE5K);
					});
										
					waitsFor(function()
					{
						//var stat = timeoutFlag || takecallbackfired;
						return timeoutFlag;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.capture(function(data){takecallbackdata(data);});
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-011 | Call capture and press clear |", function() {

				runs(function()
				{
					setObjective("VT299-011 |Call capture with callback as anonymous function|");
					setInstruction("Wait for 10 sec for Signature box(NonFullScreen) to comeup and draw any signature on signature area and wait for claer to call");
					setExpected("The signature area should be clear after clear has been called and a clear signature image will be saved at returned URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.show();
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE5K);
					});
										
					waitsFor(function()
					{
						//var stat = timeoutFlag || takecallbackfired;
						return timeoutFlag;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.clear();
					Rho.Signature.capture(function(data){callbacktake(data);});
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-012 | Call takeFullScreen with bgColor as #0000FF(RGB), penColor as #FFFFFF00 and callback |", function() {

				runs(function()
				{
					setObjective("VT299-012 |Call takeFullScreen with bgColor as #0000FF(RGB), penColor as #FFFFFF00 and callback|");
					setInstruction("Wait for 10 sec for Signature box(FullScreen) to comeup and press capture after drawing, check the image at returned URI");
					setExpected("The signature area should be red colored fullscreen and pen color yellow, the same signature should be saved at return URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({'bgColor':'#FF0000FF','penColor':'#FFFF00'},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});
										
					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-013 | Call takeFullScreen with bgColor as #FF0000FF (ARGB), penColor as #FF00FF(RGB), penWidth as 1 and callback |", function() {

				runs(function()
				{
					setObjective("VT299-013 |Call takeFullScreen with bgColor as #FF0000FF (ARGB), penColor as #FF00FF(RGB), penWidth as 1 and callback|");
					setInstruction("Wait for 10 sec for Signature box(FullScreen) to comeup and press capture after drawing, check the image at returned URI");
					setExpected("The signature area should be blue colored fullscreen, pen color pink and thin width penline, the same signature should be saved at return URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({'bgColor':'#FFFFFF00','penColor':'#FF00FF','penWidth':1},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});
										
					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-014 | Call takeFullScreen after setting bgColor as #FF87CEEB, penColor as #FF8B0000 and penWidth as 5 |", function() {

				runs(function()
				{
					setObjective("VT299-014 |Call takeFullScreen after setting bgColor as #FF87CEEB, penColor as #FF8B0000 and penWidth as 5|");
					setInstruction("Wait for 10 sec for Signature box(FullScreen) to comeup and press capture after drawing, check the image at returned URI");
					setExpected("The signature area should be skyblue colored fullscreen, pen color darkred and thick width penline, the same signature should be saved at return URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.bgColor = '#FF87CEEB';
					Rho.Signature.penColor = '#FF8B0000';
					Rho.Signature.penWidth = 5;
					Rho.Signature.takeFullScreen({},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});
										
					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-015 | Call takeFullScreen with setting compressionFormat as jpg, fileName as TestSig and outputFormat as Image |", function() {

				runs(function()
				{
					setObjective("VT299-015 |Call takeFullScreen with setting compressionFormat as jpg, fileName as TestSig and outputFormat as Image|");
					setInstruction("Wait for 10 sec for Signature box(FullScreen) to comeup and press capture after drawing, check the image at returned URI");
					setExpected("The format of saved image should be jpg with name TestSig and Image should be saved at retrurned URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.bgColor = '#FF0000';
					Rho.Signature.penColor = '#0000FF';
					Rho.Signature.penWidth = 3;
					Rho.Signature.takeFullScreen({compressionFormat:'jpg',fileName:'TestSig',outputFormat:'image'},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});
										
					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-016 | Call takeFullScreen after setting compressionFormat as png, fileName as Sig_123 and outputFormat as Image |", function() {

				runs(function()
				{
					setObjective("VT299-016 |Call takeFullScreen after setting compressionFormat as png, fileName as Sig_123 and outputFormat as Image|");
					setInstruction("Wait for 10 sec for Signature box(FullScreen) to comeup and press capture after drawing, check the image at returned URI");
					setExpected("The format of saved image should be png with name Sig_123 and Image should be saved at retrurned URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.compressionFormat = 'png';
					Rho.Signature.fileName = 'Sig_123';
					Rho.Signature.outputFormat = 'image';
					Rho.Signature.takeFullScreen({},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});
										
					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-017 | Call takeFullScreen with compressionFormat as bmp, fileName as 12345 and outputFormat as Image |", function() {

				runs(function()
				{
					setObjective("VT299-017 |Call takeFullScreen with setting compressionFormat as bmp, fileName as 12345 and outputFormat as Image|");
					setInstruction("Wait for 10 sec for Signature box(FullScreen) to comeup and press capture after drawing, check the image at returned URI");
					setExpected("The format of saved image should be bmp with name 12345 and Image should be saved at retrurned URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({compressionFormat:'bmp',fileName:'12345',outputFormat:'image'},);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});
										
					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;<commit_msg>Signature: Fixed JS (missing callback)<commit_after>describe("Signature Manual Test", function() {
	
	var ENABLE9K = 9000;
	var ENABLE5K = 5000;
	var timeoutFlag = false;
	var ReadFlag = false;
	var takecallbackfired = false;
	var decodedata = '';
	
	var callbacktake = function (data){
		//takecallbackdata(JSON.stringify(data));
		takecallbackdata(data);
		takecallbackfired = true;
	}

	var callbackUri = function (data){
		//URIcallbackdata(JSON.stringify(data));
		URIcallbackdata(data);
		takecallbackfired = true;
	}

	var callbackVector = function (data){
		//vectorcallbackdata(JSON.stringify(data));
		vectorcallbackdata(data);
		takecallbackfired1 = true;
	}

	describe("Signature Test " , function() {

		beforeEach(function() {
			timeoutFlag = false;
			ReadFlag = false;
			nulldata ='';
			document.getElementById("actResult").innerHTML = "init";
			takecallbackdata(nulldata);
			URIcallbackdata(nulldata);
			vectorcallbackdata(nulldata);
			takecallbackfired = false;
			takecallbackfired1 = false;

		});

		afterEach(function() {
			//Rho.Signature.clearAllProperties();
		});

			it("VT299-001 | Call takeFullScreen with callback as function and returned status OK |", function() {

				runs(function()
				{
					setObjective("VT299-001 |Call takeFullScreen with callback as function and returned status OK|");
					setInstruction("Wait for 10 sec for Fullscreen Signature box to comeup and press capture after drawing any signature on signature area");
					setExpected("The returned status should be OK and URI of the captured signature image should be returned");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});

					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-002 | Call takeFullScreen with callback as function and returned status cancel |", function() {

				runs(function()
				{
					setObjective("VT299-001 |Call takeFullScreen with callback as function and returned status cancel |");
					setInstruction("Wait for 10 sec for Fullscreen Signature box to comeup and press cancel after drawing any signature on signature area");
					setExpected("The returned status should be cancel and no URI of the signature image should be returned");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});

					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-004 | Call takeFullScreen with callback as anonymous function |", function() {

				runs(function()
				{
					setObjective("VT299-003 |Call takeFullScreen with callback as anonymous function|");
					setInstruction("Wait for 10 sec for Fullscreen Signature box to comeup and press capture after drawing any signature on signature area");
					setExpected("The returned status should be OK and URI of the captured signature image should be returned");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({},function(data){takecallbackdata(data);takecallbackfired = true;});
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});

					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-006 | Call takeFullScreen with callback as function and minimize |", function() {

				runs(function()
				{
					setObjective("VT299-006 |Call takeFullScreen with callback as function and minimize|");
					setInstruction("Wait for 10 sec for Fullscreen Signature box to comeup and minimize appliaction after drawing any signature on signature area and then restore app after 5 sec");
					setExpected("The signature are should be visible after restore.Callback should fire with ok after pressing capture");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({},function(data){callbacktake(data);});
					setTimeout(function() {
						timeoutFlag = true;
					}, 20000);
					});

					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 21000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-007 | Call takeFullScreen with callback as function and suspend the device |", function() {

				runs(function()
				{
					setObjective("VT299-007 |Call takeFullScreen with callback as function and suspend the device|");
					setInstruction("Wait for 10 sec for Fullscreen Signature box to comeup and suspend the device after drawing any signature on signature area and then resume device after 5 sec");
					setExpected("The signature are should be visible after restore.Callback should fire with ok after pressing capture");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, 20000);
					});

					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 21000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-008 | Call capture with callback as function and returned status OK |", function() {

				runs(function()
				{
					setObjective("VT299-008 |Call capture with callback as function and returned status OK|");
					setInstruction("Wait for 10 sec for Signature box(NonFullScreen) to comeup and draw any signature on signature area and wait for");
					setExpected("The returned status should be OK and URI of the captured signature image should be returned");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.show();
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE5K);
					});
										
					waitsFor(function()
					{
						//var stat = timeoutFlag || takecallbackfired;
						return timeoutFlag;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.capture(callbacktake);
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-010 | Call capture with callback as anonymous function |", function() {

				runs(function()
				{
					setObjective("VT299-010 |Call capture with callback as anonymous function|");
					setInstruction("Wait for 10 sec for Signature box(NonFullScreen) to comeup and draw any signature on signature area and wait for");
					setExpected("The returned status should be OK and URI of the captured signature image should be returned");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.show();
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE5K);
					});
										
					waitsFor(function()
					{
						//var stat = timeoutFlag || takecallbackfired;
						return timeoutFlag;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.capture(function(data){takecallbackdata(data);});
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-011 | Call capture and press clear |", function() {

				runs(function()
				{
					setObjective("VT299-011 |Call capture with callback as anonymous function|");
					setInstruction("Wait for 10 sec for Signature box(NonFullScreen) to comeup and draw any signature on signature area and wait for claer to call");
					setExpected("The signature area should be clear after clear has been called and a clear signature image will be saved at returned URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.show();
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE5K);
					});
										
					waitsFor(function()
					{
						//var stat = timeoutFlag || takecallbackfired;
						return timeoutFlag;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.clear();
					Rho.Signature.capture(function(data){callbacktake(data);});
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-012 | Call takeFullScreen with bgColor as #0000FF(RGB), penColor as #FFFFFF00 and callback |", function() {

				runs(function()
				{
					setObjective("VT299-012 |Call takeFullScreen with bgColor as #0000FF(RGB), penColor as #FFFFFF00 and callback|");
					setInstruction("Wait for 10 sec for Signature box(FullScreen) to comeup and press capture after drawing, check the image at returned URI");
					setExpected("The signature area should be red colored fullscreen and pen color yellow, the same signature should be saved at return URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({'bgColor':'#FF0000FF','penColor':'#FFFF00'},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});
										
					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-013 | Call takeFullScreen with bgColor as #FF0000FF (ARGB), penColor as #FF00FF(RGB), penWidth as 1 and callback |", function() {

				runs(function()
				{
					setObjective("VT299-013 |Call takeFullScreen with bgColor as #FF0000FF (ARGB), penColor as #FF00FF(RGB), penWidth as 1 and callback|");
					setInstruction("Wait for 10 sec for Signature box(FullScreen) to comeup and press capture after drawing, check the image at returned URI");
					setExpected("The signature area should be blue colored fullscreen, pen color pink and thin width penline, the same signature should be saved at return URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({'bgColor':'#FFFFFF00','penColor':'#FF00FF','penWidth':1},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});
										
					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-014 | Call takeFullScreen after setting bgColor as #FF87CEEB, penColor as #FF8B0000 and penWidth as 5 |", function() {

				runs(function()
				{
					setObjective("VT299-014 |Call takeFullScreen after setting bgColor as #FF87CEEB, penColor as #FF8B0000 and penWidth as 5|");
					setInstruction("Wait for 10 sec for Signature box(FullScreen) to comeup and press capture after drawing, check the image at returned URI");
					setExpected("The signature area should be skyblue colored fullscreen, pen color darkred and thick width penline, the same signature should be saved at return URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.bgColor = '#FF87CEEB';
					Rho.Signature.penColor = '#FF8B0000';
					Rho.Signature.penWidth = 5;
					Rho.Signature.takeFullScreen({},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});
										
					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-015 | Call takeFullScreen with setting compressionFormat as jpg, fileName as TestSig and outputFormat as Image |", function() {

				runs(function()
				{
					setObjective("VT299-015 |Call takeFullScreen with setting compressionFormat as jpg, fileName as TestSig and outputFormat as Image|");
					setInstruction("Wait for 10 sec for Signature box(FullScreen) to comeup and press capture after drawing, check the image at returned URI");
					setExpected("The format of saved image should be jpg with name TestSig and Image should be saved at retrurned URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.bgColor = '#FF0000';
					Rho.Signature.penColor = '#0000FF';
					Rho.Signature.penWidth = 3;
					Rho.Signature.takeFullScreen({compressionFormat:'jpg',fileName:'TestSig',outputFormat:'image'},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});
										
					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-016 | Call takeFullScreen after setting compressionFormat as png, fileName as Sig_123 and outputFormat as Image |", function() {

				runs(function()
				{
					setObjective("VT299-016 |Call takeFullScreen after setting compressionFormat as png, fileName as Sig_123 and outputFormat as Image|");
					setInstruction("Wait for 10 sec for Signature box(FullScreen) to comeup and press capture after drawing, check the image at returned URI");
					setExpected("The format of saved image should be png with name Sig_123 and Image should be saved at retrurned URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.compressionFormat = 'png';
					Rho.Signature.fileName = 'Sig_123';
					Rho.Signature.outputFormat = 'image';
					Rho.Signature.takeFullScreen({},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});
										
					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
						return stat;
					}, 'wait to callback to fire or timeout', 10000);
				});

				runs(function()
				{
					Rho.Signature.hide();
					waitsFor(function() {
					return document.getElementById("actResult").innerHTML != "init";
					}, "Timed out waiting for tester to respond", 300000);
					runs(function() {
					expect("pass").toEqual(document.getElementById("actResult").innerHTML);
					});
				});
			});

			it("VT299-017 | Call takeFullScreen with compressionFormat as bmp, fileName as 12345 and outputFormat as Image |", function() {

				runs(function()
				{
					setObjective("VT299-017 |Call takeFullScreen with setting compressionFormat as bmp, fileName as 12345 and outputFormat as Image|");
					setInstruction("Wait for 10 sec for Signature box(FullScreen) to comeup and press capture after drawing, check the image at returned URI");
					setExpected("The format of saved image should be bmp with name 12345 and Image should be saved at retrurned URI");
					setTimeout(function() {
						ReadFlag = true;
					}, ENABLE9K);
				});

				runs(function()
				{									
					waitsFor(function()
					{
						return ReadFlag;
					}, 'wait to callback to fire or timeout', 10000);

					runs(function() {
					Rho.Signature.takeFullScreen({compressionFormat:'bmp',fileName:'12345',outputFormat:'image'},callbacktake);
					setTimeout(function() {
						timeoutFlag = true;
					}, ENABLE9K);
					});
										
					waitsFor(function()
					{
						var stat = timeoutFlag || takecallbackfired;
{'fraction_non_alphanumeric': 0.12053017352410837, 'fraction_numerical': 0.0262745006205653, 'mean_word_length': 2.996630790828264, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5219914', 'n_tokens_mistral': 17425, 'n_tokens_neox': 11849, 'n_words': 3427}