How to use setValue method in Appium Base Driver

Best JavaScript code snippet using appium-base-driver

createAccount.spec.js

Source:createAccount.spec.js Github

copy

Full Screen

...11  });12  it("Verify email address format validation", () => {13    browser.url("");14    NavSection.submitI();15    accountPage.email.setValue("dawdadwaldklak.com");16    createAccount.submitBtnCreate();17    expect(createAccount.alertText()).toEqual("Invalid email address.");18  });19  it("Verify message when the client enters an unexisting-email, should be redirected to CREATE AN ACCOUNT", () => {20    browser.url("");21    NavSection.submitI();22    createAccount.email.setValue("redirected.test@gmail.com");23    createAccount.submitBtnCreate();24    const title = browser.getTitle();25    expect(title).toEqual("Login - My Store");26  });27  it("Verify message when the client enters an existing-email", () => {28    browser.url("");29    NavSection.submitI();30    createAccount.email.setValue("iignacio.test@gmail.com");31    createAccount.submitBtnCreate();32    expect(createAccount.alertText()).toEqual(33      "An account using this email address has already been registered. Please enter a valid password or request a new one."34    );35  });36  it('Verify First name is required', () => {37    browser.url("");38    NavSection.submitI();39    createAccount.email.setValue(getRandomEmail());40    createAccount.submitBtnCreate();41    createAccount.submitMr();42    createAccount.lastName.setValue("Carrizo");43    createAccount.passwordCreate.setValue("abc1234");44    createAccount.address.setValue("Alvear");45    createAccount.city.setValue("Rosario");46    createAccount.dropDown.selectByVisibleText("Arizona");47    createAccount.postCode.setValue("33109");48    createAccount.phoneMobile.setValue("3421323123");49    createAccount.submitBtnReg();50    expect(createAccount.alertText()).toEqual("firstname is required.");51  });52  it('Verify maximum characters in first name', () => {53    browser.url("");54    NavSection.submitI();55    createAccount.email.setValue(getRandomEmail());56    createAccount.submitBtnCreate();57    createAccount.submitMr();58    createAccount.customerFirstName.setValue("IgnacioIgnacioIgnacioIgnacioIgnacioIgnacioIgnacio");59    createAccount.lastName.setValue("Carrizo");60    createAccount.passwordCreate.setValue("abc1234");61    createAccount.address.setValue("Alvear");62    createAccount.city.setValue("Rosario");63    createAccount.dropDown.selectByVisibleText("Arizona");64    createAccount.postCode.setValue("33109");65    createAccount.phoneMobile.setValue("3421323123");66    createAccount.submitBtnReg();67    expect(createAccount.alertText()).toEqual("firstname is too long. Maximum length: 32");68  });69  it('Verify first name cannot start with a number', () => {70    browser.url("");71    NavSection.submitI();72    createAccount.email.setValue(getRandomEmail());73    createAccount.submitBtnCreate();74    createAccount.submitMr();75    createAccount.customerFirstName.setValue("3Ignacio");76    createAccount.lastName.setValue("Carrizo");77    createAccount.passwordCreate.setValue("abc1234");78    createAccount.address.setValue("Alvear");79    createAccount.city.setValue("Rosario");80    createAccount.dropDown.selectByVisibleText("Arizona");81    createAccount.postCode.setValue("33109");82    createAccount.phoneMobile.setValue("3421323123");83    createAccount.submitBtnReg();84    expect(createAccount.alertText()).toEqual("firstname is invalid.");85  });86  it('Verify last name is required', () => {87    browser.url("");88    NavSection.submitI();89    createAccount.email.setValue(getRandomEmail());90    createAccount.submitBtnCreate();91    createAccount.submitMr();92    createAccount.customerFirstName.setValue("Ignacio");93    createAccount.passwordCreate.setValue("abc1234");94    createAccount.address.setValue("Alvear");95    createAccount.city.setValue("Rosario");96    createAccount.dropDown.selectByVisibleText("Arizona");97    createAccount.postCode.setValue("33109");98    createAccount.phoneMobile.setValue("3421323123");99    createAccount.submitBtnReg();100    expect(createAccount.alertText()).toEqual('lastname is required.');101  });102  it('Verify maximum characters in last name', () => {103    browser.url("");104    NavSection.submitI();105    createAccount.email.setValue(getRandomEmail());106    createAccount.submitBtnCreate();107    createAccount.submitMr();108    createAccount.customerFirstName.setValue("Ignacio");109    createAccount.lastName.setValue("IgnacioIgnacioIgnacioIgnacioIgnacioIgnacioIgnacio");110    createAccount.passwordCreate.setValue("abc1234");111    createAccount.address.setValue("Alvear");112    createAccount.city.setValue("Rosario");113    createAccount.dropDown.selectByVisibleText("Arizona");114    createAccount.postCode.setValue("33109");115    createAccount.phoneMobile.setValue("3421323123");116    createAccount.submitBtnReg();117    expect(createAccount.alertText()).toEqual("lastname is too long. Maximum length: 32");118  });119  it('Verify email field is required', () => {120    browser.url("");121    NavSection.submitI();122    createAccount.email.setValue(getRandomEmail());123    createAccount.submitBtnCreate();124    createAccount.submitMr();125    createAccount.customerFirstName.setValue("Ignacio");126    createAccount.lastName.setValue("Carrizo");127    createAccount.emailClear();128    createAccount.passwordCreate.setValue("abc1234");129    createAccount.address.setValue("Alvear");130    createAccount.city.setValue("Rosario");131    createAccount.dropDown.selectByVisibleText("Arizona");132    createAccount.postCode.setValue("33109");133    createAccount.phoneMobile.setValue("3421323123");134    createAccount.submitBtnReg();135    expect(createAccount.alertText()).toEqual("email is required.");136  });137  it('Verify correct validation of email', () => {138    browser.url("");139    NavSection.submitI();140    createAccount.email.setValue(getRandomEmail());141    createAccount.submitBtnCreate();142    createAccount.submitMr();143    createAccount.customerFirstName.setValue("Ignacio");144    createAccount.lastName.setValue("Carrizo");145    createAccount.emailPersonalInformation.setValue("djawddjawd.com");146    createAccount.passwordCreate.setValue("abc1234");147    createAccount.address.setValue("Alvear");148    createAccount.city.setValue("Rosario");149    createAccount.dropDown.selectByVisibleText("Arizona");150    createAccount.postCode.setValue("33109");151    createAccount.phoneMobile.setValue("3421323123");152    createAccount.submitBtnReg();153    expect(createAccount.alertText()).toEqual("email is invalid.");154  });155  it('Verify password field is required', () => {156    browser.url("");157    NavSection.submitI();158    createAccount.email.setValue(getRandomEmail());159    createAccount.submitBtnCreate();160    createAccount.submitMr();161    createAccount.customerFirstName.setValue("Ignacio");162    createAccount.lastName.setValue("Carrizo");163    createAccount.address.setValue("Alvear");164    createAccount.city.setValue("Rosario");165    createAccount.dropDown.selectByVisibleText("Arizona");166    createAccount.postCode.setValue("33109");167    createAccount.phoneMobile.setValue("3421323123");168    createAccount.submitBtnReg();169    expect(createAccount.alertText()).toEqual("passwd is required.");170  });171  it('Verify password field length cannot be less than 5 characters', () => {172    browser.url("");173    NavSection.submitI();174    createAccount.email.setValue(getRandomEmail());175    createAccount.submitBtnCreate();176    createAccount.submitMr();177    createAccount.customerFirstName.setValue("Ignacio");178    createAccount.lastName.setValue("Carrizo");179    createAccount.passwordCreate.setValue("abc");180    createAccount.address.setValue("Alvear");181    createAccount.city.setValue("Rosario");182    createAccount.dropDown.selectByVisibleText("Arizona");183    createAccount.postCode.setValue("33109");184    createAccount.phoneMobile.setValue("3421323123");185    createAccount.submitBtnReg();186    expect(createAccount.alertText()).toEqual("passwd is invalid.");187  });188  it("Verify First Name is incorrectly completed with more than 32 characters", () => {189    browser.url("");190    NavSection.submitI();191    createAccount.email.setValue(getRandomEmail());192    createAccount.submitBtnCreate();193    createAccount.submitMr();194    createAccount.customerFirstName.setValue("Ignacio");195    createAccount.lastName.setValue("Carrizo");196    createAccount.passwordCreate.setValue("abc1234");197    createAccount.firstNameYourAddress.setValue("IgnacioIgnacioIgnacioIgnacioIgnacioIgnacio");198    createAccount.address.setValue("Alvear");199    createAccount.city.setValue("Rosario");200    createAccount.dropDown.selectByVisibleText("Arizona");201    createAccount.postCode.setValue("33109");202    createAccount.phoneMobile.setValue("3421323123");203    createAccount.submitBtnReg();204    expect(createAccount.alertText()).toEqual("firstname is too long. Maximum length: 32");205  });206  it("Verify First Name cannot start with a number in your address area", () => {207    browser.url("");208    NavSection.submitI();209    createAccount.email.setValue(getRandomEmail());210    createAccount.submitBtnCreate();211    createAccount.submitMr();212    createAccount.customerFirstName.setValue("Ignacio");213    createAccount.lastName.setValue("Carrizo");214    createAccount.passwordCreate.setValue("abc1234");215    createAccount.firstNameYourAddress.setValue("3Ignacio");216    createAccount.address.setValue("Alvear");217    createAccount.city.setValue("Rosario");218    createAccount.dropDown.selectByVisibleText("Arizona");219    createAccount.postCode.setValue("33109");220    createAccount.phoneMobile.setValue("3421323123");221    createAccount.submitBtnReg();222    expect(createAccount.alertText()).toEqual("firstname is invalid.");223  });224  it("Verify First Name field is required on your address area", () => {225    browser.url("");226    NavSection.submitI();227    createAccount.email.setValue(getRandomEmail());228    createAccount.submitBtnCreate();229    createAccount.submitMr();230    createAccount.customerFirstName.setValue("Ignacio");231    createAccount.lastName.setValue("Carrizo");232    createAccount.passwordCreate.setValue("abc1234");233    createAccount.clearFirstNameYourAddress();234    createAccount.address.setValue("Alvear");235    createAccount.city.setValue("Rosario");236    createAccount.dropDown.selectByVisibleText("Arizona");237    createAccount.postCode.setValue("33109");238    createAccount.phoneMobile.setValue("3421323123");239    createAccount.submitBtnReg();240    expect(createAccount.alertText()).toEqual("firstname is required.");241  });242  it("Verify Last Name is incorrectly completed with more than 32 characters", () => {243    browser.url("");244    NavSection.submitI();245    createAccount.email.setValue(getRandomEmail());246    createAccount.submitBtnCreate();247    createAccount.submitMr();248    createAccount.customerFirstName.setValue("Ignacio");249    createAccount.lastName.setValue("Carrizo");250    createAccount.passwordCreate.setValue("abc1234");251    createAccount.lastNameYourAddress.setValue("IgnacioIgnacioIgnacioIgnacioIgnacioIgnacio");252    createAccount.address.setValue("Alvear");253    createAccount.city.setValue("Rosario");254    createAccount.dropDown.selectByVisibleText("Arizona");255    createAccount.postCode.setValue("33109");256    createAccount.phoneMobile.setValue("3421323123");257    createAccount.submitBtnReg();258    expect(createAccount.alertText()).toEqual("lastname is too long. Maximum length: 32");259  });260  it("Verify Last Name cannot start with a number in your address area", () => {261    browser.url("");262    NavSection.submitI();263    createAccount.email.setValue(getRandomEmail());264    createAccount.submitBtnCreate();265    createAccount.submitMr();266    createAccount.customerFirstName.setValue("Ignacio");267    createAccount.lastName.setValue("Carrizo");268    createAccount.passwordCreate.setValue("abc1234");269    createAccount.lastNameYourAddress.setValue("3Ignacio");270    createAccount.address.setValue("Alvear");271    createAccount.city.setValue("Rosario");272    createAccount.dropDown.selectByVisibleText("Arizona");273    createAccount.postCode.setValue("33109");274    createAccount.phoneMobile.setValue("3421323123");275    createAccount.submitBtnReg();276    expect(createAccount.alertText()).toEqual("lastname is invalid.");277  });278  it("Verify Last Name is required in your address area", () => {279    browser.url("");280    NavSection.submitI();281    createAccount.email.setValue(getRandomEmail());282    createAccount.submitBtnCreate();283    createAccount.submitMr();284    createAccount.customerFirstName.setValue("Ignacio");285    createAccount.lastName.setValue("Carrizo");286    createAccount.passwordCreate.setValue("abc1234");287    createAccount.clearLastNameYourAddress();288    createAccount.address.setValue("Alvear");289    createAccount.city.setValue("Rosario");290    createAccount.dropDown.selectByVisibleText("Arizona");291    createAccount.postCode.setValue("33109");292    createAccount.phoneMobile.setValue("3421323123");293    createAccount.submitBtnReg();294    expect(createAccount.alertText()).toEqual("lastname is required.");295  });296  297  it("Verify Company field is not allow to enter more than 64 characteres in your address area", () => {298    browser.url("");299    NavSection.submitI();300    createAccount.email.setValue(getRandomEmail());301    createAccount.submitBtnCreate();302    createAccount.submitMr();303    createAccount.customerFirstName.setValue("Ignacio");304    createAccount.lastName.setValue("Carrizo");305    createAccount.passwordCreate.setValue("abc1234");306    createAccount.company.setValue("TestIgnacioTestIgnacioTestIgnacioTestIgnacioTestIgnacioTestIgnacioTestIgnacioTestIgnacioTestIgnacioTestIgnacioTestIgnacioTestIgnacioTestIgnacioTestIgnacio")307    createAccount.address.setValue("Alvear");308    createAccount.city.setValue("Rosario");309    createAccount.dropDown.selectByVisibleText("Arizona");310    createAccount.postCode.setValue("33109");311    createAccount.phoneMobile.setValue("3421323123");312    createAccount.submitBtnReg();313    expect(createAccount.alertText()).toEqual("company is too long. Maximum length: 64");314  });315  it("Verify address is required in your address area", () => {316    browser.url("");317    NavSection.submitI();318    createAccount.email.setValue(getRandomEmail());319    createAccount.submitBtnCreate();320    createAccount.submitMr();321    createAccount.customerFirstName.setValue("Ignacio");322    createAccount.lastName.setValue("Carrizo");323    createAccount.passwordCreate.setValue("abc1234");324    createAccount.city.setValue("Rosario");325    createAccount.dropDown.selectByVisibleText("Arizona");326    createAccount.postCode.setValue("33109");327    createAccount.phoneMobile.setValue("3421323123");328    createAccount.submitBtnReg();329    expect(createAccount.alertText()).toEqual("address1 is required.");330  });331  it("Verify address field is not allows to enter more than 128 characters", () => {332    browser.url("");333    NavSection.submitI();334    createAccount.email.setValue(getRandomEmail());335    createAccount.submitBtnCreate();336    createAccount.submitMr();337    createAccount.customerFirstName.setValue("Ignacio");338    createAccount.lastName.setValue("Carrizo");339    createAccount.passwordCreate.setValue("abc1234");340    createAccount.address.setValue("Alvear125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446125487446");341    createAccount.city.setValue("Rosario");342    createAccount.dropDown.selectByVisibleText("Arizona");343    createAccount.postCode.setValue("33109");344    createAccount.phoneMobile.setValue("3421323123");345    createAccount.submitBtnReg();346    expect(createAccount.alertText()).toEqual("address1 is too long. Maximum length: 128");347  });348  it("Verify city field is required in your address area", () => {349    browser.url("");350    NavSection.submitI();351    createAccount.email.setValue(getRandomEmail());352    createAccount.submitBtnCreate();353    createAccount.submitMr();354    createAccount.customerFirstName.setValue("Ignacio");355    createAccount.lastName.setValue("Carrizo");356    createAccount.passwordCreate.setValue("abc1234");357    createAccount.city.setValue("Rosario");358    createAccount.dropDown.selectByVisibleText("Arizona");359    createAccount.postCode.setValue("33109");360    createAccount.phoneMobile.setValue("3421323123");361    createAccount.submitBtnReg();362    expect(createAccount.alertText()).toEqual("address1 is required.");363  });364  it("Verify city field is not allow to enter more than 64 characters in your address area", () => {365    browser.url("");366    NavSection.submitI();367    createAccount.email.setValue(getRandomEmail());368    createAccount.submitBtnCreate();369    createAccount.submitMr();370    createAccount.customerFirstName.setValue("Ignacio");371    createAccount.lastName.setValue("Carrizo");372    createAccount.passwordCreate.setValue("abc1234");373    createAccount.address.setValue("Alvear");374    createAccount.city.setValue("RosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosarioRosario");375    createAccount.dropDown.selectByVisibleText("Arizona");376    createAccount.postCode.setValue("33109");377    createAccount.phoneMobile.setValue("3421323123");378    createAccount.submitBtnReg();379    expect(createAccount.alertText()).toEqual("city is too long. Maximum length: 64");380  });381  it("Verify state field is required in your address area", () => {382    browser.url("");383    NavSection.submitI();384    createAccount.email.setValue(getRandomEmail());385    createAccount.submitBtnCreate();386    createAccount.submitMr();387    createAccount.customerFirstName.setValue("Ignacio");388    createAccount.lastName.setValue("Carrizo");389    createAccount.passwordCreate.setValue("abc1234");390    createAccount.address.setValue("Alvear");391    createAccount.city.setValue("Rosario");392    createAccount.dropDown.selectByVisibleText("-");393    createAccount.postCode.setValue("33109");394    createAccount.phoneMobile.setValue("3421323123");395    createAccount.submitBtnReg();396    expect(createAccount.alertText()).toEqual("This country requires you to choose a State.");397  });398  it("Verify Zip/Psotal code is required in your address area", () => {399    browser.url("");400    NavSection.submitI();401    createAccount.email.setValue(getRandomEmail());402    createAccount.submitBtnCreate();403    createAccount.submitMr();404    createAccount.customerFirstName.setValue("Ignacio");405    createAccount.lastName.setValue("Carrizo");406    createAccount.passwordCreate.setValue("abc1234");407    createAccount.address.setValue("Alvear");408    createAccount.city.setValue("Rosario");409    createAccount.dropDown.selectByVisibleText("Arizona");410    createAccount.phoneMobile.setValue("3421323123");411    createAccount.submitBtnReg();412    expect(createAccount.alertText()).toEqual("The Zip/Postal code you've entered is invalid. It must follow this format: 00000");413  });414  it("Verify Zip/Psotal code is numeric with 5 characters and with format 00000 in your address area", () => {415    browser.url("");416    NavSection.submitI();417    createAccount.email.setValue(getRandomEmail());418    createAccount.submitBtnCreate();419    createAccount.submitMr();420    createAccount.customerFirstName.setValue("Ignacio");421    createAccount.lastName.setValue("Carrizo");422    createAccount.passwordCreate.setValue("abc1234");423    createAccount.address.setValue("Alvear");424    createAccount.city.setValue("Rosario");425    createAccount.dropDown.selectByVisibleText("Arizona");426    createAccount.phoneMobile.setValue("3421323123");427    createAccount.submitBtnReg();428    expect(createAccount.alertText()).toEqual("The Zip/Postal code you've entered is invalid. It must follow this format: 00000");429  });430  it("Verify Zip/Psotal code is not allow to enter more than 5 characters in your address area", () => {431    browser.url("");432    NavSection.submitI();433    createAccount.email.setValue(getRandomEmail());434    createAccount.submitBtnCreate();435    createAccount.submitMr();436    createAccount.customerFirstName.setValue("Ignacio");437    createAccount.lastName.setValue("Carrizo");438    createAccount.passwordCreate.setValue("abc1234");439    createAccount.address.setValue("Alvear");440    createAccount.city.setValue("Rosario");441    createAccount.dropDown.selectByVisibleText("Arizona");442    createAccount.postCode.setValue("331093123");443    createAccount.phoneMobile.setValue("3421323123");444    createAccount.submitBtnReg();445    expect(createAccount.alertText()).toEqual("The Zip/Postal code you've entered is invalid. It must follow this format: 00000");446  });447  it("Verify Zip/Psotal code is not allow to enter less than 5 characters in your address area", () => {448    browser.url("");449    NavSection.submitI();450    createAccount.email.setValue(getRandomEmail());451    createAccount.submitBtnCreate();452    createAccount.submitMr();453    createAccount.customerFirstName.setValue("Ignacio");454    createAccount.lastName.setValue("Carrizo");455    createAccount.passwordCreate.setValue("abc1234");456    createAccount.address.setValue("Alvear");457    createAccount.city.setValue("Rosario");458    createAccount.dropDown.selectByVisibleText("Arizona");459    createAccount.postCode.setValue("3310");460    createAccount.phoneMobile.setValue("3421323123");461    createAccount.submitBtnReg();462    expect(createAccount.alertText()).toEqual("The Zip/Postal code you've entered is invalid. It must follow this format: 00000");463  });464  it("Verify Country is required in your address area", () => {465    browser.url("");466    NavSection.submitI();467    createAccount.email.setValue(getRandomEmail());468    createAccount.submitBtnCreate();469    createAccount.submitMr();470    createAccount.customerFirstName.setValue("Ignacio");471    createAccount.lastName.setValue("Carrizo");472    createAccount.passwordCreate.setValue("abc1234");473    createAccount.address.setValue("Alvear");474    createAccount.city.setValue("Rosario");475    createAccount.dropDown.selectByVisibleText("Arizona");476    createAccount.postCode.setValue("33109");477    createAccount.country.selectByVisibleText("-");478    createAccount.phoneMobile.setValue("3421323123");479    createAccount.submitBtnReg();480    expect(createAccount.alertText()).toEqual("id_country is required.");481  });482  it("Verify additional information is not allow to enter more than 300 characters", () => {483    browser.url("");484    NavSection.submitI();485    createAccount.email.setValue(getRandomEmail());486    createAccount.submitBtnCreate();487    createAccount.submitMr();488    createAccount.customerFirstName.setValue("Ignacio");489    createAccount.lastName.setValue("Carrizo");490    createAccount.passwordCreate.setValue("abc1234");491    createAccount.address.setValue("Alvear");492    createAccount.city.setValue("Rosario");493    createAccount.dropDown.selectByVisibleText("Arizona");494    createAccount.postCode.setValue("33109");495    createAccount.additionalInfo.setValue("TEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300CharacteresTEST300Characteres");496    createAccount.phoneMobile.setValue("3421323123");497    createAccount.submitBtnReg();498    expect(createAccount.alertText()).toEqual("other is too long. Maximum length: 300")499  });500  it("Verify Mobile phone field is required in your address area", () => {501    browser.url("");502    503    NavSection.submitI();504    createAccount.email.setValue(getRandomEmail());505    createAccount.submitBtnCreate();506    createAccount.submitMr();507    createAccount.customerFirstName.setValue("Ignacio");508    createAccount.lastName.setValue("Carrizo");509    createAccount.passwordCreate.setValue("abc1234");510    createAccount.address.setValue("Alvear");511    createAccount.city.setValue("Rosario");512    createAccount.dropDown.selectByVisibleText("Arizona");513    createAccount.postCode.setValue("33109");514    createAccount.submitBtnReg();515    expect(createAccount.alertText()).toEqual("You must register at least one phone number.")516  });517  it("Verify Mobile is not allow to enter characters", () => {518    browser.url("");519    NavSection.submitI();520    createAccount.email.setValue(getRandomEmail());521    createAccount.submitBtnCreate();522    createAccount.submitMr();523    createAccount.customerFirstName.setValue("Ignacio");524    createAccount.lastName.setValue("Carrizo");525    createAccount.passwordCreate.setValue("abc1234");526    createAccount.address.setValue("Alvear");527    createAccount.city.setValue("Rosario");528    createAccount.dropDown.selectByVisibleText("Arizona");529    createAccount.postCode.setValue("33109");530    createAccount.phoneMobile.setValue("asdawdasd");531    createAccount.submitBtnReg();532    expect(createAccount.alertText()).toEqual("phone_mobile is invalid.")533  });534  it("Verify Home phone is not allow to enter characters", () => {535    browser.url("");536    NavSection.submitI();537    createAccount.email.setValue(getRandomEmail());538    createAccount.submitBtnCreate();539    createAccount.submitMr();540    createAccount.customerFirstName.setValue("Ignacio");541    createAccount.lastName.setValue("Carrizo");542    createAccount.passwordCreate.setValue("abc1234");543    createAccount.address.setValue("Alvear");544    createAccount.city.setValue("Rosario");545    createAccount.dropDown.selectByVisibleText("Arizona");546    createAccount.postCode.setValue("33109");547    createAccount.phone.setValue("dadasdawdasd")548    createAccount.phoneMobile.setValue("15516123156");549    createAccount.submitBtnReg();550    expect(createAccount.alertText()).toEqual("phone is invalid.")551  });552  it("Verify behavior of register button", () => {553    browser.url("");554    NavSection.submitI();555    createAccount.email.setValue(getRandomEmail());556    createAccount.submitBtnCreate();557    createAccount.submitMr();558    createAccount.customerFirstName.setValue("Ignacio");559    createAccount.lastName.setValue("Carrizo");560    createAccount.passwordCreate.setValue("abc1234");561    createAccount.address.setValue("Alvear");562    createAccount.city.setValue("Rosario");563    createAccount.dropDown.selectByVisibleText("Arizona");564    createAccount.postCode.setValue("33109");565    createAccount.phoneMobile.setValue("3421323123");566    createAccount.submitBtnReg();567    const title = browser.getTitle();568    569    expect(title).toEqual("My account - My Store");570  });...

