Skip to content

Commit ceff854

Browse files
committed
removed before:spec and experimentalInteractiveRunEvents
1 parent 03fb74e commit ceff854

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

cypress.config.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module.exports = defineConfig({
77
viewportHeight: 1080,
88
video: false,
99
defaultCommandTimeout: 15000,
10-
experimentalInteractiveRunEvents: true,
1110
env: {
1211
API_AUTH: "https://auth.api.dev.zesty.io",
1312
COOKIE_NAME: "DEV_APP_SID",
@@ -27,14 +26,6 @@ module.exports = defineConfig({
2726

2827
return launchOptions;
2928
});
30-
// Get spec info to be used for the model's label/name
31-
on("before:spec", (spec) => {
32-
const pathPart = spec.relative.split("/");
33-
config.env.SPEC = {
34-
folder: pathPart[pathPart?.length - 2],
35-
file: pathPart[pathPart?.length - 1].replace(/\.spec\.js/g, ""),
36-
};
37-
});
3829

3930
return require("./cypress/plugins/index.js")(on, config);
4031
},

cypress/fixtures/content.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"model": {
3-
"label": "E2E: Content",
4-
"metaTitle": "E2E: Content",
3+
"label": "Content",
4+
"metaTitle": "Content",
55
"type": "pageset",
66
"listed": true
77
},
@@ -358,8 +358,8 @@
358358
"sort": 0
359359
},
360360
"web": {
361-
"metaLinkText": "E2E: Content",
362-
"metaTitle": "E2E: Content"
361+
"metaLinkText": "Content",
362+
"metaTitle": "Content"
363363
},
364364
"data": {
365365
"internal_link": "7-a2c992ecb6-v6j9zt",

cypress/plugins/seeds/content.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@ module.exports = function content(config) {
2323
const json = JSON.parse(jsonString);
2424

2525
const sdk = await getSDK(config);
26-
const { COMMIT_ID, SPEC } = config?.env;
27-
const SPEC_ID = `${COMMIT_ID} | ${Date.now()}`;
26+
const timeStamp = Date.now();
2827

2928
// 1) Create Schema
3029
// Append commit id for spec tracking
3130
// append timestamp to prevent naming conflicts
32-
const specLabel = !SPEC?.file ? "" : `${SPEC?.folder}-${SPEC?.file}`;
33-
const modelLabel = `E2E: ${specLabel || json?.model?.label} | ${SPEC_ID}`;
31+
const modelLabel = `E2E: ${json.model.label} | ${config.env.COMMIT_ID} | ${timeStamp}`;
3432
const modelPayload = {
3533
...json.model,
3634
label: modelLabel,
@@ -55,7 +53,7 @@ module.exports = function content(config) {
5553
json.items.map((item, index) => {
5654
// Append commit id to item labels for spec tracking
5755
// append timestamp to prevent naming conflicts
58-
const itemLabel = `${item?.web?.metaTitle} | ${SPEC_ID}`;
56+
const itemLabel = `E2E: ${item.web.metaTitle} | ${config.env.COMMIT_ID} | ${timeStamp}`;
5957
const payload = {
6058
...item,
6159
meta: {

0 commit comments

Comments
 (0)