PromucFlow_constructor/app/client/cypress/support/Pages/FakerHelper.ts
Aishwarya-U-R bdadb827e3
test: Script updates for flaky tests (#16631)
* CreateNewApp spec flaky fix

* fix

* Moved RepoLimit to commented files

* Inline spec failure fix - case 19

* Table FIlter specs V1/V2 split

* Binding/Table_Property_ToggleJs spec - V1/V2 fix

* Spec name update

* Wait increase

* DS - duplicate error capture fix

* revert

* Recaptcha spec fix

* Jsfun exe flaky fix - unskipped case

* jsfunc exec spec fix

* jsfunex spec fix

* Api bugs spec fix

* Api bugs spec fix

* Chartdata point spec flaky fix

* Theme_multiselect brown type fix

* Jsfunc exe spec fix

* Inline spec fix

* Inline spec fix

* Inline spec fix

* Theme multiselect spec fix

* Promises spec fix

* JSFun Exe spec fix

* Api_all verb methods update

* List1 spec 4th case fix

* Jsfun exe skipping 10th case

* jsunf exe 10th case trial fix

* firestore stub error capture

* jsonload failng spec skip

* JSonload spec fix

* json load spec fix

* Git repo moved back
2022-09-12 09:48:44 +05:30

26 lines
603 B
TypeScript

import { faker } from "@faker-js/faker";
type imageTypes = "abstract" | "animals";
export class FakerHelper {
public GetCatImage() {
return faker.image.cats();
}
public GetRandomImage() {
return faker.image.imageUrl();
}
public GetRandomText(textLength = 10, casing : "upper" | "lower" | "mixed" = "mixed") {
return faker.random.alphaNumeric(textLength, { casing: casing });
}
public GetUSPhoneNumber() {
return faker.phone.number("(###) ###-####");
}
public GetRandomNumber(length = 6) {
return faker.random.numeric(length, {allowLeadingZeros: true});
}
}