@copart/tx-title-submission
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,1 +0,29 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var loginCredentials=exports.loginCredentials={USERNAME:"",PASSWORD:"",LICENSENO:""},steps=exports.steps={PRE_LOGIN:-1,LOGIN:0,NEW_APPLICATION:1,NEW_APPLICATION_CONFIRM:2,VEHICLE_INFO:3,LIENHOLDER_INFO:4,PREVIOUS_OWNER_INFO:5,APPLICANT_INFO:6,SUPPORTING_DOCUMENTS_ONE:7,SUPPORTING_DOCUMENTS_TWO:8},SITE_URL=exports.SITE_URL="https://webdealer.txdmv.gov/title/salvageLogin.do",NEW_APPLICATION_URL=exports.NEW_APPLICATION_URL="https://webdealer.txdmv.gov/title/newTitleApplication.do#!"; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.NEW_APPLICATION_URL = exports.SITE_URL = exports.steps = exports.loginCredentials = void 0; | ||
var loginCredentials = { | ||
USERNAME: "", | ||
PASSWORD: "", | ||
LICENSENO: "" | ||
}; | ||
exports.loginCredentials = loginCredentials; | ||
var steps = { | ||
PRE_LOGIN: -1, | ||
LOGIN: 0, | ||
NEW_APPLICATION: 1, | ||
NEW_APPLICATION_CONFIRM: 2, | ||
VEHICLE_INFO: 3, | ||
LIENHOLDER_INFO: 4, | ||
PREVIOUS_OWNER_INFO: 5, | ||
APPLICANT_INFO: 6, | ||
SUPPORTING_DOCUMENTS_ONE: 7, | ||
SUPPORTING_DOCUMENTS_TWO: 8 | ||
}; | ||
exports.steps = steps; | ||
var SITE_URL = "https://webdealer.txdmv.gov/title/salvageLogin.do"; | ||
exports.SITE_URL = SITE_URL; | ||
var NEW_APPLICATION_URL = "https://webdealer.txdmv.gov/title/newTitleApplication.do#!"; | ||
exports.NEW_APPLICATION_URL = NEW_APPLICATION_URL; |
@@ -1,1 +0,522 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _config=require("./config");exports.default=[{name:"securityWarning",htmlSelector:"#acceptBtn",type:"button",step:_config.steps.PRE_LOGIN},{name:"login",htmlSelector:"#SDL > form > div:nth-child(4) > span.bodyText.top > input.loginButton",type:"button",step:_config.steps.LOGIN},{name:"titleSearch",htmlSelector:"#search",type:"button",step:_config.steps.NEW_APPLICATION},{name:"applicationProceed",htmlSelector:"#proceed",type:"button",step:_config.steps.NEW_APPLICATION_CONFIRM},{name:"vehicleInfoSubmit",htmlSelector:"#saveBtn",type:"button",step:_config.steps.VEHICLE_INFO},{name:"lienSubmit",htmlSelector:"#LienHolderForm > div:nth-child(4) > input",type:"button",step:_config.steps.LIENHOLDER_INFO},{name:"prevOwnerSubmit",htmlSelector:"#previousOwnerForm > div:nth-child(5) > input",type:"button",step:_config.steps.PREVIOUS_OWNER_INFO},{name:"applicantSubmit",htmlSelector:"#saveBtn",type:"button",step:_config.steps.APPLICANT_INFO},{name:"saveDocumentType",htmlSelector:"#saveBtnOE",type:"button",step:_config.steps.SUPPORTING_DOCUMENTS_ONE},{name:"addDocument",htmlSelector:"#addBtn",type:"button",step:_config.steps.SUPPORTING_DOCUMENTS_TWO},{name:"VIN",htmlSelector:"#searchValue",servicePath:[""],step:_config.steps.NEW_APPLICATION,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"titleType",htmlSelector:"#titleType_S",servicePath:[""],step:_config.steps.NEW_APPLICATION,options:[],required:!0,editable:!0,type:"input",inputType:"radio",defaultValue:!0,regEx:""},{name:"username",htmlSelector:"#salvUserId",servicePath:[""],step:_config.steps.LOGIN,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:_config.loginCredentials.USERNAME,regEx:""},{name:"password",htmlSelector:"#salvPassword",servicePath:[""],step:_config.steps.LOGIN,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:_config.loginCredentials.PASSWORD,regEx:""},{name:"licenseNo",htmlSelector:"#salvLicenseNo",servicePath:[""],step:_config.steps.LOGIN,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:_config.loginCredentials.LICENSENO,regEx:""},{name:"lotId",htmlSelector:"#titleDealNo",servicePath:[""],step:_config.steps.VEHICLE_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"vehicleMake",htmlSelector:"",servicePath:[""],step:_config.steps.VEHICLE_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"vehicleYear",htmlSelector:"",servicePath:[""],step:_config.steps.VEHICLE_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"vehicleModel",htmlSelector:"#vehModel",servicePath:[""],step:_config.steps.VEHICLE_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"bodyStyle",htmlSelector:"#bodyStyle",servicePath:[""],step:_config.steps.VEHICLE_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"select",defaultValue:"",regEx:""},{name:"majorColor",htmlSelector:"#majorColor",servicePath:[""],step:_config.steps.VEHICLE_INFO,options:[],required:!1,editable:!0,type:"input",inputType:"select",defaultValue:"",regEx:""},{name:"minorColor",htmlSelector:"#minorColor",servicePath:[""],step:_config.steps.VEHICLE_INFO,options:[],required:!1,editable:!0,type:"input",inputType:"select",defaultValue:"",regEx:""},{name:"dotProofRequired",htmlSelector:"#dotProofRqd",servicePath:[""],step:_config.steps.VEHICLE_INFO,options:[],required:!1,editable:!0,type:"input",inputType:"checkbox",defaultValue:"",regEx:""},{name:"manufactureBuyBack",htmlSelector:"#manufacturerBuyBack",servicePath:[""],step:_config.steps.VEHICLE_INFO,options:[],required:!1,editable:!0,type:"input",inputType:"checkbox",defaultValue:"",regEx:""},{name:"floodDamage",htmlSelector:"#floodDamage",servicePath:[""],step:_config.steps.VEHICLE_INFO,options:[],required:!1,editable:!0,type:"input",inputType:"checkbox",defaultValue:"",regEx:""},{name:"certifyStatement",htmlSelector:"#certifyStatement",servicePath:[""],step:_config.steps.VEHICLE_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"checkbox",defaultValue:!0,regEx:""},{name:"noLien",htmlSelector:"#lienStatus_1",servicePath:[""],step:_config.steps.LIENHOLDER_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"radio",defaultValue:"",regEx:""},{name:"recordLien",htmlSelector:"",servicePath:[""],step:_config.steps.LIENHOLDER_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"radio",defaultValue:"",regEx:""},{name:"ownerName",htmlSelector:"#prevOwnerSection > div:nth-child(1) > span:nth-child(2) > input",servicePath:[""],step:_config.steps.PREVIOUS_OWNER_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"ownerCity",htmlSelector:"#previousOwnerCity",servicePath:[""],step:_config.steps.PREVIOUS_OWNER_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"ownerState",htmlSelector:"#previousOwnerState",servicePath:[""],step:_config.steps.PREVIOUS_OWNER_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantName",htmlSelector:"#applAddr > div:nth-child(2) > span:nth-child(2) > input",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantAddressLine1",htmlSelector:"#street1",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantAddressLine2",htmlSelector:"#applAddr > div:nth-child(3) > span.bodyText.top > span > input",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantCity",htmlSelector:"#city",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantState",htmlSelector:"#ownerState",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantZip",htmlSelector:"#zipCode",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantZip2",htmlSelector:"#zipCodeP4",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantMailingName",htmlSelector:"",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantMailingAddressLine1",htmlSelector:"#mailStreet",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantMailingAddressLine2",htmlSelector:"#mailAddr > div:nth-child(2) > span.bodyText.top > span > input",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantMailingCity",htmlSelector:"#mailCity",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantMailingState",htmlSelector:"#mailState",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantMailingZip",htmlSelector:"#mailZip",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"applicantMailingZip2",htmlSelector:"#mailZipP4",servicePath:[""],step:_config.steps.APPLICANT_INFO,options:[],required:!0,editable:!0,type:"input",inputType:"text",defaultValue:"",regEx:""},{name:"documentType",htmlSelector:"#oeDocType",servicePath:[""],step:_config.steps.SUPPORTING_DOCUMENTS_ONE,options:[],required:!0,editable:!0,type:"input",inputType:"select",defaultValue:1,regEx:""},{name:"uploadDocumentType",htmlSelector:"#uploadDocType",servicePath:[""],step:_config.steps.SUPPORTING_DOCUMENTS_TWO,options:[],required:!0,editable:!0,type:"input",inputType:"select",defaultValue:"ALL",regEx:""},{name:"uploadDocument",htmlSelector:"#docs",servicePath:[""],step:_config.steps.SUPPORTING_DOCUMENTS_TWO,options:[],required:!0,editable:!0,type:"input",inputType:"file",defaultValue:"",regEx:""},{name:"errorBlock",htmlSelector:"#messages > div",type:"error"}],module.exports=exports["default"]; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _config = require("./config"); | ||
var _default = [{ | ||
name: "securityWarning", | ||
htmlSelector: "#acceptBtn", | ||
type: "button", | ||
step: _config.steps.PRE_LOGIN | ||
}, { | ||
name: "login", | ||
htmlSelector: "#SDL > form > div:nth-child(4) > span.bodyText.top > input.loginButton", | ||
type: "button", | ||
step: _config.steps.LOGIN | ||
}, { | ||
name: "titleSearch", | ||
htmlSelector: "#search", | ||
type: "button", | ||
step: _config.steps.NEW_APPLICATION | ||
}, { | ||
name: "applicationProceed", | ||
htmlSelector: "#proceed", | ||
type: "button", | ||
step: _config.steps.NEW_APPLICATION_CONFIRM | ||
}, { | ||
name: "vehicleInfoSubmit", | ||
htmlSelector: "#saveBtn", | ||
type: "button", | ||
step: _config.steps.VEHICLE_INFO | ||
}, { | ||
name: "lienSubmit", | ||
htmlSelector: "#LienHolderForm > div:nth-child(4) > input", | ||
type: "button", | ||
step: _config.steps.LIENHOLDER_INFO | ||
}, { | ||
name: "prevOwnerSubmit", | ||
htmlSelector: "#previousOwnerForm > div:nth-child(5) > input", | ||
type: "button", | ||
step: _config.steps.PREVIOUS_OWNER_INFO | ||
}, { | ||
name: "applicantSubmit", | ||
htmlSelector: "#saveBtn", | ||
type: "button", | ||
step: _config.steps.APPLICANT_INFO | ||
}, { | ||
name: "saveDocumentType", | ||
htmlSelector: "#saveBtnOE", | ||
type: "button", | ||
step: _config.steps.SUPPORTING_DOCUMENTS_ONE | ||
}, { | ||
name: "addDocument", | ||
htmlSelector: "#addBtn", | ||
type: "button", | ||
step: _config.steps.SUPPORTING_DOCUMENTS_TWO | ||
}, { | ||
name: "VIN", | ||
htmlSelector: "#searchValue", | ||
servicePath: [''], | ||
step: _config.steps.NEW_APPLICATION, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "titleType", | ||
htmlSelector: "#titleType_S", | ||
servicePath: [''], | ||
step: _config.steps.NEW_APPLICATION, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "radio", | ||
defaultValue: true, | ||
regEx: "" | ||
}, { | ||
name: "username", | ||
htmlSelector: "#salvUserId", | ||
servicePath: [''], | ||
step: _config.steps.LOGIN, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: _config.loginCredentials.USERNAME, | ||
regEx: "" | ||
}, { | ||
name: "password", | ||
htmlSelector: "#salvPassword", | ||
servicePath: [''], | ||
step: _config.steps.LOGIN, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: _config.loginCredentials.PASSWORD, | ||
regEx: "" | ||
}, { | ||
name: "licenseNo", | ||
htmlSelector: "#salvLicenseNo", | ||
servicePath: [''], | ||
step: _config.steps.LOGIN, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: _config.loginCredentials.LICENSENO, | ||
regEx: "" | ||
}, { | ||
name: "lotId", | ||
htmlSelector: "#titleDealNo", | ||
servicePath: [''], | ||
step: _config.steps.VEHICLE_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "vehicleMake", | ||
htmlSelector: "", | ||
servicePath: [''], | ||
step: _config.steps.VEHICLE_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "vehicleYear", | ||
htmlSelector: "", | ||
servicePath: [''], | ||
step: _config.steps.VEHICLE_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "vehicleModel", | ||
htmlSelector: "#vehModel", | ||
servicePath: [''], | ||
step: _config.steps.VEHICLE_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "bodyStyle", | ||
htmlSelector: "#bodyStyle", | ||
servicePath: [''], | ||
step: _config.steps.VEHICLE_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "select", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "majorColor", | ||
htmlSelector: "#majorColor", | ||
servicePath: [''], | ||
step: _config.steps.VEHICLE_INFO, | ||
options: [], | ||
required: false, | ||
editable: true, | ||
type: "input", | ||
inputType: "select", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "minorColor", | ||
htmlSelector: "#minorColor", | ||
servicePath: [''], | ||
step: _config.steps.VEHICLE_INFO, | ||
options: [], | ||
required: false, | ||
editable: true, | ||
type: "input", | ||
inputType: "select", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "dotProofRequired", | ||
htmlSelector: "#dotProofRqd", | ||
servicePath: [''], | ||
step: _config.steps.VEHICLE_INFO, | ||
options: [], | ||
required: false, | ||
editable: true, | ||
type: "input", | ||
inputType: "checkbox", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "manufactureBuyBack", | ||
htmlSelector: "#manufacturerBuyBack", | ||
servicePath: [''], | ||
step: _config.steps.VEHICLE_INFO, | ||
options: [], | ||
required: false, | ||
editable: true, | ||
type: "input", | ||
inputType: "checkbox", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "floodDamage", | ||
htmlSelector: "#floodDamage", | ||
servicePath: [''], | ||
step: _config.steps.VEHICLE_INFO, | ||
options: [], | ||
required: false, | ||
editable: true, | ||
type: "input", | ||
inputType: "checkbox", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "certifyStatement", | ||
htmlSelector: "#certifyStatement", | ||
servicePath: [''], | ||
step: _config.steps.VEHICLE_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "checkbox", | ||
defaultValue: true, | ||
regEx: "" | ||
}, //////TODO Odometer////// | ||
{ | ||
name: "noLien", | ||
htmlSelector: "#lienStatus_1", | ||
servicePath: [''], | ||
step: _config.steps.LIENHOLDER_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "radio", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "recordLien", | ||
htmlSelector: "", | ||
servicePath: [''], | ||
step: _config.steps.LIENHOLDER_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "radio", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "ownerName", | ||
htmlSelector: "#prevOwnerSection > div:nth-child(1) > span:nth-child(2) > input", | ||
servicePath: [''], | ||
step: _config.steps.PREVIOUS_OWNER_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "ownerCity", | ||
htmlSelector: "#previousOwnerCity", | ||
servicePath: [''], | ||
step: _config.steps.PREVIOUS_OWNER_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "ownerState", | ||
htmlSelector: "#previousOwnerState", | ||
servicePath: [''], | ||
step: _config.steps.PREVIOUS_OWNER_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantName", | ||
htmlSelector: "#applAddr > div:nth-child(2) > span:nth-child(2) > input", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantAddressLine1", | ||
htmlSelector: "#street1", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantAddressLine2", | ||
htmlSelector: "#applAddr > div:nth-child(3) > span.bodyText.top > span > input", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantCity", | ||
htmlSelector: "#city", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantState", | ||
htmlSelector: "#ownerState", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantZip", | ||
htmlSelector: "#zipCode", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantZip2", | ||
htmlSelector: "#zipCodeP4", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantMailingName", | ||
htmlSelector: "", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantMailingAddressLine1", | ||
htmlSelector: "#mailStreet", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantMailingAddressLine2", | ||
htmlSelector: "#mailAddr > div:nth-child(2) > span.bodyText.top > span > input", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantMailingCity", | ||
htmlSelector: "#mailCity", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantMailingState", | ||
htmlSelector: "#mailState", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantMailingZip", | ||
htmlSelector: "#mailZip", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "applicantMailingZip2", | ||
htmlSelector: "#mailZipP4", | ||
servicePath: [''], | ||
step: _config.steps.APPLICANT_INFO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "text", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "documentType", | ||
htmlSelector: "#oeDocType", | ||
servicePath: [''], | ||
step: _config.steps.SUPPORTING_DOCUMENTS_ONE, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "select", | ||
defaultValue: 1, | ||
regEx: "" | ||
}, { | ||
name: "uploadDocumentType", | ||
htmlSelector: "#uploadDocType", | ||
servicePath: [''], | ||
step: _config.steps.SUPPORTING_DOCUMENTS_TWO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "select", | ||
defaultValue: "ALL", | ||
regEx: "" | ||
}, { | ||
name: "uploadDocument", | ||
htmlSelector: "#docs", | ||
servicePath: [''], | ||
step: _config.steps.SUPPORTING_DOCUMENTS_TWO, | ||
options: [], | ||
required: true, | ||
editable: true, | ||
type: "input", | ||
inputType: "file", | ||
defaultValue: "", | ||
regEx: "" | ||
}, { | ||
name: "errorBlock", | ||
htmlSelector: "#messages > div", | ||
type: "error" | ||
}]; | ||
exports.default = _default; |
329
lib/index.js
@@ -1,1 +0,328 @@ | ||
"use strict";var _regenerator=require("babel-runtime/regenerator"),_regenerator2=_interopRequireDefault(_regenerator),_asyncToGenerator2=require("babel-runtime/helpers/asyncToGenerator"),_asyncToGenerator3=_interopRequireDefault(_asyncToGenerator2),_puppeteer=require("./utilities/puppeteer"),_misc=require("./utilities/misc"),_config=require("./config"),_fieldsStructure=require("./fieldsStructure"),_fieldsStructure2=_interopRequireDefault(_fieldsStructure),_ramda=require("ramda");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}require("babel-core/register"),require("babel-polyfill"),module.exports=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b,c){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(a.prev=0,!((0,_ramda.isEmpty)(b)||(0,_ramda.isNil)(b))){a.next=3;break}throw"No data to submit!";case 3:return a.next=5,browserSubmission(b,c);case 5:a.next=10;break;case 7:throw a.prev=7,a.t0=a["catch"](0),a.t0;case 10:case"end":return a.stop();}},a,this,[[0,7]])}));return function(){return a.apply(this,arguments)}}();function to(a){return a.then(function(a){return[null,a]}).catch(function(a){return[a]})}var browserSubmission=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b){var c,d,e,f,g,h,i,j,k,l,m,n;return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,_puppeteer.browserLaunch)();case 2:return c=a.sent,d=c.browser,e=c.page,a.prev=5,a.next=8,e.goto(_config.SITE_URL);case 8:return console.log("Prelogin for lotid>>",b.lotId),a.next=11,e.keyboard.press("Enter");case 11:return console.log("LOGIN"),a.next=14,e.screenshot({path:"screenshots/"+b.lotId+"_1LOGIN.png"});case 14:return f=(0,_misc.getStepButton)(_fieldsStructure2.default,_config.steps.LOGIN),a.next=17,e.waitForSelector(f.htmlSelector);case 17:return a.next=19,(0,_puppeteer.feedAllStepFields)(e,_fieldsStructure2.default,_config.steps.LOGIN,b);case 19:return a.next=21,(0,_puppeteer.clickButton)(e,f.htmlSelector);case 21:return console.log("NEW_APPLICATION_URL"),a.next=24,e.goto(_config.NEW_APPLICATION_URL);case 24:return console.log("NEW_APPLICATION"),a.next=27,e.screenshot({path:"screenshots/"+b.lotId+"_2NEW_APPLICATION.png"});case 27:return g=(0,_misc.getStepButton)(_fieldsStructure2.default,_config.steps.NEW_APPLICATION),a.next=30,e.waitForSelector(g.htmlSelector);case 30:return a.next=32,(0,_puppeteer.feedAllStepFields)(e,_fieldsStructure2.default,_config.steps.NEW_APPLICATION,b);case 32:return a.next=34,(0,_puppeteer.clickButton)(e,g.htmlSelector).catch(function(a){throw a});case 34:return console.log("NEW_APPLICATION_CONFIRM"),a.next=37,e.screenshot({path:"screenshots/"+b.lotId+"_3NEW_APPLICATION_CONFIRM.png"});case 37:return h=(0,_misc.getStepButton)(_fieldsStructure2.default,_config.steps.NEW_APPLICATION_CONFIRM),a.next=40,e.waitForSelector(h.htmlSelector);case 40:return a.next=42,(0,_puppeteer.clickButton)(e,h.htmlSelector);case 42:return console.log("VEHICLE_INFO Information"),a.next=45,e.screenshot({path:"screenshots/"+b.lotId+"_4VEHICLE_INFO.png"});case 45:return i=(0,_misc.getStepButton)(_fieldsStructure2.default,_config.steps.VEHICLE_INFO),a.next=48,e.waitForSelector(i.htmlSelector);case 48:return a.next=50,(0,_puppeteer.feedAllStepFields)(e,_fieldsStructure2.default,_config.steps.VEHICLE_INFO,b);case 50:return a.next=52,(0,_puppeteer.clickButton)(e,i.htmlSelector);case 52:return console.log("LIENHOLDER_INFO Information"),a.next=55,e.screenshot({path:"screenshots/"+b.lotId+"_5LIENHOLDER_INFO.png"});case 55:return j=(0,_misc.getStepButton)(_fieldsStructure2.default,_config.steps.LIENHOLDER_INFO),a.next=58,e.waitForSelector(j.htmlSelector);case 58:return a.next=60,(0,_puppeteer.feedAllStepFields)(e,_fieldsStructure2.default,_config.steps.LIENHOLDER_INFO,b);case 60:return a.next=62,(0,_puppeteer.clickButton)(e,j.htmlSelector);case 62:return console.log("PREVIOUS_OWNER_INFO Information"),a.next=65,e.screenshot({path:"screenshots/"+b.lotId+"_6PREVIOUS_OWNER_INFO.png"});case 65:return k=(0,_misc.getStepButton)(_fieldsStructure2.default,_config.steps.PREVIOUS_OWNER_INFO),a.next=68,e.waitForSelector(k.htmlSelector);case 68:return a.next=70,(0,_puppeteer.feedAllStepFields)(e,_fieldsStructure2.default,_config.steps.PREVIOUS_OWNER_INFO,b);case 70:return a.next=72,(0,_puppeteer.clickButton)(e,k.htmlSelector);case 72:return console.log("APPLICANT_INFO Information"),a.next=75,e.screenshot({path:"screenshots/"+b.lotId+"_7APPLICANT_INFO.png"});case 75:return l=(0,_misc.getStepButton)(_fieldsStructure2.default,_config.steps.APPLICANT_INFO),a.next=78,e.waitForSelector(l.htmlSelector);case 78:return a.next=80,(0,_puppeteer.feedAllStepFields)(e,_fieldsStructure2.default,_config.steps.APPLICANT_INFO,b);case 80:return a.next=82,(0,_puppeteer.clickButton)(e,l.htmlSelector);case 82:return console.log("SUPPORTING_DOCUMENTS_ONE Information"),a.next=85,e.screenshot({path:"screenshots/"+b.lotId+"_8SUPPORTING_DOCUMENTS_ONE.png"});case 85:return m=(0,_misc.getStepButton)(_fieldsStructure2.default,_config.steps.SUPPORTING_DOCUMENTS_ONE),a.next=88,e.waitForSelector(m.htmlSelector);case 88:return a.next=90,(0,_puppeteer.feedAllStepFields)(e,_fieldsStructure2.default,_config.steps.SUPPORTING_DOCUMENTS_ONE,b);case 90:return a.next=92,(0,_puppeteer.clickButton)(e,m.htmlSelector);case 92:return console.log("SUPPORTING_DOCUMENTS_TWO Information"),a.next=95,e.screenshot({path:"screenshots/"+b.lotId+"_9SUPPORTING_DOCUMENTS_TWO.png"});case 95:return n=(0,_misc.getStepButton)(_fieldsStructure2.default,_config.steps.SUPPORTING_DOCUMENTS_TWO),a.next=98,e.waitForSelector(n.htmlSelector);case 98:return a.next=100,(0,_puppeteer.feedAllStepFields)(e,_fieldsStructure2.default,_config.steps.SUPPORTING_DOCUMENTS_TWO,b);case 100:return a.next=102,e.screenshot({path:"screenshots/"+b.lotId+"_90SUPPORTING_DOCUMENTS_TWO.png"});case 102:return a.next=104,(0,_puppeteer.clickButton)(e,n.htmlSelector);case 104:return a.next=106,e.screenshot({path:"screenshots/"+b.lotId+"_91SUPPORTING_DOCUMENTS_TWO.png"});case 106:return a.next=108,d.close();case 108:a.next=115;break;case 110:return a.prev=110,a.t0=a["catch"](5),a.next=114,d.close();case 114:throw a.t0;case 115:case"end":return a.stop();}},a,void 0,[[5,110]])}));return function(){return a.apply(this,arguments)}}(); | ||
"use strict"; | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
var _puppeteer = require("./utilities/puppeteer"); | ||
var _misc = require("./utilities/misc"); | ||
var _config = require("./config"); | ||
var _fieldsStructure = _interopRequireDefault(require("./fieldsStructure")); | ||
var _ramda = require("ramda"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } | ||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } | ||
module.exports = | ||
/*#__PURE__*/ | ||
function () { | ||
var _submission = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee(data, credentials) { | ||
return _regenerator.default.wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.prev = 0; | ||
if (!((0, _ramda.isEmpty)(data) || (0, _ramda.isNil)(data))) { | ||
_context.next = 3; | ||
break; | ||
} | ||
throw "No data to submit!"; | ||
case 3: | ||
_context.next = 5; | ||
return browserSubmission(data, credentials); | ||
case 5: | ||
_context.next = 10; | ||
break; | ||
case 7: | ||
_context.prev = 7; | ||
_context.t0 = _context["catch"](0); | ||
throw _context.t0; | ||
case 10: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee, this, [[0, 7]]); | ||
})); | ||
return function submission(_x, _x2) { | ||
return _submission.apply(this, arguments); | ||
}; | ||
}(); | ||
function to(promise) { | ||
return promise.then(function (data) { | ||
return [null, data]; | ||
}).catch(function (err) { | ||
return [err]; | ||
}); | ||
} | ||
var browserSubmission = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee2(data, credentials) { | ||
var _ref2, browser, page, loginSubmit, newApplicationSubmit, newApplicationConfirmSubmit, vehicleInfoSubmit, lienInfoSubmit, prevOwnerInfoSubmit, applicantInfoSubmit, documentTypeSubmit, uploadFileSubmit; | ||
return _regenerator.default.wrap(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.next = 2; | ||
return (0, _puppeteer.browserLaunch)(); | ||
case 2: | ||
_ref2 = _context2.sent; | ||
browser = _ref2.browser; | ||
page = _ref2.page; | ||
_context2.prev = 5; | ||
_context2.next = 8; | ||
return page.goto(_config.SITE_URL); | ||
case 8: | ||
console.log('Prelogin for lotid>>', data.lotId); //TODO: not able to use the selector to click so just pressing "enter" | ||
//await clickButton(page, filterFieldArrayByCriteria(fields, { step: steps.PRE_LOGIN, type: "button" })[0].htmlSelector) | ||
_context2.next = 11; | ||
return page.keyboard.press("Enter"); | ||
case 11: | ||
console.log('LOGIN'); | ||
_context2.next = 14; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_1LOGIN.png") | ||
}); | ||
case 14: | ||
loginSubmit = (0, _misc.getStepButton)(_fieldsStructure.default, _config.steps.LOGIN); | ||
_context2.next = 17; | ||
return page.waitForSelector(loginSubmit.htmlSelector); | ||
case 17: | ||
_context2.next = 19; | ||
return (0, _puppeteer.feedAllStepFields)(page, _fieldsStructure.default, _config.steps.LOGIN, data); | ||
case 19: | ||
_context2.next = 21; | ||
return (0, _puppeteer.clickButton)(page, loginSubmit.htmlSelector); | ||
case 21: | ||
console.log('NEW_APPLICATION_URL'); | ||
_context2.next = 24; | ||
return page.goto(_config.NEW_APPLICATION_URL); | ||
case 24: | ||
console.log('NEW_APPLICATION'); | ||
_context2.next = 27; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_2NEW_APPLICATION.png") | ||
}); | ||
case 27: | ||
newApplicationSubmit = (0, _misc.getStepButton)(_fieldsStructure.default, _config.steps.NEW_APPLICATION); | ||
_context2.next = 30; | ||
return page.waitForSelector(newApplicationSubmit.htmlSelector); | ||
case 30: | ||
_context2.next = 32; | ||
return (0, _puppeteer.feedAllStepFields)(page, _fieldsStructure.default, _config.steps.NEW_APPLICATION, data); | ||
case 32: | ||
_context2.next = 34; | ||
return (0, _puppeteer.clickButton)(page, newApplicationSubmit.htmlSelector).catch(function (e) { | ||
throw e; | ||
}); | ||
case 34: | ||
console.log('NEW_APPLICATION_CONFIRM'); | ||
_context2.next = 37; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_3NEW_APPLICATION_CONFIRM.png") | ||
}); | ||
case 37: | ||
newApplicationConfirmSubmit = (0, _misc.getStepButton)(_fieldsStructure.default, _config.steps.NEW_APPLICATION_CONFIRM); | ||
_context2.next = 40; | ||
return page.waitForSelector(newApplicationConfirmSubmit.htmlSelector); | ||
case 40: | ||
_context2.next = 42; | ||
return (0, _puppeteer.clickButton)(page, newApplicationConfirmSubmit.htmlSelector); | ||
case 42: | ||
console.log('VEHICLE_INFO Information'); | ||
_context2.next = 45; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_4VEHICLE_INFO.png") | ||
}); | ||
case 45: | ||
vehicleInfoSubmit = (0, _misc.getStepButton)(_fieldsStructure.default, _config.steps.VEHICLE_INFO); | ||
_context2.next = 48; | ||
return page.waitForSelector(vehicleInfoSubmit.htmlSelector); | ||
case 48: | ||
_context2.next = 50; | ||
return (0, _puppeteer.feedAllStepFields)(page, _fieldsStructure.default, _config.steps.VEHICLE_INFO, data); | ||
case 50: | ||
_context2.next = 52; | ||
return (0, _puppeteer.clickButton)(page, vehicleInfoSubmit.htmlSelector); | ||
case 52: | ||
console.log('LIENHOLDER_INFO Information'); | ||
_context2.next = 55; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_5LIENHOLDER_INFO.png") | ||
}); | ||
case 55: | ||
lienInfoSubmit = (0, _misc.getStepButton)(_fieldsStructure.default, _config.steps.LIENHOLDER_INFO); | ||
_context2.next = 58; | ||
return page.waitForSelector(lienInfoSubmit.htmlSelector); | ||
case 58: | ||
_context2.next = 60; | ||
return (0, _puppeteer.feedAllStepFields)(page, _fieldsStructure.default, _config.steps.LIENHOLDER_INFO, data); | ||
case 60: | ||
_context2.next = 62; | ||
return (0, _puppeteer.clickButton)(page, lienInfoSubmit.htmlSelector); | ||
case 62: | ||
console.log('PREVIOUS_OWNER_INFO Information'); | ||
_context2.next = 65; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_6PREVIOUS_OWNER_INFO.png") | ||
}); | ||
case 65: | ||
prevOwnerInfoSubmit = (0, _misc.getStepButton)(_fieldsStructure.default, _config.steps.PREVIOUS_OWNER_INFO); | ||
_context2.next = 68; | ||
return page.waitForSelector(prevOwnerInfoSubmit.htmlSelector); | ||
case 68: | ||
_context2.next = 70; | ||
return (0, _puppeteer.feedAllStepFields)(page, _fieldsStructure.default, _config.steps.PREVIOUS_OWNER_INFO, data); | ||
case 70: | ||
_context2.next = 72; | ||
return (0, _puppeteer.clickButton)(page, prevOwnerInfoSubmit.htmlSelector); | ||
case 72: | ||
//check if there are any error message if so throw that error | ||
console.log('APPLICANT_INFO Information'); | ||
_context2.next = 75; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_7APPLICANT_INFO.png") | ||
}); | ||
case 75: | ||
applicantInfoSubmit = (0, _misc.getStepButton)(_fieldsStructure.default, _config.steps.APPLICANT_INFO); | ||
_context2.next = 78; | ||
return page.waitForSelector(applicantInfoSubmit.htmlSelector); | ||
case 78: | ||
_context2.next = 80; | ||
return (0, _puppeteer.feedAllStepFields)(page, _fieldsStructure.default, _config.steps.APPLICANT_INFO, data); | ||
case 80: | ||
_context2.next = 82; | ||
return (0, _puppeteer.clickButton)(page, applicantInfoSubmit.htmlSelector); | ||
case 82: | ||
console.log('SUPPORTING_DOCUMENTS_ONE Information'); | ||
_context2.next = 85; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_8SUPPORTING_DOCUMENTS_ONE.png") | ||
}); | ||
case 85: | ||
documentTypeSubmit = (0, _misc.getStepButton)(_fieldsStructure.default, _config.steps.SUPPORTING_DOCUMENTS_ONE); | ||
_context2.next = 88; | ||
return page.waitForSelector(documentTypeSubmit.htmlSelector); | ||
case 88: | ||
_context2.next = 90; | ||
return (0, _puppeteer.feedAllStepFields)(page, _fieldsStructure.default, _config.steps.SUPPORTING_DOCUMENTS_ONE, data); | ||
case 90: | ||
_context2.next = 92; | ||
return (0, _puppeteer.clickButton)(page, documentTypeSubmit.htmlSelector); | ||
case 92: | ||
console.log('SUPPORTING_DOCUMENTS_TWO Information'); | ||
_context2.next = 95; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_9SUPPORTING_DOCUMENTS_TWO.png") | ||
}); | ||
case 95: | ||
uploadFileSubmit = (0, _misc.getStepButton)(_fieldsStructure.default, _config.steps.SUPPORTING_DOCUMENTS_TWO); | ||
_context2.next = 98; | ||
return page.waitForSelector(uploadFileSubmit.htmlSelector); | ||
case 98: | ||
_context2.next = 100; | ||
return (0, _puppeteer.feedAllStepFields)(page, _fieldsStructure.default, _config.steps.SUPPORTING_DOCUMENTS_TWO, data); | ||
case 100: | ||
_context2.next = 102; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_90SUPPORTING_DOCUMENTS_TWO.png") | ||
}); | ||
case 102: | ||
_context2.next = 104; | ||
return (0, _puppeteer.clickButton)(page, uploadFileSubmit.htmlSelector); | ||
case 104: | ||
_context2.next = 106; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_91SUPPORTING_DOCUMENTS_TWO.png") | ||
}); | ||
case 106: | ||
_context2.next = 108; | ||
return browser.close(); | ||
case 108: | ||
_context2.next = 115; | ||
break; | ||
case 110: | ||
_context2.prev = 110; | ||
_context2.t0 = _context2["catch"](5); | ||
_context2.next = 114; | ||
return browser.close(); | ||
case 114: | ||
throw _context2.t0; | ||
case 115: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
}, _callee2, this, [[5, 110]]); | ||
})); | ||
return function browserSubmission(_x3, _x4) { | ||
return _ref.apply(this, arguments); | ||
}; | ||
}(); |
@@ -1,1 +0,106 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStepButton=exports.asyncForEach=exports.filterFieldArrayByCriteria=exports.getFieldObjectByName=exports.getFieldValue=void 0;var _regenerator=require("babel-runtime/regenerator"),_regenerator2=_interopRequireDefault(_regenerator),_asyncToGenerator2=require("babel-runtime/helpers/asyncToGenerator"),_asyncToGenerator3=_interopRequireDefault(_asyncToGenerator2),_ramda=require("ramda");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var getFieldValue=exports.getFieldValue=function(a,b){return(0,_ramda.pathOr)("",b,a)},getFieldObjectByName=exports.getFieldObjectByName=function(a,b){return a.find(function(a){return a.name===b})},filterFieldArrayByCriteria=exports.filterFieldArrayByCriteria=function(a,b){return a.filter(function(a){for(var c=!0,d=Object.keys(b),e=0;e<d.length;e++)if(b[d[e]]!=a[d[e]]){c=!1;break}return c})},asyncForEach=exports.asyncForEach=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b,c){var d;return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:d=0;case 1:if(!(d<b.length)){a.next=7;break}return a.next=4,c(b[d],d,b);case 4:d++,a.next=1;break;case 7:case"end":return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),getStepButton=exports.getStepButton=function(a,b){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:"button",d=filterFieldArrayByCriteria(a,{step:b,type:c})[0];if(!d)throw"No submission button found";return d}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.getStepButton = exports.asyncForEach = exports.filterFieldArrayByCriteria = exports.getFieldObjectByName = exports.getFieldValue = void 0; | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
var _ramda = require("ramda"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } | ||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } | ||
var getFieldValue = function getFieldValue(data, servicePath) { | ||
return (0, _ramda.pathOr)("", servicePath, data); | ||
}; | ||
exports.getFieldValue = getFieldValue; | ||
var getFieldObjectByName = function getFieldObjectByName(fieldArray, name) { | ||
return fieldArray.find(function (field) { | ||
return field.name === name; | ||
}); | ||
}; | ||
exports.getFieldObjectByName = getFieldObjectByName; | ||
var filterFieldArrayByCriteria = function filterFieldArrayByCriteria(fieldArray, criteriaObj) { | ||
return fieldArray.filter(function (field) { | ||
var criteriaMet = true; | ||
var keys = Object.keys(criteriaObj); | ||
for (var i = 0; i < keys.length; i++) { | ||
if (criteriaObj[keys[i]] != field[keys[i]]) { | ||
criteriaMet = false; | ||
break; | ||
} | ||
} | ||
return criteriaMet; | ||
}); | ||
}; | ||
exports.filterFieldArrayByCriteria = filterFieldArrayByCriteria; | ||
var asyncForEach = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee(array, callback) { | ||
var index; | ||
return _regenerator.default.wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
index = 0; | ||
case 1: | ||
if (!(index < array.length)) { | ||
_context.next = 7; | ||
break; | ||
} | ||
_context.next = 4; | ||
return callback(array[index], index, array); | ||
case 4: | ||
index++; | ||
_context.next = 1; | ||
break; | ||
case 7: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee, this); | ||
})); | ||
return function asyncForEach(_x, _x2) { | ||
return _ref.apply(this, arguments); | ||
}; | ||
}(); | ||
exports.asyncForEach = asyncForEach; | ||
var getStepButton = function getStepButton(fields, step) { | ||
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "button"; | ||
var button = filterFieldArrayByCriteria(fields, { | ||
step: step, | ||
type: type | ||
})[0]; | ||
if (!button) { | ||
throw "No submission button found"; | ||
} | ||
return button; | ||
}; | ||
exports.getStepButton = getStepButton; |
@@ -1,1 +0,39 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={VIN:"1Z7HT32N76S567988",lotId:"54565454",vehicleMake:"",vehicleYear:"",vehicleModel:"LAI",bodyStyle:"OF",majorColor:"RED",minorColor:"TAN",dotProofRequired:"",manufactureBuyBack:!1,floodDamage:!0,noLien:!0,recordLien:"",ownerName:"test name",ownerCity:"test city",ownerState:"TX",applicantName:"test app name",applicantAddressLine1:"test app line1",applicantAddressLine2:"test app line2",applicantCity:"test app city",applicantState:"TX",applicantZip:"77073",applicantZip2:"",applicantMailingName:"test app mail name",applicantMailingAddressLine1:"test app mail line1",applicantMailingAddressLine2:"test app mail line2",applicantMailingCity:"test mail city",applicantMailingState:"TX",applicantMailingZip:"77073",applicantMailingZip2:""},module.exports=exports["default"]; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _default = { | ||
"VIN": "1Z7HT32N76S567988", | ||
"lotId": "54565454", | ||
"vehicleMake": "", | ||
"vehicleYear": "", | ||
"vehicleModel": "LAI", | ||
"bodyStyle": "OF", | ||
"majorColor": "RED", | ||
"minorColor": "TAN", | ||
"dotProofRequired": "", | ||
"manufactureBuyBack": false, | ||
"floodDamage": true, | ||
"noLien": true, | ||
"recordLien": "", | ||
"ownerName": "test name", | ||
"ownerCity": "test city", | ||
"ownerState": "TX", | ||
"applicantName": "test app name", | ||
"applicantAddressLine1": "test app line1", | ||
"applicantAddressLine2": "test app line2", | ||
"applicantCity": "test app city", | ||
"applicantState": "TX", | ||
"applicantZip": "77073", | ||
"applicantZip2": "", | ||
"applicantMailingName": "test app mail name", | ||
"applicantMailingAddressLine1": "test app mail line1", | ||
"applicantMailingAddressLine2": "test app mail line2", | ||
"applicantMailingCity": "test mail city", | ||
"applicantMailingState": "TX", | ||
"applicantMailingZip": "77073", | ||
"applicantMailingZip2": "" | ||
}; | ||
exports.default = _default; |
@@ -1,1 +0,378 @@ | ||
'use strict';Object.defineProperty(exports,'__esModule',{value:!0}),exports.getStepFields=exports.feedAllStepFields=exports.waitForNavigation=exports.feedField=exports.clickButton=exports.formSubmit=exports.goToPage=exports.browserLaunch=void 0;var _regenerator=require('babel-runtime/regenerator'),_regenerator2=_interopRequireDefault(_regenerator),_asyncToGenerator2=require('babel-runtime/helpers/asyncToGenerator'),_asyncToGenerator3=_interopRequireDefault(_asyncToGenerator2),_misc=require('./misc');function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var puppeteer=require('puppeteer'),browserLaunch=exports.browserLaunch=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(){var b,c;return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,puppeteer.launch();case 2:return b=a.sent,a.next=5,b.newPage();case 5:return c=a.sent,a.abrupt('return',{browser:b,page:c});case 7:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),goToPage=exports.goToPage=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b,c){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,b.goto(c);case 2:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),formSubmit=exports.formSubmit=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b,c){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,b.evaluate(function(a){document.querySelector(a).submit()},c);case 2:return a.next=4,waitForNavigation(b);case 4:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),clickButton=exports.clickButton=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b,c){var d,e,f;return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,d=!0,a.next=4,b.evaluate(function(a){var b=document.querySelector(a.fieldSelector);console.log(b),b?(b.removeAttribute('disabled'),b.click()):d=!1},{fieldSelector:c});case 4:if(!d){a.next=16;break}return a.next=7,waitForNavigation(b);case 7:return a.next=9,b.$('#messages > div > ul');case 9:if(e=a.sent,e){a.next=12;break}return a.abrupt('return');case 12:return a.next=14,e.$$eval('li',function(a){return a.map(function(a){return a.innerText})});case 14:throw f=a.sent,f.join('|');case 16:a.next=21;break;case 18:throw a.prev=18,a.t0=a['catch'](0),a.t0;case 21:case'end':return a.stop();}},a,void 0,[[0,18]])}));return function(){return a.apply(this,arguments)}}(),feedField=exports.feedField=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b,c,d,e){var f,g;return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!c){a.next=10;break}if('file'!==e){a.next=8;break}return a.next=4,b.$(c);case 4:return f=a.sent,g=d,a.next=8,f.uploadFile(g);case 8:return a.next=10,b.evaluate(function(a){var b=a.fieldSelector,c=a.fieldValue,d=a.fieldType,e=document.querySelector(b);console.log(e),e&&c&&(('text'===d||'select'===d)&&(e.value=c),('checkbox'===d||'radio'===d)&&(e.checked=c))},{fieldSelector:c,fieldValue:d,fieldType:e});case 10:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),waitForNavigation=exports.waitForNavigation=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,b.waitForNavigation({domcontentloaded:'domcontentloaded',timeout:3e4});case 2:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),feedAllStepFields=exports.feedAllStepFields=function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(b,c,d,e){var f;return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return f=getStepFields(c,d),a.next=3,(0,_misc.asyncForEach)(f,function(){var a=(0,_asyncToGenerator3.default)(_regenerator2.default.mark(function a(c){return _regenerator2.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,feedField(b,c.htmlSelector,e[c.name]?e[c.name]:c.defaultValue,c.inputType);case 2:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}());case 3:case'end':return a.stop();}},a,void 0)}));return function(){return a.apply(this,arguments)}}(),getStepFields=exports.getStepFields=function(a,b){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:'input',d=(0,_misc.filterFieldArrayByCriteria)(a,{step:b,type:c});if(0===d.length)throw'No fields for this step';return d}; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.getStepFields = exports.feedAllStepFields = exports.waitForNavigation = exports.feedField = exports.clickButton = exports.formSubmit = exports.goToPage = exports.browserLaunch = void 0; | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
var _misc = require("./misc"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } | ||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } | ||
var puppeteer = require('puppeteer'); | ||
var browserLaunch = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee() { | ||
var browser, page; | ||
return _regenerator.default.wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.next = 2; | ||
return puppeteer.launch(); | ||
case 2: | ||
browser = _context.sent; | ||
_context.next = 5; | ||
return browser.newPage(); | ||
case 5: | ||
page = _context.sent; | ||
return _context.abrupt("return", { | ||
browser: browser, | ||
page: page | ||
}); | ||
case 7: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee, this); | ||
})); | ||
return function browserLaunch() { | ||
return _ref.apply(this, arguments); | ||
}; | ||
}(); | ||
exports.browserLaunch = browserLaunch; | ||
var goToPage = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref2 = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee2(page, url) { | ||
return _regenerator.default.wrap(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.next = 2; | ||
return page.goto(url); | ||
case 2: | ||
case "end": | ||
return _context2.stop(); | ||
} | ||
} | ||
}, _callee2, this); | ||
})); | ||
return function goToPage(_x, _x2) { | ||
return _ref2.apply(this, arguments); | ||
}; | ||
}(); | ||
exports.goToPage = goToPage; | ||
var formSubmit = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref3 = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee3(page, form) { | ||
return _regenerator.default.wrap(function _callee3$(_context3) { | ||
while (1) { | ||
switch (_context3.prev = _context3.next) { | ||
case 0: | ||
_context3.next = 2; | ||
return page.evaluate(function (form) { | ||
document.querySelector(form).submit(); | ||
}, form); | ||
case 2: | ||
_context3.next = 4; | ||
return waitForNavigation(page); | ||
case 4: | ||
case "end": | ||
return _context3.stop(); | ||
} | ||
} | ||
}, _callee3, this); | ||
})); | ||
return function formSubmit(_x3, _x4) { | ||
return _ref3.apply(this, arguments); | ||
}; | ||
}(); | ||
exports.formSubmit = formSubmit; | ||
var clickButton = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref4 = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee4(page, fieldSelector) { | ||
var successClickFlag, errorBlock, errorList; | ||
return _regenerator.default.wrap(function _callee4$(_context4) { | ||
while (1) { | ||
switch (_context4.prev = _context4.next) { | ||
case 0: | ||
_context4.prev = 0; | ||
successClickFlag = true; | ||
_context4.next = 4; | ||
return page.evaluate(function (x) { | ||
var querySelector = document.querySelector(x.fieldSelector); | ||
console.log(querySelector); | ||
if (querySelector) { | ||
querySelector.removeAttribute('disabled'); | ||
querySelector.click(); | ||
} else { | ||
successClickFlag = false; | ||
} | ||
}, { | ||
fieldSelector: fieldSelector | ||
}); | ||
case 4: | ||
if (!successClickFlag) { | ||
_context4.next = 16; | ||
break; | ||
} | ||
_context4.next = 7; | ||
return waitForNavigation(page); | ||
case 7: | ||
_context4.next = 9; | ||
return page.$("#messages > div > ul"); | ||
case 9: | ||
errorBlock = _context4.sent; | ||
if (errorBlock) { | ||
_context4.next = 12; | ||
break; | ||
} | ||
return _context4.abrupt("return"); | ||
case 12: | ||
_context4.next = 14; | ||
return errorBlock.$$eval("li", function (nodes) { | ||
return nodes.map(function (n) { | ||
return n.innerText; | ||
}); | ||
}); | ||
case 14: | ||
errorList = _context4.sent; | ||
throw errorList.join("|"); | ||
case 16: | ||
_context4.next = 21; | ||
break; | ||
case 18: | ||
_context4.prev = 18; | ||
_context4.t0 = _context4["catch"](0); | ||
throw _context4.t0; | ||
case 21: | ||
case "end": | ||
return _context4.stop(); | ||
} | ||
} | ||
}, _callee4, this, [[0, 18]]); | ||
})); | ||
return function clickButton(_x5, _x6) { | ||
return _ref4.apply(this, arguments); | ||
}; | ||
}(); | ||
exports.clickButton = clickButton; | ||
var feedField = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref5 = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee5(page, fieldSelector, fieldValue, fieldType) { | ||
var fileInput, fullpath; | ||
return _regenerator.default.wrap(function _callee5$(_context5) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
if (!fieldSelector) { | ||
_context5.next = 10; | ||
break; | ||
} | ||
if (!(fieldType === "file")) { | ||
_context5.next = 8; | ||
break; | ||
} | ||
_context5.next = 4; | ||
return page.$(fieldSelector); | ||
case 4: | ||
fileInput = _context5.sent; | ||
fullpath = fieldValue; | ||
_context5.next = 8; | ||
return fileInput.uploadFile(fullpath); | ||
case 8: | ||
_context5.next = 10; | ||
return page.evaluate(function (x) { | ||
var fieldSelector = x.fieldSelector, | ||
fieldValue = x.fieldValue, | ||
fieldType = x.fieldType; | ||
var querySelector = document.querySelector(fieldSelector); | ||
console.log(querySelector); | ||
if (querySelector && fieldValue) { | ||
if (fieldType === "text" || fieldType === "select") { | ||
querySelector.value = fieldValue; | ||
} | ||
if (fieldType === "checkbox" || fieldType === "radio") { | ||
querySelector.checked = fieldValue; | ||
} | ||
} | ||
}, { | ||
fieldSelector: fieldSelector, | ||
fieldValue: fieldValue, | ||
fieldType: fieldType | ||
}); | ||
case 10: | ||
case "end": | ||
return _context5.stop(); | ||
} | ||
} | ||
}, _callee5, this); | ||
})); | ||
return function feedField(_x7, _x8, _x9, _x10) { | ||
return _ref5.apply(this, arguments); | ||
}; | ||
}(); | ||
exports.feedField = feedField; | ||
var waitForNavigation = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref6 = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee6(page) { | ||
return _regenerator.default.wrap(function _callee6$(_context6) { | ||
while (1) { | ||
switch (_context6.prev = _context6.next) { | ||
case 0: | ||
_context6.next = 2; | ||
return page.waitForNavigation({ | ||
domcontentloaded: 'domcontentloaded', | ||
timeout: 30000 | ||
}); | ||
case 2: | ||
case "end": | ||
return _context6.stop(); | ||
} | ||
} | ||
}, _callee6, this); | ||
})); | ||
return function waitForNavigation(_x11) { | ||
return _ref6.apply(this, arguments); | ||
}; | ||
}(); | ||
exports.waitForNavigation = waitForNavigation; | ||
var feedAllStepFields = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref7 = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee8(page, fields, step, data) { | ||
var stepFields; | ||
return _regenerator.default.wrap(function _callee8$(_context8) { | ||
while (1) { | ||
switch (_context8.prev = _context8.next) { | ||
case 0: | ||
stepFields = getStepFields(fields, step); | ||
_context8.next = 3; | ||
return (0, _misc.asyncForEach)(stepFields, | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref8 = _asyncToGenerator( | ||
/*#__PURE__*/ | ||
_regenerator.default.mark(function _callee7(field) { | ||
return _regenerator.default.wrap(function _callee7$(_context7) { | ||
while (1) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
_context7.next = 2; | ||
return feedField(page, field.htmlSelector, data[field.name] ? data[field.name] : field.defaultValue, field.inputType); | ||
case 2: | ||
case "end": | ||
return _context7.stop(); | ||
} | ||
} | ||
}, _callee7, this); | ||
})); | ||
return function (_x16) { | ||
return _ref8.apply(this, arguments); | ||
}; | ||
}()); | ||
case 3: | ||
case "end": | ||
return _context8.stop(); | ||
} | ||
} | ||
}, _callee8, this); | ||
})); | ||
return function feedAllStepFields(_x12, _x13, _x14, _x15) { | ||
return _ref7.apply(this, arguments); | ||
}; | ||
}(); | ||
exports.feedAllStepFields = feedAllStepFields; | ||
var getStepFields = function getStepFields(fields, step) { | ||
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "input"; | ||
var stepFields = (0, _misc.filterFieldArrayByCriteria)(fields, { | ||
step: step, | ||
type: type | ||
}); | ||
if (stepFields.length === 0) { | ||
throw "No fields for this step"; | ||
} | ||
return stepFields; | ||
}; | ||
exports.getStepFields = getStepFields; |
{ | ||
"name": "@copart/tx-title-submission", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Automates texas title submission via headless browser", | ||
@@ -8,11 +8,5 @@ "main": "./lib/index.js", | ||
"clean": "rimraf lib", | ||
"test": "npm run lint && npm run cover", | ||
"test:prod": "cross-env BABEL_ENV=production npm run test", | ||
"test:only": "mocha --require babel-core/register --require babel-polyfill --recursive", | ||
"test:watch": "npm test -- --watch", | ||
"test:examples": "npm run build && node examples/", | ||
"cover": "istanbul cover _mocha -- --require babel-core/register --require babel-polyfill --recursive", | ||
"lint": "eslint src test", | ||
"build": "cross-env BABEL_ENV=production babel src --out-dir lib", | ||
"prepublish": "npm run clean && npm run lint && npm run test && npm run build" | ||
"build": "babel src --out-dir lib", | ||
"prepublish": "npm run clean && npm run build" | ||
}, | ||
@@ -42,24 +36,42 @@ "files": [ | ||
"devDependencies": { | ||
"babel-cli": "^6.26.0", | ||
"babel-core": "^6.26.3", | ||
"babel-eslint": "^8.2.1", | ||
"babel-loader": "^8.0.4", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-plugin-transform-runtime": "^6.23.0", | ||
"babel-polyfill": "^6.26.0", | ||
"babel-preset-env": "^1.6.1", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-minify": "^0.3.0", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"chai": "^4.1.2", | ||
"cross-env": "^5.1.3", | ||
"eslint": "^4.16.0", | ||
"eslint-config-airbnb": "^16.1.0", | ||
"eslint-plugin-import": "^2.7.0", | ||
"eslint-plugin-jsx-a11y": "^6.0.2", | ||
"eslint-plugin-react": "^7.4.0", | ||
"istanbul": "^1.0.0-alpha", | ||
"mocha": "^5.0.0", | ||
"rimraf": "^2.6.2" | ||
"@babel/cli": "7.1.0", | ||
"@babel/core": "7.1.0", | ||
"@babel/node": "7.0.0", | ||
"@babel/plugin-proposal-class-properties": "7.1.0", | ||
"@babel/plugin-proposal-decorators": "7.1.2", | ||
"@babel/plugin-proposal-export-default-from": "7.0.0", | ||
"@babel/plugin-proposal-export-namespace-from": "7.0.0", | ||
"@babel/plugin-proposal-logical-assignment-operators": "7.0.0", | ||
"@babel/plugin-proposal-object-rest-spread": "7.0.0", | ||
"@babel/plugin-proposal-optional-chaining": "7.0.0", | ||
"@babel/plugin-proposal-pipeline-operator": "7.0.0", | ||
"@babel/plugin-syntax-dynamic-import": "7.0.0", | ||
"@babel/plugin-transform-runtime": "7.0.0", | ||
"@babel/preset-env": "7.1.0", | ||
"@babel/preset-flow": "7.0.0", | ||
"@babel/preset-react": "7.0.0", | ||
"@babel/preset-stage-0": "7.0.0", | ||
"@babel/register": "7.0.0", | ||
"@babel/runtime": "7.1.2", | ||
"autoprefixer": "8.5.0", | ||
"babel-loader": "8.0.0-beta.3", | ||
"babel-plugin-add-react-displayname": "0.0.5", | ||
"babel-plugin-dev-expression": "0.2.1", | ||
"babel-plugin-jsx-control-statements": "3.2.8", | ||
"babel-plugin-module-resolver": "3.1.1", | ||
"babel-plugin-react-css-modules": "3.4.0", | ||
"file-loader": "1.1.11", | ||
"invariant": "2.2.4", | ||
"kill-port": "1.2.0", | ||
"nodemon": "1.17.5", | ||
"rollup-plugin-babel": "4.0.0-beta.7", | ||
"rollup-plugin-commonjs": "9.1.3", | ||
"rollup-plugin-filesize": "2.0.0", | ||
"rollup-plugin-json": "3.0.0", | ||
"rollup-plugin-node-resolve": "3.3.0", | ||
"serve": "^9.4.0", | ||
"source-map-loader": "^0.2.3", | ||
"style-loader": "0.21.0", | ||
"url-loader": "1.0.1" | ||
} | ||
} |
@@ -1,4 +0,1 @@ | ||
require("babel-core/register"); | ||
require("babel-polyfill"); | ||
import { browserLaunch, goToPage, clickButton, feedAllStepFields, waitForNavigation } from "./utilities/puppeteer"; | ||
@@ -5,0 +2,0 @@ import { getStepButton } from "./utilities/misc" |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
68068
2070
1
39