I have written a reusable function in Cypress:
fill_prices_ht_nt(until, AP, GP, AP_NT, new_bonus){
this.add_range().click({force:true})
this.range_until().type(until)
this.ap().type(AP)
this.gp().type(GP)
this.ap_nt().type(AP_NT)
this.new_bonus().type(new_bonus)
Now I want to use that function to type in values, but unfortunately I need to type in decimal values in European format (with comma instead of periods), like e.g. “9,35” or “6,47”
pmmt.fill_prices_ht_nt(99999, 10, 9,35, 6,47, 100)
This is of course not working as Cypress/JS treats every comma as a separator.
Is there a somewhat easy workaround to this problem? Otherwise I will have to dump the reusable function and hard-code the values.