Full Screen

Full Screen

RUNAPPLICATIONSUBMITAFTEREVENT.js

Source:RUNAPPLICATIONSUBMITAFTEREVENT.js Github

copy

Full Screen

...276	partialCap = ppartialCap;277	parentCapId = pparentCapId;278	CreatedByACA = pCreatedByACA;279	//reset session variables with the old variables280	aa.env.setValue("AdditionalInfoBuildingCount", OLDAdditionalInfoBuildingCount)281	aa.env.setValue("AdditionalInfoConstructionTypeCode", OLDAdditionalInfoConstructionTypeCode)282	aa.env.setValue("AdditionalInfoHouseCount", OLDAdditionalInfoHouseCount)283	aa.env.setValue("AdditionalInfoPublicOwnedFlag", OLDAdditionalInfoPublicOwnedFlag)284	aa.env.setValue("AdditionalInfoValuation", OLDAdditionalInfoValuation)285	aa.env.setValue("AdditionalInfoWorkDescription", OLDAdditionalInfoWorkDescription)286	aa.env.setValue("AddressCity", OLDAddressCity)287	aa.env.setValue("AddressHouseFraction", OLDAddressHouseFraction)288	aa.env.setValue("AddressHouseNumber", OLDAddressHouseNumber)289	aa.env.setValue("AddressLine1", OLDAddressLine1)290	aa.env.setValue("AddressLine2", OLDAddressLine2)291	aa.env.setValue("AddressPrimaryFlag", OLDAddressPrimaryFlag)292	aa.env.setValue("AddressState", OLDAddressState)293	aa.env.setValue("AddressStreetDirection", OLDAddressStreetDirection)294	aa.env.setValue("AddressStreetName", OLDAddressStreetName)295	aa.env.setValue("AddressStreetSuffix", OLDAddressStreetSuffix)296	aa.env.setValue("AddressType", OLDAddressType)297	aa.env.setValue("AddressUnitNumber", OLDAddressUnitNumber)298	aa.env.setValue("AddressUnitType", OLDAddressUnitType)299	aa.env.setValue("AddressValidatedNumber", OLDAddressValidatedNumber)300	aa.env.setValue("AddressZip", OLDAddressZip)301	aa.env.setValue("AppDetailFirstIssuedDate", OLDAppDetailFirstIssuedDate)302	aa.env.setValue("AppDetailStatusReason", OLDAppDetailStatusReason)303	aa.env.setValue("ApplicantAddressLine1", OLDApplicantAddressLine1)304	aa.env.setValue("ApplicantAddressLine2", OLDApplicantAddressLine2)305	aa.env.setValue("ApplicantAddressLine3", OLDApplicantAddressLine3)306	aa.env.setValue("ApplicantBirthDate", OLDApplicantBirthDate)307	aa.env.setValue("ApplicantBusinessName", OLDApplicantBusinessName)308	aa.env.setValue("ApplicantCity", OLDApplicantCity)309	aa.env.setValue("ApplicantContactAddressModelList", OLDApplicantContactAddressModelList)310	aa.env.setValue("ApplicantContactType", OLDApplicantContactType)311	aa.env.setValue("ApplicantCountry", OLDApplicantCountry)312	aa.env.setValue("ApplicantEmail", OLDApplicantEmail)313	aa.env.setValue("ApplicantFaxCountryCode", OLDApplicantFaxCountryCode)314	aa.env.setValue("ApplicantFirstName", OLDApplicantFirstName)315	aa.env.setValue("ApplicantGender", OLDApplicantGender)316	aa.env.setValue("ApplicantId", OLDApplicantId)317	aa.env.setValue("ApplicantLastName", OLDApplicantLastName)318	aa.env.setValue("ApplicantMiddleName", OLDApplicantMiddleName)319	aa.env.setValue("ApplicantNamesuffix", OLDApplicantNamesuffix)320	aa.env.setValue("ApplicantPhone1", OLDApplicantPhone1)321	aa.env.setValue("ApplicantPhone1CountryCode", OLDApplicantPhone1CountryCode)322	aa.env.setValue("ApplicantPhone2", OLDApplicantPhone2)323	aa.env.setValue("ApplicantPhone2CountryCode", OLDApplicantPhone2CountryCode)324	aa.env.setValue("ApplicantPhone3", OLDApplicantPhone3)325	aa.env.setValue("ApplicantPhone3CountryCode", OLDApplicantPhone3CountryCode)326	aa.env.setValue("ApplicantPostOfficeBox", OLDApplicantPostOfficeBox)327	aa.env.setValue("ApplicantRelation", OLDApplicantRelation)328	aa.env.setValue("ApplicantSalutation", OLDApplicantSalutation)329	aa.env.setValue("ApplicantState", OLDApplicantState)330	aa.env.setValue("ApplicantZip", OLDApplicantZip)331	aa.env.setValue("ApplicationStatus", OLDApplicationStatus)332	aa.env.setValue("ApplicationSubmitMode", OLDApplicationSubmitMode)333	aa.env.setValue("ApplicationTypeLevel1", OLDApplicationTypeLevel1)334	aa.env.setValue("ApplicationTypeLevel2", OLDApplicationTypeLevel2)335	aa.env.setValue("ApplicationTypeLevel3", OLDApplicationTypeLevel3)336	aa.env.setValue("ApplicationTypeLevel4", OLDApplicationTypeLevel4)337	aa.env.setValue("CAEAddressLine1", OLDCAEAddressLine1)338	aa.env.setValue("CAEAddressLine2", OLDCAEAddressLine2)339	aa.env.setValue("CAEAddressLine3", OLDCAEAddressLine3)340	aa.env.setValue("CAEBirthDate", OLDCAEBirthDate)341	aa.env.setValue("CAEBusinessName", OLDCAEBusinessName)342	aa.env.setValue("CAEBusName2", OLDCAEBusName2)343	aa.env.setValue("CAECity", OLDCAECity)344	aa.env.setValue("CAECountry", OLDCAECountry)345	aa.env.setValue("CAECountryCode", OLDCAECountryCode)346	aa.env.setValue("CAEEmail", OLDCAEEmail)347	aa.env.setValue("CAEFirstName", OLDCAEFirstName)348	aa.env.setValue("CAEGender", OLDCAEGender)349	aa.env.setValue("CAELastName", OLDCAELastName)350	aa.env.setValue("CAELienseNumber", OLDCAELienseNumber)351	aa.env.setValue("CAELienseType", OLDCAELienseType)352	aa.env.setValue("CAEMiddleName", OLDCAEMiddleName)353	aa.env.setValue("CAEPhone1", OLDCAEPhone1)354	aa.env.setValue("CAEPhone2", OLDCAEPhone2)355	aa.env.setValue("CAEPhone2CountryCode", OLDCAEPhone2CountryCode)356	aa.env.setValue("CAEPhone3", OLDCAEPhone3)357	aa.env.setValue("CAEPhone3CountryCode", OLDCAEPhone3CountryCode)358	aa.env.setValue("CAEPostOfficeBox", OLDCAEPostOfficeBox)359	aa.env.setValue("CAESalutation", OLDCAESalutation)360	aa.env.setValue("CAEState", OLDCAEState)361	aa.env.setValue("CAESuffixName", OLDCAESuffixName)362	aa.env.setValue("CAETitle", OLDCAETitle)363	aa.env.setValue("CAEValidatedNumber", OLDCAEValidatedNumber)364	aa.env.setValue("CAEZip", OLDCAEZip)365	aa.env.setValue("CapCommentText", OLDCapCommentText)366	aa.env.setValue("ComplainantAddressLine1", OLDComplainantAddressLine1)367	aa.env.setValue("ComplainantAddressLine2", OLDComplainantAddressLine2)368	aa.env.setValue("ComplainantAddressLine3", OLDComplainantAddressLine3)369	aa.env.setValue("ComplainantBusinessName", OLDComplainantBusinessName)370	aa.env.setValue("ComplainantCity", OLDComplainantCity)371	aa.env.setValue("ComplainantContactType", OLDComplainantContactType)372	aa.env.setValue("ComplainantCountry", OLDComplainantCountry)373	aa.env.setValue("ComplainantEmail", OLDComplainantEmail)374	aa.env.setValue("ComplainantFax", OLDComplainantFax)375	aa.env.setValue("ComplainantFirstName", OLDComplainantFirstName)376	aa.env.setValue("ComplainantId", OLDComplainantId)377	aa.env.setValue("ComplainantLastName", OLDComplainantLastName)378	aa.env.setValue("ComplainantMiddleName", OLDComplainantMiddleName)379	aa.env.setValue("ComplainantPhone1", OLDComplainantPhone1)380	aa.env.setValue("ComplainantRelation", OLDComplainantRelation)381	aa.env.setValue("ComplainantState", OLDComplainantState)382	aa.env.setValue("ComplainantZip", OLDComplainantZip)383	aa.env.setValue("ComplaintDate", OLDComplaintDate)384	aa.env.setValue("ComplaintReferenceId1", OLDComplaintReferenceId1)385	aa.env.setValue("ComplaintReferenceId2", OLDComplaintReferenceId2)386	aa.env.setValue("ComplaintReferenceId3", OLDComplaintReferenceId3)387	aa.env.setValue("ComplaintReferenceSource", OLDComplaintReferenceSource)388	aa.env.setValue("ComplaintReferenceType", OLDComplaintReferenceType)389	aa.env.setValue("ContactList", OLDContactList)390	aa.env.setValue("CreatedByACA", OLDCreatedByACA)391	aa.env.setValue("CurrentUserID", OLDCurrentUserID)392	aa.env.setValue("LicProfList", OLDLicProfList)393	aa.env.setValue("OwnerEmail", OLDOwnerEmail)394	aa.env.setValue("OwnerFirstName", OLDOwnerFirstName)395	aa.env.setValue("OwnerFullName", OLDOwnerFullName)396	aa.env.setValue("OwnerLastName", OLDOwnerLastName)397	aa.env.setValue("OwnerMailAddressLine1", OLDOwnerMailAddressLine1)398	aa.env.setValue("OwnerMailAddressLine2", OLDOwnerMailAddressLine2)399	aa.env.setValue("OwnerMailAddressLine3", OLDOwnerMailAddressLine3)400	aa.env.setValue("OwnerMailCity", OLDOwnerMailCity)401	aa.env.setValue("OwnerMailState", OLDOwnerMailState)402	aa.env.setValue("OwnerMailZip", OLDOwnerMailZip)403	aa.env.setValue("OwnerMiddleName", OLDOwnerMiddleName)404	aa.env.setValue("OwnerPhone", OLDOwnerPhone)405	aa.env.setValue("OwnerPrimaryFlag", OLDOwnerPrimaryFlag)406	aa.env.setValue("OwnerValidatedNumber", OLDOwnerValidatedNumber)407	aa.env.setValue("ParcelArea", OLDParcelArea)408	aa.env.setValue("ParcelBlock", OLDParcelBlock)409	aa.env.setValue("ParcelBook", OLDParcelBook)410	aa.env.setValue("ParcelExcemptValue", OLDParcelExcemptValue)411	aa.env.setValue("ParcelImprovedValue", OLDParcelImprovedValue)412	aa.env.setValue("ParcelLandValue", OLDParcelLandValue)413	aa.env.setValue("ParcelLegalDescription", OLDParcelLegalDescription)414	aa.env.setValue("ParcelLot", OLDParcelLot)415	aa.env.setValue("ParcelPage", OLDParcelPage)416	aa.env.setValue("ParcelParcel", OLDParcelParcel)417	aa.env.setValue("ParcelPrimaryFlag", OLDParcelPrimaryFlag)418	aa.env.setValue("ParcelRange", OLDParcelRange)419	aa.env.setValue("ParcelSection", OLDParcelSection)420	aa.env.setValue("ParcelSubdivision", OLDParcelSubdivision)421	aa.env.setValue("ParcelTownship", OLDParcelTownship)422	aa.env.setValue("ParcelTract", OLDParcelTract)423	aa.env.setValue("ParcelValidatedNumber", OLDParcelValidatedNumber)424	aa.env.setValue("ParentCapID", OLDParentCapID)425	aa.env.setValue("PermitId1", OLDPermitId1)426	aa.env.setValue("PermitId2", OLDPermitId2)427	aa.env.setValue("PermitId3", OLDPermitId3)428	aa.env.setValue("RefAddressType", OLDRefAddressType)429	aa.env.setValue("StructEstabScriptList", OLDStructEstabScriptList)430	aa.env.setValue("ViolationAddressLine1", OLDViolationAddressLine1)431	aa.env.setValue("ViolationAddressLine2", OLDViolationAddressLine2)432	aa.env.setValue("ViolationCity", OLDViolationCity)433	aa.env.setValue("ViolationComment", OLDViolationComment)434	aa.env.setValue("ViolationLocation", OLDViolationLocation)435	aa.env.setValue("ViolationState", OLDViolationState)436	aa.env.setValue("ViolationZip", OLDViolationZip)...

