@bigbinary/neeto-playwright-commons 4.6.3 → 4.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1178,7 +1178,7 @@ const THANK_YOU_SELECTORS = {
|
|
|
1178
1178
|
|
|
1179
1179
|
const generateStagingData = (product = "invoice") => {
|
|
1180
1180
|
const jobCompletionIndex = process.env.JOB_COMPLETION_INDEX;
|
|
1181
|
-
const dateTimeString = dayjs().format("DDMM-HHmm
|
|
1181
|
+
const dateTimeString = `${dayjs().format("DDMM-HHmm")}-${faker.string.alphanumeric({ length: 5, casing: "lower" })}`;
|
|
1182
1182
|
const timestamp = jobCompletionIndex
|
|
1183
1183
|
? `${dateTimeString}-${jobCompletionIndex}`
|
|
1184
1184
|
: dateTimeString;
|
|
@@ -1214,14 +1214,14 @@ const getStagingOrganizationTtlInDays = () => {
|
|
|
1214
1214
|
const isStagingOrganizationExpired = (subdomainName) => {
|
|
1215
1215
|
if (!subdomainName?.startsWith("cpt"))
|
|
1216
1216
|
return false;
|
|
1217
|
-
const match = subdomainName.match(/-(\d{2})(\d{2})-(\d{2})(\d{2})-
|
|
1217
|
+
const match = subdomainName.match(/-(\d{2})(\d{2})-(\d{2})(\d{2})-[a-z\d]{5}(?:-\d+)?$/);
|
|
1218
1218
|
if (!match)
|
|
1219
1219
|
return false;
|
|
1220
|
-
const [, day, month, hour, minute
|
|
1220
|
+
const [, day, month, hour, minute] = match;
|
|
1221
1221
|
const now = dayjs();
|
|
1222
1222
|
// The subdomain timestamp does not include a year, so assume the current year.
|
|
1223
1223
|
// If that places the creation date in the future, it was created last year.
|
|
1224
|
-
let createdAt = dayjs(`${now.year()}-${month}-${day}T${hour}:${minute}
|
|
1224
|
+
let createdAt = dayjs(`${now.year()}-${month}-${day}T${hour}:${minute}`);
|
|
1225
1225
|
if (!createdAt.isValid())
|
|
1226
1226
|
return false;
|
|
1227
1227
|
if (createdAt.isAfter(now))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-playwright-commons",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.4",
|
|
4
4
|
"description": "A package encapsulating common playwright code across neeto projects.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-playwright-commons.git",
|
|
6
6
|
"license": "apache-2.0",
|