From 13e17f8673e9cf33678dc2a87e4034f6e3e449d3 Mon Sep 17 00:00:00 2001 From: Vito Date: Mon, 27 Apr 2020 17:18:24 +0100 Subject: [PATCH] [AAE-2456] - added lowercase random string generator for e2e tests (#5645) --- lib/testing/src/lib/core/utils/string.util.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/testing/src/lib/core/utils/string.util.ts b/lib/testing/src/lib/core/utils/string.util.ts index 2c7abdcab7..22a0249759 100644 --- a/lib/testing/src/lib/core/utils/string.util.ts +++ b/lib/testing/src/lib/core/utils/string.util.ts @@ -35,6 +35,15 @@ export class StringUtil { return StringUtil.generateRandomCharset(length, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'); } + /** + * Generates a random lowercase string. + * + * @param length If this parameter is not provided the length is set to 8 by default. + */ + static generateRandomLowercaseString(length: number = 8): string { + return StringUtil.generateRandomCharset(length, 'abcdefghijklmnopqrstuvwxyz0123456789'); + } + /** * Generates a random email address following the format: abcdef@activiti.test.com *