Full Screen

Full Screen

letterDictionary.js

Source:letterDictionary.js Github

copy

Full Screen

1class LetterDictionary {2    constructor(lang) {3        this._map = {};4        this.setValue("nl", "A", 1);5        this.setValue("nl", "B", 3);6        this.setValue("nl", "C", 5);7        this.setValue("nl", "D", 2);8        this.setValue("nl", "E", 1);9        this.setValue("nl", "F", 4);10        this.setValue("nl", "G", 3);11        this.setValue("nl", "H", 4);12        this.setValue("nl", "I", 1);13        this.setValue("nl", "J", 4);14        this.setValue("nl", "K", 3);15        this.setValue("nl", "L", 3);16        this.setValue("nl", "M", 3);17        this.setValue("nl", "N", 1);18        this.setValue("nl", "O", 1);19        this.setValue("nl", "P", 3);20        this.setValue("nl", "Q", 10);21        this.setValue("nl", "R", 2);22        this.setValue("nl", "S", 2);23        this.setValue("nl", "T", 2);24        this.setValue("nl", "U", 4);25        this.setValue("nl", "V", 4);26        this.setValue("nl", "W", 5);27        this.setValue("nl", "X", 8);28        this.setValue("nl", "Y", 8);29        this.setValue("nl", "Z", 4);30        this.setValue("nl", this.wildCard, 0);31        //en - English32        this.setValue("en", "A", 1);33        this.setValue("en", "B", 3);34        this.setValue("en", "C", 3);35        this.setValue("en", "D", 2);36        this.setValue("en", "E", 1);37        this.setValue("en", "F", 4);38        this.setValue("en", "G", 2);39        this.setValue("en", "H", 4);40        this.setValue("en", "I", 1);41        this.setValue("en", "J", 8);42        this.setValue("en", "K", 5);43        this.setValue("en", "L", 1);44        this.setValue("en", "M", 3);45        this.setValue("en", "N", 1);46        this.setValue("en", "O", 1);47        this.setValue("en", "P", 3);48        this.setValue("en", "Q", 10);49        this.setValue("en", "R", 1);50        this.setValue("en", "S", 1);51        this.setValue("en", "T", 1);52        this.setValue("en", "U", 1);53        this.setValue("en", "V", 4);54        this.setValue("en", "W", 4);55        this.setValue("en", "X", 8);56        this.setValue("en", "Y", 4);57        this.setValue("en", "Z", 10);58        this.setValue("en", this.wildCard, 0);59        //de - German60        this.setValue("de", "A", 1);61        this.setValue("de", "Ä", 6);62        this.setValue("de", "B", 3);63        this.setValue("de", "C", 4);64        this.setValue("de", "D", 1);65        this.setValue("de", "E", 1);66        this.setValue("de", "F", 4);67        this.setValue("de", "G", 2);68        this.setValue("de", "H", 2);69        this.setValue("de", "I", 1);70        this.setValue("de", "J", 6);71        this.setValue("de", "K", 4);72        this.setValue("de", "L", 2);73        this.setValue("de", "M", 3);74        this.setValue("de", "N", 1);75        this.setValue("de", "O", 2);76        this.setValue("de", "Ö", 8);77        this.setValue("de", "P", 4);78        this.setValue("de", "Q", 10);79        this.setValue("de", "R", 1);80        this.setValue("de", "S", 1);81        this.setValue("de", "T", 1);82        this.setValue("de", "U", 1);83        this.setValue("de", "Ü", 6);84        this.setValue("de", "V", 6);85        this.setValue("de", "W", 3);86        this.setValue("de", "X", 8);87        this.setValue("de", "Y", 10);88        this.setValue("de", "Z", 3);89        this.setValue("de", this.wildCard, 0);90        //fr - French91        this.setValue("fr", "A", 1);92        this.setValue("fr", "B", 3);93        this.setValue("fr", "C", 3);94        this.setValue("fr", "D", 2);95        this.setValue("fr", "E", 1);96        this.setValue("fr", "F", 4);97        this.setValue("fr", "G", 2);98        this.setValue("fr", "H", 4);99        this.setValue("fr", "I", 1);100        this.setValue("fr", "J", 8);101        this.setValue("fr", "K", 10);102        this.setValue("fr", "L", 1);103        this.setValue("fr", "M", 2);104        this.setValue("fr", "N", 1);105        this.setValue("fr", "O", 1);106        this.setValue("fr", "P", 3);107        this.setValue("fr", "Q", 8);108        this.setValue("fr", "R", 1);109        this.setValue("fr", "S", 1);110        this.setValue("fr", "T", 1);111        this.setValue("fr", "U", 1);112        this.setValue("fr", "V", 4);113        this.setValue("fr", "W", 10);114        this.setValue("fr", "X", 10);115        this.setValue("fr", "Y", 10);116        this.setValue("fr", "Z", 10);117        this.setValue("fr", this.wildCard, 0);118        //es - Spanish119        this.setValue("es", "A", 1);120        this.setValue("es", "B", 3);121        this.setValue("es", "C", 3);122        this.setValue("es", "CH", 5);123        this.setValue("es", "D", 2);124        this.setValue("es", "E", 1);125        this.setValue("es", "F", 4);126        this.setValue("es", "G", 2);127        this.setValue("es", "H", 4);128        this.setValue("es", "I", 1);129        this.setValue("es", "J", 8);130        this.setValue("es", "L", 1);131        this.setValue("es", "LL", 8);132        this.setValue("es", "M", 3);133        this.setValue("es", "N", 1);134        this.setValue("es", "Ñ", 8);135        this.setValue("es", "O", 1);136        this.setValue("es", "P", 3);137        this.setValue("es", "Q", 5);138        this.setValue("es", "R", 1);139        this.setValue("es", "RR", 8);140        this.setValue("es", "S", 1);141        this.setValue("es", "T", 1);142        this.setValue("es", "U", 1);143        this.setValue("es", "V", 4);144        this.setValue("es", "X", 8);145        this.setValue("es", "Y", 4);146        this.setValue("es", "Z", 10);147        this.setValue("es", this.wildCard, 0);148        //it - Italian149        this.setValue("it", "A", 1);150        this.setValue("it", "B", 5);151        this.setValue("it", "C", 2);152        this.setValue("it", "D", 5);153        this.setValue("it", "E", 1);154        this.setValue("it", "F", 5);155        this.setValue("it", "G", 8);156        this.setValue("it", "H", 8);157        this.setValue("it", "I", 1);158        this.setValue("it", "L", 3);159        this.setValue("it", "M", 3);160        this.setValue("it", "N", 3);161        this.setValue("it", "O", 1);162        this.setValue("it", "P", 5);163        this.setValue("it", "Q", 10);164        this.setValue("it", "R", 2);165        this.setValue("it", "S", 2);166        this.setValue("it", "T", 2);167        this.setValue("it", "U", 3);168        this.setValue("it", "V", 5);169        this.setValue("it", "Z", 8);170        this.setValue("it", this.wildCard, 0);171        //sv - Swedish172        this.setValue("sv", "A", 1);173        this.setValue("sv", "Å", 4);174        this.setValue("sv", "Ä", 3);175        this.setValue("sv", "B", 4);176        this.setValue("sv", "C", 8);177        this.setValue("sv", "D", 1);178        this.setValue("sv", "E", 1);179        this.setValue("sv", "F", 3);180        this.setValue("sv", "G", 2);181        this.setValue("sv", "H", 2);182        this.setValue("sv", "I", 1);183        this.setValue("sv", "J", 5);184        this.setValue("sv", "K", 2);185        this.setValue("sv", "L", 1);186        this.setValue("sv", "M", 2);187        this.setValue("sv", "N", 1);188        this.setValue("sv", "O", 2);189        this.setValue("sv", "Ö", 4);190        this.setValue("sv", "P", 4);191        this.setValue("sv", "Q", 0);192        this.setValue("sv", "R", 1);193        this.setValue("sv", "S", 1);194        this.setValue("sv", "T", 1);195        this.setValue("sv", "U", 3);196        this.setValue("sv", "Ü", 0);197        this.setValue("sv", "V", 3);198        this.setValue("sv", "W", 0);199        this.setValue("sv", "X", 8);200        this.setValue("sv", "Y", 7);201        this.setValue("sv", "Z", 8);202        this.setValue("sv", this.wildCard, 0);203        //dk - Danish204        this.setValue("dk", "A", 1);205        this.setValue("dk", "Å", 4);206        this.setValue("dk", "B", 3);207        this.setValue("dk", "C", 8);208        this.setValue("dk", "D", 2);209        this.setValue("dk", "E", 1);210        this.setValue("dk", "Æ", 4);211        this.setValue("dk", "F", 3);212        this.setValue("dk", "G", 3);213        this.setValue("dk", "H", 4);214        this.setValue("dk", "I", 3);215        this.setValue("dk", "J", 4);216        this.setValue("dk", "K", 3);217        this.setValue("dk", "L", 2);218        this.setValue("dk", "M", 3);219        this.setValue("dk", "N", 1);220        this.setValue("dk", "O", 2);221        this.setValue("dk", "Ø", 4);222        this.setValue("dk", "P", 4);223        this.setValue("dk", "Q", 0);224        this.setValue("dk", "R", 1);225        this.setValue("dk", "S", 2);226        this.setValue("dk", "T", 2);227        this.setValue("dk", "U", 3);228        this.setValue("dk", "Ü", 0);229        this.setValue("dk", "V", 3);230        this.setValue("dk", "W", 0);231        this.setValue("dk", "X", 8);232        this.setValue("dk", "Y", 4);233        this.setValue("dk", "Z", 8);234        this.setValue("dk", this.wildCard, 0);235        //no - Norwegian236        this.setValue("no", "A", 1);237        this.setValue("no", "Å", 4);238        this.setValue("no", "B", 4);239        this.setValue("no", "C", 10);240        this.setValue("no", "D", 1);241        this.setValue("no", "E", 1);242        this.setValue("no", "Æ", 6);243        this.setValue("no", "F", 2);244        this.setValue("no", "G", 2);245        this.setValue("no", "H", 3);246        this.setValue("no", "I", 1);247        this.setValue("no", "J", 4);248        this.setValue("no", "K", 2);249        this.setValue("no", "L", 1);250        this.setValue("no", "M", 2);251        this.setValue("no", "N", 1);252        this.setValue("no", "O", 2);253        this.setValue("no", "Ø", 5);254        this.setValue("no", "P", 4);255        this.setValue("no", "Q", 0);256        this.setValue("no", "R", 1);257        this.setValue("no", "S", 2);258        this.setValue("no", "T", 1);259        this.setValue("no", "U", 4);260        this.setValue("no", "Ü", 0);261        this.setValue("no", "V", 4);262        this.setValue("no", "W", 8);263        this.setValue("no", "X", 0);264        this.setValue("no", "Y", 6);265        this.setValue("no", "Z", 0);266        this.setValue("no", this.wildCard, 0);267        //cs - Czech268        this.setValue("cs", "A", 1);269        this.setValue("cs", "Á", 2);270        this.setValue("cs", "B", 3);271        this.setValue("cs", "C", 2);272        this.setValue("cs", "Č", 4);273        this.setValue("cs", "D", 1);274        this.setValue("cs", "Ď", 8);275        this.setValue("cs", "E", 1);276        this.setValue("cs", "É", 3);277        this.setValue("cs", "Ě", 3);278        this.setValue("cs", "F", 5);279        this.setValue("cs", "G", 5);280        this.setValue("cs", "H", 2);281        this.setValue("cs", "I", 1);282        this.setValue("cs", "Í", 2);283        this.setValue("cs", "J", 2);284        this.setValue("cs", "K", 1);285        this.setValue("cs", "L", 1);286        this.setValue("cs", "M", 2);287        this.setValue("cs", "N", 1);288        this.setValue("cs", "Ň", 6);289        this.setValue("cs", "O", 1);290        this.setValue("cs", "Ó", 7);291        this.setValue("cs", "P", 1);292        this.setValue("cs", "R", 1);293        this.setValue("cs", "Ř", 4);294        this.setValue("cs", "S", 1);295        this.setValue("cs", "Š", 4);296        this.setValue("cs", "T", 1);297        this.setValue("cs", "Ť", 7);298        this.setValue("cs", "U", 2);299        this.setValue("cs", "Ů", 4);300        this.setValue("cs", "Ú", 5);301        this.setValue("cs", "V", 1);302        this.setValue("cs", "X", 10);303        this.setValue("cs", "Y", 2);304        this.setValue("cs", "Ý", 4);305        this.setValue("cs", "Z", 2);306        this.setValue("cs", "Ž", 4);307        this.setValue("cs", this.wildCard, 0);308        //tr - Turkish309        this.setValue("tr", "A", 1);310        this.setValue("tr", "E", 1);311        this.setValue("tr", "İ", 1);312        this.setValue("tr", "K", 1);313        this.setValue("tr", "L", 1);314        this.setValue("tr", "R", 1);315        this.setValue("tr", "N", 1);316        this.setValue("tr", "T", 1);317        this.setValue("tr", "I", 2);318        this.setValue("tr", "M", 2);319        this.setValue("tr", "O", 2);320        this.setValue("tr", "S", 2);321        this.setValue("tr", "U", 2);322        this.setValue("tr", "B", 3);323        this.setValue("tr", "D", 3);324        this.setValue("tr", "Y", 3);325        this.setValue("tr", "Ü", 3);326        this.setValue("tr", "C", 4);327        this.setValue("tr", "Ş", 4);328        this.setValue("tr", "Z", 4);329        this.setValue("tr", "Ç", 4);330        this.setValue("tr", "H", 5);331        this.setValue("tr", "P", 5);332        this.setValue("tr", "G", 5);333        this.setValue("tr", "F", 7);334        this.setValue("tr", "V", 7);335        this.setValue("tr", "Ö", 7);336        this.setValue("tr", "Ğ", 8);337        this.setValue("tr", "J", 10);338        this.setValue("tr", this.wildCard, 0);339        this.setLang(lang || 'nl');340    }341    setValue(lang, symbol, value) {342        if (typeof(this._map[lang]) === 'undefined') {343            this._map[lang] = {}344        }345        this._map[lang][symbol] = value;346    }347    setLang(lang) {348        this._lang = lang;349    }350    get symbols() {351        var symbols = Object.keys(this._map[this._lang]);352        symbols.pop(); //remove the wildcard353        return symbols;354    }355    get values() {...

Full Screen

Full Screen

editar-propiedades.component.ts

Source:editar-propiedades.component.ts Github

copy

Full Screen

...65            this._propiedadService.getPropiedad(id).subscribe(66                response => {67                    this.propiedad = response;68                    for (let i in this.propiedad) {69                        this.propertyForm.get('nombre').setValue(this.propiedad[i].nombre);70                        this.propertyForm.get('descripcion').setValue(this.propiedad[i].descripcion);71                        this.propertyForm.get('personas').setValue(this.propiedad[i].personas);72                        if (this.propiedad[i].access == "true") {73                            this.propertyForm.get('access').setValue(true);74                        } else {75                            this.propertyForm.get('access').setValue(false);76                        }77                        if (this.propiedad[i].salas_reuniones == "true") {78                            this.propertyForm.get('salas_reuniones').setValue(true);79                        } else {80                            this.propertyForm.get('salas_reuniones').setValue(false);81                        }82                        if (this.propiedad[i].reception == "true") {83                            this.propertyForm.get('reception').setValue(true);84                        } else {85                            this.propertyForm.get('reception').setValue(false);86                        }87                        if (this.propiedad[i].eventos_network == "true") {88                            this.propertyForm.get('eventos_network').setValue(true);89                        } else {90                            this.propertyForm.get('eventos_network').setValue(false);91                        }92                        if (this.propiedad[i].terraza == "true") {93                            this.propertyForm.get('terraza').setValue(true);94                        } else {95                            this.propertyForm.get('terraza').setValue(false);96                        }97                        if (this.propiedad[i].cafe_relax == "true") {98                            this.propertyForm.get('cafe_relax').setValue(true);99                        } else {100                            this.propertyForm.get('cafe_relax').setValue(false);101                        }102                        if (this.propiedad[i].seguridad == "true") {103                            this.propertyForm.get('seguridad').setValue(true);104                        } else {105                            this.propertyForm.get('seguridad').setValue(false);106                        }107                        if (this.propiedad[i].limpieza == "true") {108                            this.propertyForm.get('limpieza').setValue(true);109                        } else {110                            this.propertyForm.get('limpieza').setValue(false);111                        }112                        if (this.propiedad[i].cer_energetica == "true") {113                            this.propertyForm.get('cer_energetica').setValue(true);114                        } else {115                            this.propertyForm.get('cer_energetica').setValue(false);116                        }117                        if (this.propiedad[i].paqueteria == "true") {118                            this.propertyForm.get('paqueteria').setValue(true);119                        } else {120                            this.propertyForm.get('paqueteria').setValue(false);121                        }122                        if (this.propiedad[i].parking == "true") {123                            this.propertyForm.get('parking').setValue(true);124                        } else {125                            this.propertyForm.get('parking').setValue(false);126                        }127                        if (this.propiedad[i].wifi == "true") {128                            this.propertyForm.get('wifi').setValue(true);129                        } else {130                            this.propertyForm.get('wifi').setValue(false);131                        }132                        if (this.propiedad[i].coworking == "true") {133                            this.propertyForm.get('coworking').setValue(true);134                        } else {135                            this.propertyForm.get('coworking').setValue(false);136                        }137                        this.propertyForm.get('tarifa').setValue(this.propiedad[i].tarifa);138                        this.propertyForm.get('tipo_propiedad').setValue(this.propiedad[i].tipo_propiedad);139                        this.propertyForm.get('direccion').setValue(this.propiedad[i].direccion);140                        this.propertyForm.get('ciudad').setValue(this.propiedad[i].ciudad);141                        this.propertyForm.get('comunidad_autonoma').setValue(this.propiedad[i].comunidad_autonoma);142                        this.propertyForm.get('telefono').setValue(this.propiedad[i].telefono);143                    }144                }, error => {145                    console.log(<any>error);146                }147            );148        });149    }150    onSubmit() {151        this._route.params.forEach((params: Params) => {152            let id = params['id'];153            if (this.propertyForm.get('access').value == true) {154                this.propertyForm.get('access').setValue("true");155            } else {156                this.propertyForm.get('access').setValue("false");157            }158            if (this.propertyForm.get('salas_reuniones').value == true) {159                this.propertyForm.get('salas_reuniones').setValue("true");160            } else {161                this.propertyForm.get('salas_reuniones').setValue("false");162            }163            if (this.propertyForm.get('reception').value == true) {164                this.propertyForm.get('reception').setValue("true");165            } else {166                this.propertyForm.get('reception').setValue("false");167            }168            if (this.propertyForm.get('eventos_network').value == true) {169                this.propertyForm.get('eventos_network').setValue("true");170            } else {171                this.propertyForm.get('eventos_network').setValue("false");172            }173            if (this.propertyForm.get('terraza').value == true) {174                this.propertyForm.get('terraza').setValue("true");175            } else {176                this.propertyForm.get('terraza').setValue("false");177            }178            if (this.propertyForm.get('cafe_relax').value == true) {179                this.propertyForm.get('cafe_relax').setValue("true");180            } else {181                this.propertyForm.get('cafe_relax').setValue("false");182            }183            if (this.propertyForm.get('seguridad').value == true) {184                this.propertyForm.get('seguridad').setValue("true");185            } else {186                this.propertyForm.get('seguridad').setValue("false");187            }188            if (this.propertyForm.get('limpieza').value == true) {189                this.propertyForm.get('limpieza').setValue("true");190            } else {191                this.propertyForm.get('limpieza').setValue("false");192            }193            if (this.propertyForm.get('cer_energetica').value == true) {194                this.propertyForm.get('cer_energetica').setValue("true");195            } else {196                this.propertyForm.get('cer_energetica').setValue("false");197            }198            if (this.propertyForm.get('paqueteria').value == true) {199                this.propertyForm.get('paqueteria').setValue("true");200            } else {201                this.propertyForm.get('paqueteria').setValue("false");202            }203            if (this.propertyForm.get('parking').value == true) {204                this.propertyForm.get('parking').setValue("true");205            } else {206                this.propertyForm.get('parking').setValue("false");207            }208            if (this.propertyForm.get('wifi').value == true) {209                this.propertyForm.get('wifi').setValue("true");210            } else {211                this.propertyForm.get('wifi').setValue("false");212            }213            if (this.propertyForm.get('coworking').value == true) {214                this.propertyForm.get('coworking').setValue("true");215            } else {216                this.propertyForm.get('coworking').setValue("false");217            }218            this._propiedadService.editPropiedad(id, this.propertyForm.value).subscribe(219                result => {220                    this._router.navigate(['/dashboard/listPropertys']);221                },222                error => {223                    console.log(<any>error);224                }225            );226        });227    }228    fileChangeEvent(fileInput: any) {229        this.filesToUpload = <File>fileInput.target.files[0];230    }...

