test: Fix to run Upgrade cypress test only in CE (#20472)
## Description - We need to add the license key to start the server for EE and to authorise gsheet we need to connect to actual cloud services. So, until we find a solution we are skipping the gsheet test in EE. ## Type of change - Cypress ## How Has This Been Tested? - Cypress ## Checklist: ### QA activity: - [x] Added Test Plan Approved label after reveiwing all Cypress test
This commit is contained in:
parent
a3fb818c7c
commit
9a80b6d856
|
|
@ -18,8 +18,8 @@ describe("Upgrade appsmith version", () => {
|
||||||
|
|
||||||
localStorage.setItem("ContainerName", `appsmith-${name}`);
|
localStorage.setItem("ContainerName", `appsmith-${name}`);
|
||||||
|
|
||||||
//Start CE Container with old stack
|
//Start a new Container with old stack
|
||||||
cy.StartCEContainer(
|
cy.StartNewContainer(
|
||||||
tedUrl,
|
tedUrl,
|
||||||
path + "/oldstack/tempStacks/oldstacks",
|
path + "/oldstack/tempStacks/oldstacks",
|
||||||
"cicontainer",
|
"cicontainer",
|
||||||
|
|
@ -32,63 +32,63 @@ describe("Upgrade appsmith version", () => {
|
||||||
cy.GetAndVerifyLogs(tedUrl, `appsmith-${name}`);
|
cy.GetAndVerifyLogs(tedUrl, `appsmith-${name}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
//verify the Applications after upgrade
|
//verify the Applications after upgrade only on CE and skip for BE
|
||||||
cy.forceVisit(testdata.APPURL);
|
if (Cypress.env("Edition") !== 0) {
|
||||||
//Commenting this to fix the test
|
cy.forceVisit(testdata.APPURL);
|
||||||
// agHelper.GetNClick(".t--widget-iconbuttonwidget button", 0, true);
|
agHelper.GetNClick(".t--widget-iconbuttonwidget button", 0, true);
|
||||||
// agHelper.Sleep(1000);
|
agHelper.Sleep(1000);
|
||||||
// agHelper.GetNAssertElementText(
|
agHelper.GetNAssertElementText(
|
||||||
// ".tbody>div",
|
".tbody>div",
|
||||||
// "1Developmentexpertise",
|
"1Developmentexpertise",
|
||||||
// "have.text",
|
"have.text",
|
||||||
// 1,
|
1,
|
||||||
// );
|
);
|
||||||
|
|
||||||
// agHelper.GetNClick(".tbody>div", 1, true, 1000);
|
agHelper.GetNClick(".tbody>div", 1, true, 1000);
|
||||||
// agHelper.GetNAssertElementText(
|
agHelper.GetNAssertElementText(
|
||||||
// ".t--jsonformfield-label input",
|
".t--jsonformfield-label input",
|
||||||
// "Development",
|
"Development",
|
||||||
// "have.value",
|
"have.value",
|
||||||
// );
|
);
|
||||||
// agHelper.GetNAssertElementText(
|
agHelper.GetNAssertElementText(
|
||||||
// ".t--jsonformfield-type input",
|
".t--jsonformfield-type input",
|
||||||
// "expertise",
|
"expertise",
|
||||||
// "have.value",
|
"have.value",
|
||||||
// );
|
);
|
||||||
// agHelper.GetNAssertElementText(
|
agHelper.GetNAssertElementText(
|
||||||
// ".t--jsonformfield-rowIndex input",
|
".t--jsonformfield-rowIndex input",
|
||||||
// "1",
|
"1",
|
||||||
// "have.value",
|
"have.value",
|
||||||
// );
|
);
|
||||||
|
|
||||||
// cy.get(".t--jsonformfield-label input")
|
cy.get(".t--jsonformfield-label input")
|
||||||
// .clear()
|
.clear()
|
||||||
// .type("DevelopmentUpdate");
|
.type("DevelopmentUpdate");
|
||||||
// agHelper.GetNClick(".t--jsonform-footer button", 1, true);
|
agHelper.GetNClick(".t--jsonform-footer button", 1, true);
|
||||||
// agHelper.Sleep(2000);
|
agHelper.Sleep(2000);
|
||||||
// agHelper.GetNClick(".t--widget-iconbuttonwidget button", 0, true, 1000);
|
agHelper.GetNClick(".t--widget-iconbuttonwidget button", 0, true, 1000);
|
||||||
// agHelper.GetNAssertElementText(
|
agHelper.GetNAssertElementText(
|
||||||
// ".tbody>div",
|
".tbody>div",
|
||||||
// "1DevelopmentUpdateexpertise",
|
"1DevelopmentUpdateexpertise",
|
||||||
// "have.text",
|
"have.text",
|
||||||
// 1,
|
1,
|
||||||
// );
|
);
|
||||||
|
|
||||||
// //Resetting the data
|
|
||||||
// agHelper.GetNClick(".tbody>div", 1, true, 1000);
|
|
||||||
// cy.get(".t--jsonformfield-label input")
|
|
||||||
// .clear()
|
|
||||||
// .type("Development");
|
|
||||||
// agHelper.GetNClick(".t--jsonform-footer button", 1, true);
|
|
||||||
// agHelper.Sleep(2000);
|
|
||||||
// agHelper.GetNClick(".t--widget-iconbuttonwidget button", 0, true, 1000);
|
|
||||||
// agHelper.GetNAssertElementText(
|
|
||||||
// ".tbody>div",
|
|
||||||
// "1Developmentexpertise",
|
|
||||||
// "have.text",
|
|
||||||
// 1,
|
|
||||||
// );
|
|
||||||
|
|
||||||
|
//Resetting the data
|
||||||
|
agHelper.GetNClick(".tbody>div", 1, true, 1000);
|
||||||
|
cy.get(".t--jsonformfield-label input")
|
||||||
|
.clear()
|
||||||
|
.type("Development");
|
||||||
|
agHelper.GetNClick(".t--jsonform-footer button", 1, true);
|
||||||
|
agHelper.Sleep(2000);
|
||||||
|
agHelper.GetNClick(".t--widget-iconbuttonwidget button", 0, true, 1000);
|
||||||
|
agHelper.GetNAssertElementText(
|
||||||
|
".tbody>div",
|
||||||
|
"1Developmentexpertise",
|
||||||
|
"have.text",
|
||||||
|
1,
|
||||||
|
);
|
||||||
|
}
|
||||||
// stop the container
|
// stop the container
|
||||||
cy.StopContainer(tedUrl, localStorage.getItem("ContainerName"));
|
cy.StopContainer(tedUrl, localStorage.getItem("ContainerName"));
|
||||||
agHelper.Sleep(2000);
|
agHelper.Sleep(2000);
|
||||||
|
|
|
||||||
|
|
@ -1884,33 +1884,7 @@ Cypress.Commands.add("StartContainer", (path, containerName) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add(
|
Cypress.Commands.add(
|
||||||
"StartCEContainer",
|
"StartNewContainer",
|
||||||
(url, path, version, containerName) => {
|
|
||||||
let comm =
|
|
||||||
"docker run -d --name " +
|
|
||||||
containerName +
|
|
||||||
' -p 8081:80 -p 9002:9002 -v "' +
|
|
||||||
path +
|
|
||||||
'/stacks:/appsmith-stacks" -e APPSMITH_CLOUD_SERVICES_BASE_URL=http://host.docker.internal:5001 ' +
|
|
||||||
version;
|
|
||||||
|
|
||||||
cy.log(comm);
|
|
||||||
cy.request({
|
|
||||||
method: "GET",
|
|
||||||
url: url,
|
|
||||||
qs: {
|
|
||||||
cmd: comm,
|
|
||||||
},
|
|
||||||
}).then((res) => {
|
|
||||||
cy.log("ContainerID", res.body.stdout);
|
|
||||||
cy.log(res.body.stderr);
|
|
||||||
expect(res.status).equal(200);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
Cypress.Commands.add(
|
|
||||||
"StartEEContainer",
|
|
||||||
(url, path, version, containerName) => {
|
(url, path, version, containerName) => {
|
||||||
let comm =
|
let comm =
|
||||||
"docker run -d --name " +
|
"docker run -d --name " +
|
||||||
|
|
@ -1928,7 +1902,8 @@ Cypress.Commands.add(
|
||||||
cmd: comm,
|
cmd: comm,
|
||||||
},
|
},
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
cy.log(res.body.stdout, res.body.stderr);
|
cy.log("ContainerID", res.body.stdout);
|
||||||
|
cy.log(res.body.stderr);
|
||||||
expect(res.status).equal(200);
|
expect(res.status).equal(200);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user