Best JavaScript code snippet using best
e2e.js
Source:e2e.js
1import {2 createSpecimen,3 getGeneralInfoFromStorage,4 getParentFromStorage,5 putAnySpecimenInTube,6 putContainerInAnyQueue7} from "./functions.js";8import {createOneTubeInKit, getArrayWithTubes, getArrayWithTubesInKit} from "./tube-types.js";9import {10 getRunID,11 putIntoBloodCentrifugationQueue,12 startRunID,13 getInstructions,14 getRequiredEquipment,15 getSpecificEquipment,16 setRequiredEquipment,17 finishRunID,18 queuesInfoVerification,19 putIntoBloodProcessingQueue,20 startPoolingPlasmaRunID,21 createDestTube50Epp,22 uploadFile,23 setConsumables,24 setExpirationDate,25 finishPoolingPlasmaRunID,26 getSpecificEquipmentMicroLab,27 putIntoPlasmaQueue,28 putIntoPlasmaCentrifugationQueue,29 getInstructionsCentrifugationPlasma,30 getSpecificEquipmentWithType,31 putIntoAnyBloodProcQueue,32 putIntoAnyBloodProcQueue1,33 setDestEppTubeManualPouring,34 finishManualPouringRunID,35 uploadFileLGAliquot, setConsumablesIntoLGAliquot, setExpirationDateIntoLGAliquot, finishAnyRunID,36 uploadAnyFile, setConsumablesForManualPouring, setExpirationDateForManualPouring, finishSerumAliquotingRunID37} from "./e2e_functions.js";38const main = async () => {39 // await createSpecimen("BLOOD", "blood1");40 // const kit = await getArrayWithTubes('ALLIED_LBGARD_KIT_V1', 'BALTIMORE_AVAILABLE_CONTAINERS', 1);41 // const kit = 'PA94H7N';42 // const arrKits = await getArrayWithTubesInKit('LBGARD_TUBE', kit[0], 6);43 // const arrKits = [ 'C6SHK83', 'U97KS7S', 'PA9K59N', 'C21SX8F', 'C9X08UN', 'XUF5N62' ]44 // const runName = await getRunID('BLOOD_CENTRIFUGATION');45 // await arrKits.forEach(function (item, index) {46 // putAnySpecimenInTube(item, 100, "blood1");47 // });48 // await Promise.all(arrKits.map(async (item) => {49 // await putAnySpecimenInTube(item, 100, "blood1");50 // }));51 // ÐÐÐÐÐ!!!52 // await arrKits.forEach(function (item, index) {53 // putContainerInAnyQueue(item, 'BLOOD_CENTRIFUGATION_QUEUE');54 // });55 // await Promise.all(arrKits.map(async (item) => {56 // await putContainerInAnyQueue(item, 'BLOOD_CENTRIFUGATION_QUEUE');57 // }));58 // const runName = 'CENTRIFUGATION_BLOOD_09NOV21_58';59 // await putIntoBloodCentrifugationQueue(arrKits[0],arrKits[1],arrKits[2],arrKits[3],arrKits[4],arrKits[5], runName);60 //61 // // // step462 // await startRunID(runName);63 // //64 // // // step565 // await getInstructions(runName);66 // //67 // // // step668 // await getRequiredEquipment(runName);69 // //70 // // // step771 // const equipmentID = await getSpecificEquipment(runName);72 // const id = equipmentID[0].equipmentId;73 // //74 // // // step875 // await setRequiredEquipment(runName, id);76 // //77 // // // step978 // await finishRunID(runName);79 // // важно заÑеÑÑ80 // // "runName": "CENTRIFUGATION_BLOOD_15OCT21_4",81 // // "status": 5,82 //83 // // step10 Verify parent info for blood tubes84 // await arrKits.forEach(function (item, index) {85 // getGeneralInfoFromStorage(item);86 //87 // });88 // // console.log(id);89 // // step11 Queues info verification for all blood tubes90 // await arrKits.forEach(function (item, index) {91 // queuesInfoVerification(item);92 // });93 // // "queueCode": "POOLING_PLASMA_QUEUE",94 // // "queueName": "Pooling Plasma Queue",95 // // "status": "Ready",96 //97 // // step12 Pooling Plasma run98 let runName = await getRunID('POOLING_PLASMA');99 // const runName = 'POOLING_PLASMA_09NOV21_31';100 // // //101 // // // // step 13 Create Pooling plasma RUN with tubes from the kit102 // await putIntoPlasmaQueue(arrKits[0],arrKits[1],arrKits[2],arrKits[3],arrKits[4],arrKits[5], runName);103 // //104 // // // //в оÑвеÑе важно "runName": "POOLING_PLASMA_15OCT21_3", "status": 1,105 // // //106 // // step14 Start a Pooling plasma RUN107 // const dataFromPooling = await startPoolingPlasmaRunID(runName);108 // const context = dataFromPooling.context;109 // console.log(context);110 //111 // //step15 Create destination tube 50ML_EPPENDORF_CONICAL_TUBE for pooling112 // const tubeEpp = await createDestTube50Epp();113 // const runName = 'POOLING_PLASMA_14NOV21_3';114 const kit = 'A2CK17C';115 // // step16 Upload the following fake output file116 // await uploadFile(tubeEpp, kit, runName);117 //118 // // step17 Set consumables for the run119 // await setConsumables(runName, context);120 // //step18 Set exp date for the run121 // await setExpirationDate(runName,context);122 //123 // // step19 Get required equipment for the RUN124 // await getRequiredEquipment(runName);125 //126 // // step20 Get specific equipment for the RUN127 // const equipmentArr = await getSpecificEquipmentMicroLab(runName);128 // const equipment = equipmentArr[0].equipmentId;129 // // // console.log(equipment);130 // // //131 // // // step21 Set specific equipment for the RUN132 // await setRequiredEquipment(runName, equipment);133 //134 // //step22 Finish135 // const runData = await finishPoolingPlasmaRunID(runName);136 // console.log(runData.run.runName);137 // console.log(runData.run.status);138 //step23 Verify parent info for blood tubes139 // await arrKits.forEach(function (item, index) {140 // // ÑеÑез nld не ÑоздаеÑÑÑ "contexts": [141 // // {142 // // "context": "1f022579-ef72-4363-abb4-7f6d3a6bebf6",143 // // "category": "ACCESSIONING"144 // // }145 // getParentFromStorage(item);146 //147 // });148 //step24 Verify parent info for Plasma Destination container149 // await getParentFromStorage(tubeEpp');150 //step25 placed151 // await arrKits.forEach(function (item, index) {152 // queuesInfoVerification(item);153 // });154 // ÑÑда кладеÑÑÑ epp155 // await queuesInfoVerification(tubeEpp);156 //step26 CENTRIFUGATION PLASMA run // COULD BE CREATED BY TDG157 // const runName = await getRunID('PLASMA_CENTRIFUGATION');158 // const runName = 'CENTRIFUGATION_PLASMA_09NOV21_15';159 // const tubeEpp = '5XPC3K9';AX1XP44160 //step27161 // ÑÑда кладеÑÑÑ epp162 // await putIntoPlasmaCentrifugationQueue(tubeEpp, runName);163 //step28164 // await startRunID(runName);165 //step29166 // await getInstructionsCentrifugationPlasma(runName);167 //step30168 // const resEqPlasmaCentrifugation = await getRequiredEquipment(runName);169 // const specEq = resEqPlasmaCentrifugation[0].code;170 // const specEq = 'SORVALL_X4R';171 //step31172 // const resp = await getSpecificEquipmentWithType(runName,specEq);173 // const equipmentID = resp[0].equipmentId;174 //step32175 // await setRequiredEquipment(runName,equipmentID);176 //step33177 // await finishRunID(runName);178 //step34 MANUAL POURING PLASMA run // previous run Centrifugation Plasma COULD BE CREATED BY TDG179 // const runName = await getRunID('MANUAL_POURING');180 // const runName = 'MANUAL_POURING_09NOV21_8';181 // const tubeEpp = '3N03FXX';182 // //step35183 // // ÑÑда кладеÑÑÑ epp184 // await putIntoAnyBloodProcQueue1(tubeEpp, runName,'MANUAL_POURING_QUEUE','MANUAL_POURING');185 // //186 // // // //step36187 // const runInfo = await startRunID(runName);188 // const jsonResp = runInfo.json;189 // const context = jsonResp.context;190 // const context = '5a5e0970-8ba3-4e48-b3a5-e923adaa829b';191 // // // // runInfo.status 1192 // // // // runInfo.runName runName193 //194 // // //step37195 // const tubeEppDest = await createDestTube50Epp();196 // // // // //197 // // // // step38 Set destination tube for pouring plasma198 // await setDestEppTubeManualPouring(runName, tubeEpp, tubeEppDest);199 //200 // // //step39201 // await setConsumablesForManualPouring(runName, context);202 // // //203 // // // //step40204 // await setExpirationDateForManualPouring(runName, context);205 //206 // //step44207 // await finishManualPouringRunID(runName);208 // // step45 PLASMA_LG_ALIQUOT run209 // const runName = await getRunID('PLASMA_LG_ALIQUOT');210 // const runName = 'PLASMA_LG_ALIQUOT_09NOV21_4';211 //212 // // step46213 // const sourceTube = 'KFF0S85';214 // await putIntoAnyBloodProcQueue1(sourceTube, runName,'PLASMA_LG_ALIQUOT_QUEUE','PLASMA_LG_ALIQUOT');215 //216 // //step47217 // const runInfo = await startRunID(runName);218 // const jsonResp = runInfo.json;219 // const context = jsonResp.context;220 // // const context = '9f40f3f1-74a4-427f-9a85-8ae8518ad91c';221 // console.log(context);222 // // // runInfo.status 1223 // // // runInfo.runName runName224 //225 //226 // //step48227 // const tubeEppDest = await createDestTube50Epp();228 //229 // //step49 File230 // await uploadFileLGAliquot(sourceTube, tubeEppDest, runName);231 //232 // // step50 Get required equipment for the run233 // await getRequiredEquipment(runName);234 //235 // //step51236 // const equipmentID = await getSpecificEquipmentMicroLab(runName);237 // const id = equipmentID[0].equipmentId;238 //239 // // step52240 // await setRequiredEquipment(runName, id);241 //242 // //step53243 // await setConsumablesIntoLGAliquot(runName, context);244 //245 // //step54246 // await setExpirationDateIntoLGAliquot(runName, context);247 //248 // //step55249 // await finishAnyRunID(runName, 'plasma_large_aliquoting');250 // // step56 PLASMA_SM_ALIQUOT run251 // const runName = await getRunID('PLASMA_SM_ALIQOUT');252 // const runName = 'PLASMA_SM_ALIQUOT_09NOV21_18';253 // // console.log(runName);254 //255 // //step57256 // const sourceTube = 'KFF0S85'; // c Ñой ÑÑбой ÑÑо и ÑоÑÑ Ð´Ð»Ñ Plasma LG Aliquot257 // await putIntoAnyBloodProcQueue1(sourceTube, runName,'PLASMA_SM_ALIQOUT_QUEUE','PLASMA_SM_ALIQOUT');258 //259 // //step58260 // const runInfo = await startRunID(runName);261 // // // runInfo.status 1262 // // // runInfo.runName runName263 // //step59 File264 // const CSV = [265 // 'SourcePositionBC,VolumeTransferred,TargetRackBC,TargetPositionID,TargetPositionBC,RunDateTimeStamp,InitialSourceVolume,TargetTubeType',266 // `${sourceTube},350,AUTOTEST_TC2429_RACK_1,A1,11CHAR_PS_CODE_1,10/18/2021 13:29:31,15000,0.5mlFluidX`,267 // `${sourceTube},350,AUTOTEST_TC2429_RACK_1,A2,11CHAR_PS_CODE_2,10/18/2021 13:29:31,15000,0.5mlFluidX`,268 // `${sourceTube},350,AUTOTEST_TC2429_RACK_1,A3,11CHAR_PS_CODE_3,10/18/2021 13:29:31,15000,0.5mlFluidX`,269 // `${sourceTube},800,AUTOTEST_TC24_RACK_1,A1,11CHAR_PS_CODE_4,10/18/2021 13:29:31,15000,0.9mlFluidX`,270 // `${sourceTube},900,AUTOTEST_TC24_RACK_1,A2,11CHAR_PS_CODE_5,10/18/2021 13:29:31,15000,0.9mlFluidX`,271 // ].join('\n');272 // await uploadAnyFile(CSV,'small_aliquoting', runName);273 // // step60 Get required equipment for the run274 // await getRequiredEquipment(runName);275 // //276 // // //step61277 // const equipmentID = await getSpecificEquipmentMicroLab(runName);278 // const id = equipmentID[0].equipmentId;279 // //280 // // step62281 // await setRequiredEquipment(runName, id);282 // //step63283 // await finishAnyRunID(runName, 'plasma_small_aliquoting');284};285main();...
Magnify.js.uncompressed.js
Source:Magnify.js.uncompressed.js
1//>>built2define("dojox/charting/action2d/Magnify", ["dojo/_base/connect", "dojo/_base/declare", 3 "./PlotAction", "dojox/gfx/matrix", 4 "dojox/gfx/fx", "dojo/fx", "dojo/fx/easing"], 5 function(Hub, declare, PlotAction, m, gf, df, dfe){6 /*=====7 dojo.declare("dojox.charting.action2d.__MagnifyCtorArgs", dojox.charting.action2d.__PlotActionCtorArgs, {8 // summary:9 // Additional arguments for highlighting actions.10 11 // scale: Number?12 // The amount to magnify the given object to. Default is 2.13 scale: 214 });15 var PlotAction = dojox.charting.action2d.PlotAction;16 =====*/17 18 var DEFAULT_SCALE = 2;19 return declare("dojox.charting.action2d.Magnify", PlotAction, {20 // summary:21 // Create an action that magnifies the object the action is applied to.22 // the data description block for the widget parser23 defaultParams: {24 duration: 400, // duration of the action in ms25 easing: dfe.backOut, // easing for the action26 scale: DEFAULT_SCALE // scale of magnification27 },28 optionalParams: {}, // no optional parameters29 constructor: function(chart, plot, kwArgs){30 // summary:31 // Create the magnifying action.32 // chart: dojox.charting.Chart33 // The chart this action belongs to.34 // plot: String?35 // The plot to apply the action to. If not passed, "default" is assumed.36 // kwArgs: dojox.charting.action2d.__MagnifyCtorArgs?37 // Optional keyword arguments for this action.38 // process optional named parameters39 this.scale = kwArgs && typeof kwArgs.scale == "number" ? kwArgs.scale : DEFAULT_SCALE;40 this.connect();41 },42 process: function(o){43 // summary:44 // Process the action on the given object.45 // o: dojox.gfx.Shape46 // The object on which to process the magnifying action.47 if(!o.shape || !(o.type in this.overOutEvents) ||48 !("cx" in o) || !("cy" in o)){ return; }49 var runName = o.run.name, index = o.index, vector = [], anim, init, scale;50 if(runName in this.anim){51 anim = this.anim[runName][index];52 }else{53 this.anim[runName] = {};54 }55 if(anim){56 anim.action.stop(true);57 }else{58 this.anim[runName][index] = anim = {};59 }60 if(o.type == "onmouseover"){61 init = m.identity;62 scale = this.scale;63 }else{64 init = m.scaleAt(this.scale, o.cx, o.cy);65 scale = 1 / this.scale;66 }67 var kwArgs = {68 shape: o.shape,69 duration: this.duration,70 easing: this.easing,71 transform: [72 {name: "scaleAt", start: [1, o.cx, o.cy], end: [scale, o.cx, o.cy]},73 init74 ]75 };76 if(o.shape){77 vector.push(gf.animateTransform(kwArgs));78 }79 if(o.oultine){80 kwArgs.shape = o.outline;81 vector.push(gf.animateTransform(kwArgs));82 }83 if(o.shadow){84 kwArgs.shape = o.shadow;85 vector.push(gf.animateTransform(kwArgs));86 }87 if(!vector.length){88 delete this.anim[runName][index];89 return;90 }91 anim.action = df.combine(vector);92 if(o.type == "onmouseout"){93 Hub.connect(anim.action, "onEnd", this, function(){94 if(this.anim[runName]){95 delete this.anim[runName][index];96 }97 });98 }99 anim.action.play();100 }101 });102 ...
Magnify.js
Source:Magnify.js
1dojo.provide("dojox.charting.action2d.Magnify");2dojo.require("dojox.charting.action2d.Base");3dojo.require("dojox.gfx.matrix");4dojo.require("dojo.fx");5/*=====6dojo.declare("dojox.charting.action2d.__MagnifyCtorArgs", dojox.charting.action2d.__BaseCtorArgs, {7 // summary:8 // Additional arguments for highlighting actions.9 // scale: Number?10 // The amount to magnify the given object to. Default is 2.11 scale: 212});13=====*/14(function(){15 var DEFAULT_SCALE = 2,16 m = dojox.gfx.matrix,17 gf = dojox.gfx.fx;18 dojo.declare("dojox.charting.action2d.Magnify", dojox.charting.action2d.Base, {19 // summary:20 // Create an action that magnifies the object the action is applied to.21 // the data description block for the widget parser22 defaultParams: {23 duration: 400, // duration of the action in ms24 easing: dojo.fx.easing.backOut, // easing for the action25 scale: DEFAULT_SCALE // scale of magnification26 },27 optionalParams: {}, // no optional parameters28 constructor: function(chart, plot, kwArgs){29 // summary:30 // Create the magnifying action.31 // chart: dojox.charting.Chart2D32 // The chart this action belongs to.33 // plot: String?34 // The plot to apply the action to. If not passed, "default" is assumed.35 // kwArgs: dojox.charting.action2d.__MagnifyCtorArgs?36 // Optional keyword arguments for this action.37 // process optional named parameters38 this.scale = kwArgs && typeof kwArgs.scale == "number" ? kwArgs.scale : DEFAULT_SCALE;39 this.connect();40 },41 process: function(o){42 // summary:43 // Process the action on the given object.44 // o: dojox.gfx.Shape45 // The object on which to process the magnifying action.46 if(!o.shape || !(o.type in this.overOutEvents) ||47 !("cx" in o) || !("cy" in o)){ return; }48 var runName = o.run.name, index = o.index, vector = [], anim, init, scale;49 if(runName in this.anim){50 anim = this.anim[runName][index];51 }else{52 this.anim[runName] = {};53 }54 if(anim){55 anim.action.stop(true);56 }else{57 this.anim[runName][index] = anim = {};58 }59 if(o.type == "onmouseover"){60 init = m.identity;61 scale = this.scale;62 }else{63 init = m.scaleAt(this.scale, o.cx, o.cy);64 scale = 1 / this.scale;65 }66 var kwArgs = {67 shape: o.shape,68 duration: this.duration,69 easing: this.easing,70 transform: [71 {name: "scaleAt", start: [1, o.cx, o.cy], end: [scale, o.cx, o.cy]},72 init73 ]74 };75 if(o.shape){76 vector.push(gf.animateTransform(kwArgs));77 }78 if(o.oultine){79 kwArgs.shape = o.outline;80 vector.push(gf.animateTransform(kwArgs));81 }82 if(o.shadow){83 kwArgs.shape = o.shadow;84 vector.push(gf.animateTransform(kwArgs));85 }86 if(!vector.length){87 delete this.anim[runName][index];88 return;89 }90 anim.action = dojo.fx.combine(vector);91 if(o.type == "onmouseout"){92 dojo.connect(anim.action, "onEnd", this, function(){93 if(this.anim[runName]){94 delete this.anim[runName][index];95 }96 });97 }98 anim.action.play();99 }100 });...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!