Full Screen

Full Screen

formats.js

Source:formats.js Github

copy

Full Screen

1module('Formats', {2    setup: function(){3        this.input = $('<input type="text">').appendTo('#qunit-fixture');4        this.date = UTCDate(2012, 2, 15, 0, 0, 0, 0); // March 15, 20125    },6    teardown: function(){7        this.input.data('datepicker').picker.remove();8    }9});10test('d: Day of month, no leading zero.', function(){11    this.input12        .val('2012-03-05')13        .datepicker({format: 'yyyy-mm-d'})14        .datepicker('setValue');15    equal(this.input.val().split('-')[2], '5');16});17test('dd: Day of month, leading zero.', function(){18    this.input19        .val('2012-03-5')20        .datepicker({format: 'yyyy-mm-dd'})21        .datepicker('setValue');22    equal(this.input.val().split('-')[2], '05');23});24test('D: Day of week, short.', function(){25    this.input26        .val('2012-03-05')27        .datepicker({format: 'yyyy-mm-dd-D'})28        .datepicker('setValue');29    equal(this.input.val().split('-')[3], 'Mon');30});31test('DD: Day of week, long.', function(){32    this.input33        .val('2012-03-05')34        .datepicker({format: 'yyyy-mm-dd-DD'})35        .datepicker('setValue');36    equal(this.input.val().split('-')[3], 'Monday');37});38test('m: Month, no leading zero.', function(){39    this.input40        .val('2012-03-05')41        .datepicker({format: 'yyyy-m-dd'})42        .datepicker('setValue');43    equal(this.input.val().split('-')[1], '3');44});45test('mm: Month, leading zero.', function(){46    this.input47        .val('2012-3-5')48        .datepicker({format: 'yyyy-mm-dd'})49        .datepicker('setValue');50    equal(this.input.val().split('-')[1], '03');51});52test('M: Month shortname.', function(){53    this.input54        .val('2012-Mar-05')55        .datepicker({format: 'yyyy-M-dd'})56        .datepicker('setValue');57    equal(this.input.val().split('-')[1], 'Mar');58});59test('M: Month shortname case insensitive.', function(){60    this.input61        .val('2012-MAR-05')62        .datepicker({format: 'yyyy-M-dd'})63        .datepicker('setValue');64    equal(this.input.val().split('-')[1], 'Mar');65});66test('MM: Month full name.', function(){67    this.input68        .val('2012-March-5')69        .datepicker({format: 'yyyy-MM-dd'})70        .datepicker('setValue');71    equal(this.input.val().split('-')[1], 'March');72});73test('M: Month fullname case insensitive.', function(){74    this.input75        .val('2012-MARCH-05')76        .datepicker({format: 'yyyy-MM-dd'})77        .datepicker('setValue');78    equal(this.input.val().split('-')[1], 'March');79});80test('yy: Year, two-digit.', function(){81    this.input82        .val('2012-03-05')83        .datepicker({format: 'yy-mm-dd'})84        .datepicker('setValue');85    equal(this.input.val().split('-')[0], '12');86});87test('yyyy: Year, four-digit.', function(){88    this.input89        .val('2012-03-5')90        .datepicker({format: 'yyyy-mm-dd'})91        .datepicker('setValue');92    equal(this.input.val().split('-')[0], '2012');93});94test('dd-mm-yyyy: Regression: Prevent potential month overflow in small-to-large formats (Mar 31, 2012 -> Mar 01, 2012)', function(){95    this.input96        .val('31-03-2012')97        .datepicker({format: 'dd-mm-yyyy'})98        .datepicker('setValue');99    equal(this.input.val(), '31-03-2012');100});101test('dd-mm-yyyy: Leap day', function(){102    this.input103        .val('29-02-2012')104        .datepicker({format: 'dd-mm-yyyy'})105        .datepicker('setValue');106    equal(this.input.val(), '29-02-2012');107});108test('yyyy-mm-dd: Alternative format', function(){109    this.input110        .val('2012-02-12')111        .datepicker({format: 'yyyy-mm-dd'})112        .datepicker('setValue');113    equal(this.input.val(), '2012-02-12');114});115test('yyyy-MM-dd: Regression: Infinite loop when numbers used for month', function(){116    this.input117        .val('2012-02-12')118        .datepicker({format: 'yyyy-MM-dd'})119        .datepicker('setValue');120    equal(this.input.val(), '2012-February-12');121});122test('+1d: Tomorrow', patch_date(function(Date){123    Date.now = UTCDate(2012, 2, 15);124    this.input125        .val('+1d')126        .datepicker({format: 'dd-mm-yyyy'})127        .datepicker('setValue');128    equal(this.input.val(), '16-03-2012');129}));130test('tomorrow (alias for +1d): Tomorrow', patch_date(function(Date){131    Date.now = UTCDate(2012, 2, 15);132    this.input133        .val('tomorrow')134        .datepicker({format: 'dd-mm-yyyy'})135        .datepicker('setValue');136    equal(this.input.val(), '16-03-2012');137}));138test('-1d: Yesterday', patch_date(function(Date){139    Date.now = UTCDate(2012, 2, 15);140    this.input141        .val('-1d')142        .datepicker({format: 'dd-mm-yyyy'})143        .datepicker('setValue');144    equal(this.input.val(), '14-03-2012');145}));146test('yesterday (alias for -1d): Yesterday', patch_date(function(Date){147    Date.now = UTCDate(2012, 2, 15);148    this.input149        .val('yesterday')150        .datepicker({format: 'dd-mm-yyyy'})151        .datepicker('setValue');152    equal(this.input.val(), '14-03-2012');153}));154test('+1w: Next week', patch_date(function(Date){155    Date.now = UTCDate(2012, 2, 15);156    this.input157        .val('+1w')158        .datepicker({format: 'dd-mm-yyyy'})159        .datepicker('setValue');160    equal(this.input.val(), '22-03-2012');161}));162test('-1w: Last week', patch_date(function(Date){163    Date.now = UTCDate(2012, 2, 15);164    this.input165        .val('-1w')166        .datepicker({format: 'dd-mm-yyyy'})167        .datepicker('setValue');168    equal(this.input.val(), '08-03-2012');169}));170test('+1m: Next month', patch_date(function(Date){171    Date.now = UTCDate(2012, 2, 15);172    this.input173        .val('+1m')174        .datepicker({format: 'dd-mm-yyyy'})175        .datepicker('setValue');176    equal(this.input.val(), '15-04-2012');177}));178test('-1m: Last month', patch_date(function(Date){179    Date.now = UTCDate(2012, 2, 15);180    this.input181        .val('-1m')182        .datepicker({format: 'dd-mm-yyyy'})183        .datepicker('setValue');184    equal(this.input.val(), '15-02-2012');185}));186test('+1y: Next year', patch_date(function(Date){187    Date.now = UTCDate(2012, 2, 15);188    this.input189        .val('+1y')190        .datepicker({format: 'dd-mm-yyyy'})191        .datepicker('setValue');192    equal(this.input.val(), '15-03-2013');193}));194test('-1y: Last year', patch_date(function(Date){195    Date.now = UTCDate(2012, 2, 15);196    this.input197        .val('-1y')198        .datepicker({format: 'dd-mm-yyyy'})199        .datepicker('setValue');200    equal(this.input.val(), '15-03-2011');201}));202test('-1y +2m: Multiformat', patch_date(function(Date){203    Date.now = UTCDate(2012, 2, 15);204    this.input205        .val('-1y +2m')206        .datepicker({format: 'dd-mm-yyyy'})207        .datepicker('setValue');208    equal(this.input.val(), '15-05-2011');209}));210test('Regression: End-of-month bug', patch_date(function(Date){211    Date.now = UTCDate(2012, 4, 31);212    this.input213        .val('29-02-2012')214        .datepicker({format: 'dd-mm-yyyy'})215        .datepicker('setValue');216    equal(this.input.val(), '29-02-2012');217}));218test('Invalid formats are force-parsed into a valid date on tab', patch_date(function(Date){219    Date.now = UTCDate(2012, 4, 31);220    this.input221        .val('44-44-4444')222        .datepicker({format: 'yyyy-MM-dd'})223        .focus();224    this.input.trigger({225        type: 'keydown',226        keyCode: 9227    });228    equal(this.input.val(), '56-September-30');229}));230test('Trailing separators', patch_date(function(Date){231    Date.now = UTCDate(2012, 4, 31);232    this.input233        .val('29.02.2012.')234        .datepicker({format: 'dd.mm.yyyy.'})235        .datepicker('setValue');236    equal(this.input.val(), '29.02.2012.');237}));238test('Assume nearby year - last century', patch_date(function(Date){239    Date.now = UTCDate(2012, 4, 31);240    this.input241        .val('02/14/91')242        .datepicker({format: 'mm/dd/yyyy', assumeNearbyYear: true})243        .datepicker('setValue');244    equal(this.input.val(), '02/14/1991');245}));246test('Assume nearby year - this century (- 1 year)', patch_date(function(Date){247    Date.now = UTCDate(2012, 4, 31);248    this.input249        .val('02/14/01')250        .datepicker({format: 'mm/dd/yyyy', assumeNearbyYear: true})251        .datepicker('setValue');252    equal(this.input.val(), '02/14/2001');253}));254test('Assume nearby year - this century (+ 7 years)', patch_date(function(Date){255    Date.now = UTCDate(2012, 4, 31);256    this.input257        .val('02/14/19')258        .datepicker({format: 'mm/dd/yyyy', assumeNearbyYear: true})259        .datepicker('setValue');260    equal(this.input.val(), '02/14/2019');261}));262test('Assume nearby year - this century (+ 13 years)', patch_date(function(Date){263    Date.now = UTCDate(2012, 4, 31);264    this.input265        .val('02/14/23')266        .datepicker({format: 'mm/dd/yyyy', assumeNearbyYear: true})267        .datepicker('setValue');268    equal(this.input.val(), '02/14/1923');269}));270test('Assume nearby year - this century (+ 13 years, threshold = 30)', patch_date(function(Date){271    Date.now = UTCDate(2012, 4, 31);272    this.input273        .val('02/14/23')274        .datepicker({format: 'mm/dd/yyyy', assumeNearbyYear: 30})275        .datepicker('setValue');276    equal(this.input.val(), '02/14/2023');...

Full Screen

Full Screen

state.test.js

Source:state.test.js Github

copy

Full Screen

1import {test} from '../../util/test';2import {ClearColor, ClearDepth, ClearStencil, ColorMask, DepthMask, StencilMask, StencilFunc, StencilOp, StencilTest, DepthRange, DepthTest, DepthFunc, Blend, BlendFunc, BlendColor, Program, ActiveTextureUnit, Viewport, BindFramebuffer, BindRenderbuffer, BindTexture, BindVertexBuffer, BindElementBuffer, BindVertexArrayOES, PixelStoreUnpack, PixelStoreUnpackPremultiplyAlpha} from '../../../src/gl/value';3import Context from '../../../src/gl/context';4import Color from '../../../src/style-spec/util/color';5import {deepEqual} from '../../../src/util/util';6const context = new Context(require('gl')(10, 10));7function ValueTest(Constructor, options, t) {8    t.test('#constructor', (t) => {9        const v = new Constructor(context);10        t.ok(v);11        const currentV = v.get();12        t.notEqual(typeof currentV, 'undefined', 'instantiates with a default value');13        t.end();14    });15    t.test('#set', (t) => {16        const v = new Constructor(context);17        v.set(options.setValue);18        const equality = (options.equality) || ((a, b) => deepEqual(a, b));19        t.ok(equality(v.get(), options.setValue));20        t.end();21    });22    t.end();23}24test('ClearColor', ValueTest.bind(ValueTest, ClearColor, {25    setValue: new Color(1, 1, 0, 1)26}));27test('ClearDepth', ValueTest.bind(ValueTest, ClearDepth, {28    setValue: 0.529}));30test('ClearStencil', ValueTest.bind(ValueTest, ClearStencil, {31    setValue: 0.532}));33test('ColorMask', ValueTest.bind(ValueTest, ColorMask, {34    setValue: [false, false, true, true]35}));36test('DepthMask', ValueTest.bind(ValueTest, DepthMask, {37    setValue: false38}));39test('StencilMask', ValueTest.bind(ValueTest, StencilMask, {40    setValue: [0x00, 4]41}));42test('StencilFunc', ValueTest.bind(ValueTest, StencilFunc, {43    setValue: {44        func: context.gl.LEQUAL,45        ref: 1,46        mask: 0xFF47    }48}));49test('StencilOp', ValueTest.bind(ValueTest, StencilOp, {50    setValue: [context.gl.KEEP, context.gl.REPLACE, context.gl.REPLACE]51}));52test('StencilTest', ValueTest.bind(ValueTest, StencilTest, {53    setValue: true54}));55test('DepthRange', ValueTest.bind(ValueTest, DepthRange, {56    setValue: [0, 0.1]57}));58test('DepthTest', ValueTest.bind(ValueTest, DepthTest, {59    setValue: true60}));61test('DepthFunc', ValueTest.bind(ValueTest, DepthFunc, {62    setValue: context.gl.EQUAL63}));64test('Blend', ValueTest.bind(ValueTest, Blend, {65    setValue: false66}));67test('BlendFunc', ValueTest.bind(ValueTest, BlendFunc, {68    setValue: [context.gl.SRC_ALPHA, context.gl.SRC_ALPHA]69}));70test('BlendColor', ValueTest.bind(ValueTest, BlendColor, {71    setValue: Color.white72}));73test('Program', ValueTest.bind(ValueTest, Program, {74    equality: (a, b) => a === b,75    setValue: context.gl.createProgram()76}));77test('ActiveTextureUnit', ValueTest.bind(ValueTest, ActiveTextureUnit, {78    setValue: context.gl.TEXTURE179}));80test('Viewport', ValueTest.bind(ValueTest, Viewport, {81    setValue: [0, 0, 1, 1]82}));83test('BindFramebuffer', ValueTest.bind(ValueTest, BindFramebuffer, {84    equality: (a, b) => a === b,85    setValue: context.gl.createFramebuffer()86}));87test('BindRenderbuffer', ValueTest.bind(ValueTest, BindRenderbuffer, {88    equality: (a, b) => a === b,89    setValue: context.gl.createRenderbuffer()90}));91test('BindTexture', ValueTest.bind(ValueTest, BindTexture, {92    equality: (a, b) => a === b,93    setValue: context.gl.createTexture()94}));95test('BindVertexBuffer', ValueTest.bind(ValueTest, BindVertexBuffer, {96    equality: (a, b) => a === b,97    setValue: context.gl.createBuffer()98}));99test('BindElementBuffer', ValueTest.bind(ValueTest, BindElementBuffer, {100    equality: (a, b) => a === b,101    setValue: context.gl.createBuffer()102}));103test('BindVertexArrayOES', ValueTest.bind(ValueTest, BindVertexArrayOES, {104    equality: (a, b) => a === b,105    setValue: context.extVertexArrayObject106}));107test('PixelStoreUnpack', ValueTest.bind(ValueTest, PixelStoreUnpack, {108    setValue: 8109}));110test('PixelStoreUnpackPremultiplyAlpha', ValueTest.bind(ValueTest, PixelStoreUnpackPremultiplyAlpha, {111    setValue: true...

Full Screen

Full Screen

App.js

Source:App.js Github

copy

Full Screen

1import React, { useState } from "react";2import { ThemeProvider } from "@material-ui/styles";3import { BrowserRouter, Route, Switch } from "react-router-dom";4import theme from "./ui/Theme";5import Header from "./ui/Header";6import Footer from "./ui/Footer";7import LandingPage from "./LandingPage";8import Services from "./Services";9import CustomSoftware from "./CustomSoftware";10import MobileApps from "./MobileApps";11import Websites from "./Websites";12import Revolution from "./Revolution";13import About from "./About";14import Contact from "./Contact";15import Estimate from "./Estimate";16function App() {17  const [selectedIndex, setSelectedIndex] = useState(0);18  const [value, setValue] = useState(0);19  return (20    <ThemeProvider theme={theme}>21      <BrowserRouter>22        <Header23          value={value}24          setValue={setValue}25          selectedIndex={selectedIndex}26          setSelectedIndex={setSelectedIndex}27        />28        <Switch>29          <Route30            exact31            path="/"32            render={props => (33              <LandingPage34                {...props}35                setValue={setValue}36                setSelectedIndex={setSelectedIndex}37              />38            )}39          />40          <Route41            exact42            path="/services"43            render={props => (44              <Services45                {...props}46                setValue={setValue}47                setSelectedIndex={setSelectedIndex}48              />49            )}50          />51          <Route52            exact53            path="/customsoftware"54            render={props => (55              <CustomSoftware56                {...props}57                setValue={setValue}58                setSelectedIndex={setSelectedIndex}59              />60            )}61          />62          <Route63            exact64            path="/mobileapps"65            render={props => (66              <MobileApps67                {...props}68                setValue={setValue}69                setSelectedIndex={setSelectedIndex}70              />71            )}72          />73          <Route74            exact75            path="/websites"76            render={props => (77              <Websites78                {...props}79                setValue={setValue}80                setSelectedIndex={setSelectedIndex}81              />82            )}83          />84          <Route85            exact86            path="/revolution"87            render={props => (88              <Revolution89                {...props}90                setValue={setValue}91                setSelectedIndex={setSelectedIndex}92              />93            )}94          />95          <Route96            exact97            path="/about"98            render={props => (99              <About100                {...props}101                setValue={setValue}102                setSelectedIndex={setSelectedIndex}103              />104            )}105          />106          <Route107            exact108            path="/contact"109            render={props => (110              <Contact111                {...props}112                setValue={setValue}113                setSelectedIndex={setSelectedIndex}114              />115            )}116          />117          <Route118            exact119            path="/estimate"120            render={props => (121              <Estimate122                {...props}123                setValue={setValue}124                setSelectedIndex={setSelectedIndex}125              />126            )}127          />128        </Switch>129        <Footer setValue={setValue} setSelectedIndex={setSelectedIndex} />130      </BrowserRouter>131    </ThemeProvider>132  );133}...

Full Screen

Full Screen

FundamentalTypes.js

Source:FundamentalTypes.js Github

copy

Full Screen

...8      <BasicInput name={name} setValue={setValue} value={value} defaultValue="">9        <Input10          placeholder={name}11          value={value}12          onChange={(e, val) => setValue(val)}13          width="96px"14        />15      </BasicInput>16    );17  },18  'number': (props, context) => {19    const { name, value, setValue, color } = props;20    return (21      <BasicInput22        name={name}23        setValue={setValue}24        value={value}25        defaultValue={0}>26        <NumberInput27          value={value}28          color={color}29          onChange={(e, val) => setValue(val)}30          unit={name}31        />32      </BasicInput>33    );34  },35  'entity': (props, context) => {36    const { name, setValue } = props;37    return (38      <Button39        content={name}40        color="transparent"41        icon="upload"42        compact43        onClick={() => setValue(null, { marked_atom: true })}44      />45    );46  },47  'datum': (props, context) => {48    const { name, setValue } = props;49    return (50      <Button51        content={name}52        color="transparent"53        icon="upload"54        compact55        onClick={() => setValue(null, { marked_atom: true })}56      />57    );58  },59  'signal': (props, context) => {60    const { name, setValue } = props;61    return (62      <Button63        content={name}64        color="transparent"65        compact66        onClick={() => setValue()}67      />68    );69  },70  'option': (props, context) => {71    const {72      value,73      setValue,74    } = props;75    let large = false;76    const extraData = props.extraData || [];77    const data = Array.isArray(extraData)78      ? extraData79      : Object.keys(extraData);80    data.forEach(element => {81      if (element.length > OPTION_DROPDOWN_LARGE_CHAR_AMOUNT) {82        large = true;83      }84    });85    return (86      <Dropdown87        className="IntegratedCircuit__BlueBorder"88        color={"transparent"}89        options={data}90        onSelected={setValue}91        displayText={value}92        openWidth={large ? "200px" : undefined}93        noscroll94      />95    );96  },97  'any': (props, context) => {98    const { name, value, setValue, color } = props;99    return (100      <BasicInput101        name={name}102        setValue={setValue}103        value={value}104        defaultValue={''}>105        <Stack>106          <Stack.Item>107            <Button108              color={color}109              icon="upload"110              onClick={() => setValue(null, { marked_atom: true })}111            />112          </Stack.Item>113          <Stack.Item>114            <Input115              placeholder={name}116              value={value}117              onChange={(e, val) => setValue(val)}118              width="64px"119            />120          </Stack.Item>121        </Stack>122      </BasicInput>123    );124  },125};126export const DATATYPE_DISPLAY_HANDLERS = {127  'option': (port) => {128    return port.name.toLowerCase();129  },...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var wd = require('wd');2var desiredCaps = {3}4    .init(desiredCaps)5    .setImplicitWaitTimeout(5000)6    .elementById('com.example.myapplication:id/editText')7    .then(function(el) {8        el.setValue('Hello World!');9    })10    .quit();11var wd = require('wd');12var desiredCaps = {13}14    .init(desiredCaps)15    .setImplicitWaitTimeout(5000)16    .elementByName('Enter text')17    .then(function(el) {18        el.replaceValue('Hello World!');19    })20    .quit();21var wd = require('wd');22var desiredCaps = {23}

Full Screen

Using AI Code Generation

copy

Full Screen

1driver.setValue("my value");2driver.setValue("my value", "my strategy");3driver.setValue("my value");4driver.setValue("my value", "my strategy");5driver.setValueImmediate("my value");6driver.setValueImmediate("my value", "my strategy");7driver.setValueImmediate("my value");8driver.setValueImmediate("my value", "my strategy");9driver.shake();10driver.shake();11driver.startRecordingScreen();12driver.startRecordingScreen("my options");13driver.startRecordingScreen();14driver.startRecordingScreen("my options");15driver.startRecordingScreen();16driver.startRecordingScreen("my options");17driver.stopRecordingScreen();18driver.stopRecordingScreen();19driver.swipe("my start x", "my start y", "my end x", "my end y", "my duration");20driver.swipe("my start x", "my start y", "my end x", "my end y", "my duration", "my touch count");21driver.swipe("my start x", "my start y", "my end x", "my end y", "my duration", "my touch count", "my element");22driver.swipe("my start x", "my start y", "my end x", "my end y", "my duration");23driver.swipe("my start x", "my start y", "my end x", "my end y", "my duration", "my touch count");24driver.swipe("my start x", "my start y", "my end x", "my end y", "my duration", "my touch count", "my element");25driver.swipe("my start x", "my start y", "my

Full Screen

Using AI Code Generation

copy

Full Screen

1var wd = require('wd');2var assert = require('assert');3var desired = require('./desired');4var asserters = wd.asserters;5var browser = wd.promiseChainRemote('localhost', 4723);6browser.on('status', function(info) {7  console.log('\x1b[36m%s\x1b[0m', info);8});9browser.on('command', function(meth, path, data) {10  console.log(' > \x1b[33m%s\x1b[0m: %s', meth, path, data || '');11});12  .init(desired)13  .setImplicitWaitTimeout(3000)14  .elementByAccessibilityId('ComputeSumButton').click()15  .elementByAccessibilityId('Answer').text()16  .then(function(text) {17    assert.ok(text === 'NaN');18  })19  .fin(function() { return browser.quit(); })20  .done();

Full Screen

Using AI Code Generation

copy

Full Screen

1driver.setValue("some value");2driver.setValue("some value");3driver.setValue("some value");4driver.setValue("some value");5driver.setValue("some value");6driver.setValue("some value");7driver.setValue("some value");8driver.setValue("some value");9driver.setValue("some value");10driver.setValue("some value");11driver.setValue("some value");12driver.setValue("some value");13driver.setValue("some value");14driver.setValue("some value");15driver.setValue("some value");16driver.setValue("some value");17driver.setValue("some value");18driver.setValue("some value");

Full Screen

Using AI Code Generation

copy

Full Screen

1driver.setValue("myValue");2driver.setValue("myValue");3driver.setValue("myValue");4driver.setValue("myValue");5driver.setValue("myValue");6driver.setValue("myValue");7driver.setValue("myValue");8driver.setValue("myValue");9driver.setValue("myValue");

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Appium Base Driver automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful