diff --git a/.tool-versions b/.tool-versions deleted file mode 100644 index 343dc534c8..0000000000 --- a/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -nodejs 18.18.2 diff --git a/.version b/.version index afad818663..30291cba22 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -3.11.0 +3.10.0 diff --git a/cypress-tests/cypress/constants/texts/postgreSql.js b/cypress-tests/cypress/constants/texts/postgreSql.js index bcc686413d..f7c9baf984 100644 --- a/cypress-tests/cypress/constants/texts/postgreSql.js +++ b/cypress-tests/cypress/constants/texts/postgreSql.js @@ -5,7 +5,7 @@ export const postgreSqlText = { allDataSources: () => { return Cypress.env("marketplace_action") ? "All data sources (44)" - : "All data sources (43)"; + : "All data sources (45)"; }, commonlyUsed: "Commonly used (5)", allDatabase: () => { diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/multiselectHappyPath.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/multiselectHappyPath.skip.js similarity index 100% rename from cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/multiselectHappyPath.cy.js rename to cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/multiselectHappyPath.skip.js diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/textInputHappyPath.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/textInputHappyPath.skip.js similarity index 99% rename from cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/textInputHappyPath.cy.js rename to cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/textInputHappyPath.skip.js index ffba1b68d6..16844a6a04 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/textInputHappyPath.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/textInputHappyPath.skip.js @@ -351,7 +351,7 @@ describe("Text Input", () => { ).should("have.css", "border-radius", "20px"); }); - it.skip("should verify the app preview", () => {}); + it.skip("should verify the app preview", () => { }); it("should verify CSA", () => { const data = {}; diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/button.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/button.cy.js index 22cf3cc5a4..939872b5ca 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/button.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/button.cy.js @@ -90,7 +90,7 @@ describe('Button Component Tests', () => { }); - it('should verify all the events from the button', () => { + it.skip('should verify all the events from the button', () => { const events = [ { event: "On hover", message: "On hover Event" }, { event: "On Click", message: "On Click Event" }, diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/checkbox.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/checkbox.cy.js index 2f3cf01076..bb9c624aac 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/checkbox.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/checkbox.cy.js @@ -98,7 +98,7 @@ describe('Checkbox Component Tests', () => { }); - it('should verify all the events from the Checkbox', () => { + it.skip('should verify all the events from the Checkbox', () => { const events = [ { event: "On Change", message: "On Change Event" }, ]; diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/dropdown.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/dropdown.skip.js similarity index 100% rename from cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/dropdown.cy.js rename to cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/dropdown.skip.js diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/globalActions.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/globalActions.skip.js similarity index 100% rename from cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/globalActions.cy.js rename to cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/globalActions.skip.js diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/multiselect.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/multiselect.skip.js similarity index 100% rename from cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/multiselect.cy.js rename to cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/multiselect.skip.js diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/passwordInput.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/passwordInput.skip.js similarity index 98% rename from cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/passwordInput.cy.js rename to cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/passwordInput.skip.js index 25f5ad02e4..edfd8f04ef 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/passwordInput.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/passwordInput.skip.js @@ -101,7 +101,7 @@ describe('Password Input Component Tests', () => { }); - it('should verify all the events from the password input', () => { + it.skip('should verify all the events from the password input', () => { const events = [ { event: "On Focus", message: "On Focus Event" }, { event: "On Blur", message: "On Blur Event" }, diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/toggleSwitch.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/toggleSwitch.skip.js similarity index 100% rename from cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/toggleSwitch.cy.js rename to cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/componentsBasics/toggleSwitch.skip.js diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/inspectorHappypath.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/inspectorHappypath.cy.js index bc659e13bf..a6b6a1406a 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/inspectorHappypath.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/inspectorHappypath.cy.js @@ -46,7 +46,7 @@ describe("Editor- Inspector", () => { cy.apiDeleteApp(); }); - it("should verify dynamic items", () => { + it.skip("should verify dynamic items", () => { cy.get(commonWidgetSelector.sidebarinspector).click(); cy.get(".tooltip-inner").invoke("hide"); @@ -150,7 +150,7 @@ describe("Editor- Inspector", () => { cy.apiDeleteApp(); }); - it("should verify deletion of component from inspector", () => { + it.skip("should verify deletion of component from inspector", () => { cy.dragAndDropWidget("button", 500, 500); cy.get(commonWidgetSelector.sidebarinspector).click(); deleteComponentFromInspector("button1"); diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/queries/runpyHappyPath.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/queries/runpyHappyPath.cy.js index ddada4d65b..ddd489f76c 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/queries/runpyHappyPath.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/newSuits/queries/runpyHappyPath.cy.js @@ -59,7 +59,7 @@ describe("runpy", () => { cy.apiDeleteApp(); }); - it("should verify actions", () => { + it.skip("should verify actions", () => { const data = {}; data.customText = randomString(12); diff --git a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/amazonAthena.cy.js b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/amazonAthena.cy.js index 34bd7b6c82..167ecdb2c5 100644 --- a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/amazonAthena.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/amazonAthena.cy.js @@ -26,7 +26,6 @@ describe("Data source amazon athena", () => { beforeEach(() => { cy.apiLogin(); cy.defaultWorkspaceLogin(); - cy.intercept("POST", "/api/data_queries").as("createQuery"); }); it("Should verify elements on amazon athena connection form", () => { diff --git a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/amazonses.cy.js b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/amazonses.cy.js index ed198b4af7..674c694d28 100644 --- a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/amazonses.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/amazonses.cy.js @@ -26,7 +26,6 @@ describe("Data source amazon ses", () => { beforeEach(() => { cy.apiLogin(); cy.defaultWorkspaceLogin(); - cy.intercept("POST", "/api/data_queries").as("createQuery"); }); it("Should verify elements on amazonses connection form", () => { diff --git a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/appWrite.cy.js b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/appWrite.cy.js index 707c333855..8ed50754ad 100644 --- a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/appWrite.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/appWrite.cy.js @@ -26,7 +26,6 @@ describe("Data source AppWrite", () => { beforeEach(() => { cy.apiLogin(); cy.defaultWorkspaceLogin(); - cy.intercept("POST", "/api/data_queries").as("createQuery"); }); it("Should verify elements on appwrite connection form", () => { diff --git a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/awsLambda.cy.js b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/awsLambda.cy.js index 60422c2ea9..f127beb854 100644 --- a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/awsLambda.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/awsLambda.cy.js @@ -26,7 +26,6 @@ describe("Data source AWS Lambda", () => { beforeEach(() => { cy.apiLogin(); cy.defaultWorkspaceLogin(); - cy.intercept("POST", "/api/data_queries").as("createQuery"); }); it("Should verify elements on AWS Lambda connection form", () => { diff --git a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/awsTextract.cy.js b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/awsTextract.cy.js index 9ac5973ebf..7af21cf467 100644 --- a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/awsTextract.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/awsTextract.cy.js @@ -27,7 +27,6 @@ describe("Data source AWS Textract", () => { beforeEach(() => { cy.apiLogin(); cy.defaultWorkspaceLogin(); - cy.intercept("POST", "/api/data_queries").as("createQuery"); }); it("Should verify elements on AWS Textract connection form", () => { diff --git a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/azureBlobStorageHappyPath.cy.js b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/azureBlobStorageHappyPath.cy.js index 54aca0322e..b148f92735 100644 --- a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/azureBlobStorageHappyPath.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/azureBlobStorageHappyPath.cy.js @@ -18,7 +18,7 @@ data.customText = fake.randomSentence; describe("Data source Azure Blob Storage", () => { beforeEach(() => { cy.appUILogin(); - cy.intercept("GET", "/api/v2/data_sources"); + cy.defaultWorkspaceLogin(); data.dataSourceName = fake.lastName .toLowerCase() .replaceAll("[^A-Za-z]", ""); diff --git a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/baseRow.cy.js b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/baseRow.cy.js index 2e8ac905d8..05c250d01c 100644 --- a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/baseRow.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/baseRow.cy.js @@ -26,7 +26,6 @@ describe("Data source baserow", () => { beforeEach(() => { cy.apiLogin(); cy.defaultWorkspaceLogin(); - cy.intercept("POST", "/api/data_queries").as("createQuery"); }); it("Should verify elements on baserow connection form", () => { diff --git a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/bigqueryHappyPath.cy.js b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/bigqueryHappyPath.cy.js index 6e8dfa0ff0..cee23b0807 100644 --- a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/bigqueryHappyPath.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/bigqueryHappyPath.cy.js @@ -18,7 +18,6 @@ describe("Data source BigQuery", () => { beforeEach(() => { cy.appUILogin(); cy.defaultWorkspaceLogin(); - cy.intercept("GET", "/api/v2/data_sources"); data.dataSourceName = fake.lastName .toLowerCase() .replaceAll("[^A-Za-z]", ""); diff --git a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/restAPIHappyPath.cy.js b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/restAPIHappyPath.cy.js index 6cebadc79d..0d45f8af89 100644 --- a/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/restAPIHappyPath.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/marketplace/commonTestcases/data-source/restAPIHappyPath.cy.js @@ -5,7 +5,7 @@ import { postgreSqlSelector } from "Selectors/postgreSql"; import { postgreSqlText } from "Texts/postgreSql"; import { restAPISelector } from "Selectors/restAPI"; import { restAPIText } from "Texts/restAPI"; -import { fillDataSourceTextField } from "Support/utils/postgreSql"; +import { createAndRunRestAPIQuery } from "Support/utils/restAPI"; const data = {}; const authenticationDropdownSelector = @@ -19,8 +19,8 @@ const clientAuthenticationDropdown = describe("Data source Rest API", () => { beforeEach(() => { + cy.apiLogin(); cy.defaultWorkspaceLogin(); - cy.intercept("GET", "/api/v2/data_sources"); data.dataSourceName = fake.lastName .toLowerCase() .replaceAll("[^A-Za-z]", ""); @@ -331,7 +331,8 @@ describe("Data source Rest API", () => { cy.verifyToastMessage(commonSelectors.toastMessage, "Data Source Saved"); deleteDatasource(`cypress-${data.dataSourceName}-restapi`); }); - it("Should verify connection for Rest API", () => { + it("Should verify basic connection for Rest API", () => { + const storedId = Cypress.env("storedId"); cy.apiCreateGDS( `${Cypress.env("server_host")}/api/data-sources`, `cypress-${data.dataSourceName}-restapi`, @@ -366,18 +367,89 @@ describe("Data source Rest API", () => { ] ); cy.reload(); - // cy.apiCreateApp(`${fake.companyName}-restAPI-App`); - // cy.apiAddQueryToApp( - // "restapi1", - // { - // method: "get", - // url: "", - // url_params: [["", ""]], - // headers: [["", ""]], - // cookies: [["", ""]], - // }, - // `cypress-${data.dataSourceName}-restapi`, - // "restapi" - // ); + + cy.apiCreateApp(`${fake.companyName}-restAPI-App`); + cy.openApp(); + createAndRunRestAPIQuery( + "get_restapi", + `cypress-${data.dataSourceName}-restapi`, + "GET", + "/api/users" + ); + createAndRunRestAPIQuery( + "post_restapi", + `cypress-${data.dataSourceName}-restapi`, + "POST", + "", + [["Content-Type", "application/json"]], + [], + { + price: 200, + name: "Violin", + }, + true, + "/api/users" + ); + cy.readFile("cypress/fixtures/restAPI/storedId.json").then( + (postResponseID) => { + const id1 = postResponseID.id; + createAndRunRestAPIQuery( + "put_restapi_id", + `cypress-${data.dataSourceName}-restapi`, + "PUT", + "", + [["Content-Type", "application/json"]], + [], + { + price: 500, + name: "Guitar", + }, + true, + `/api/users/${id1}` + ); + } + ); + cy.readFile("cypress/fixtures/restAPI/storedId.json").then( + (putResponseID) => { + const id2 = putResponseID.id; + createAndRunRestAPIQuery( + "patch_restapi_id", + `cypress-${data.dataSourceName}-restapi`, + "PATCH", + "", + [["Content-Type", "application/json"]], + [], + { price: 999 }, + true, + `/api/users/${id2}` + ); + } + ); + cy.readFile("cypress/fixtures/restAPI/storedId.json").then( + (patchResponseID) => { + const id3 = patchResponseID.id; + createAndRunRestAPIQuery( + "get_restapi_id", + `cypress-${data.dataSourceName}-restapi`, + "GET", + "", + [], + [], + true, + `/api/users/${id3}` + ); + + createAndRunRestAPIQuery( + "delete_restapi_id", + `cypress-${data.dataSourceName}-restapi`, + "DELETE", + "", + [], + [], + true, + `/api/users/${id3}` + ); + } + ); }); }); diff --git a/cypress-tests/cypress/e2e/happyPath/platform/commonTestcases/workspace/appCreate.cy.js b/cypress-tests/cypress/e2e/happyPath/platform/commonTestcases/workspace/appCreate.skip.js similarity index 100% rename from cypress-tests/cypress/e2e/happyPath/platform/commonTestcases/workspace/appCreate.cy.js rename to cypress-tests/cypress/e2e/happyPath/platform/commonTestcases/workspace/appCreate.skip.js diff --git a/cypress-tests/cypress/fixtures/restAPI/storedId.json b/cypress-tests/cypress/fixtures/restAPI/storedId.json new file mode 100644 index 0000000000..13a74c1a42 --- /dev/null +++ b/cypress-tests/cypress/fixtures/restAPI/storedId.json @@ -0,0 +1,3 @@ +{ + "id": "bff6583db942c77249ba" +} \ No newline at end of file diff --git a/cypress-tests/cypress/support/utils/restAPI.js b/cypress-tests/cypress/support/utils/restAPI.js new file mode 100644 index 0000000000..f5a44e3fd5 --- /dev/null +++ b/cypress-tests/cypress/support/utils/restAPI.js @@ -0,0 +1,97 @@ +export const createAndRunRestAPIQuery = ( + queryName, + dsName, + method = "GET", + url = "", + headersList = [], + bodyList = [], + jsonBody = null, + run = true, + urlSuffix = "" +) => { + cy.getCookie("tj_auth_token").then((cookie) => { + const headers = { + "Tj-Workspace-Id": Cypress.env("workspaceId"), + Cookie: `tj_auth_token=${cookie.value}`, + }; + cy.request({ + method: "GET", + url: `${Cypress.env("server_host")}/api/apps/${Cypress.env("appId")}`, + headers, + }).then((response) => { + const editingVersionId = response.body.editing_version.id; + const data_source_id = Cypress.env(`${dsName}-id`); + const useJsonBody = + ["POST", "PATCH", "PUT"].includes(method.toUpperCase()) && + jsonBody !== null; + + const queryOptions = { + method: method.toLowerCase(), + url: url + urlSuffix, + url_params: [["", ""]], + headers: headersList.length ? headersList : [["", ""]], + body: !useJsonBody && bodyList.length ? bodyList : [["", ""]], + json_body: useJsonBody ? jsonBody : null, + body_toggle: useJsonBody, + runOnPageLoad: run, + transformationLanguage: "javascript", + enableTransformation: false, + }; + + const requestBody = { + app_id: Cypress.env("appId"), + app_version_id: editingVersionId, + name: queryName, + kind: "restapi", + options: queryOptions, + data_source_id, + plugin_id: null, + }; + + cy.request({ + method: "POST", + url: `${Cypress.env("server_host")}/api/data-queries/data-sources/${data_source_id}/versions/${editingVersionId}`, + headers, + body: requestBody, + }).then((createResponse) => { + expect(createResponse.status).to.equal(201); + const queryId = createResponse.body.id; + cy.log("Query created successfully:", queryId); + + const createdOptions = createResponse.body.options; + expect(createdOptions.method).to.equal(queryOptions.method); + expect(createdOptions.url).to.equal(queryOptions.url); + expect(createdOptions.headers).to.deep.equal(queryOptions.headers); + + if (useJsonBody) { + expect(createdOptions.json_body).to.deep.equal( + queryOptions.json_body + ); + expect(createdOptions.body_toggle).to.equal(true); + } else { + expect(createdOptions.body).to.deep.equal(queryOptions.body); + expect(createdOptions.body_toggle).to.equal(false); + } + + expect(createdOptions.runOnPageLoad).to.equal(run); + cy.log("Metadata verified successfully"); + if (run) { + cy.request({ + method: "POST", + url: `${Cypress.env("server_host")}/api/data-queries/${queryId}/run`, + headers, + }).then((runResponse) => { + expect([200, 201]).to.include(runResponse.status); + cy.log("Query executed successfully:", runResponse.body); + if (runResponse.body?.data.id) { + cy.writeFile("cypress/fixtures/restAPI/storedId.json", { + id: runResponse.body.data.id, + }); + cy.log("Stored ID:", runResponse.body.data.id); + } + }); + } + }); + }); + }); +};