4643
This commit is contained in:
@@ -14,22 +14,34 @@ describe("SMOKE SETUP", () => {
|
||||
.then((res) => {
|
||||
cy.request({
|
||||
method: "POST",
|
||||
url: `${Cypress.env("apiBaseUrl")}trial/seed`,
|
||||
url: `${Cypress.env("apiBaseUrl")}license/permanently-erase-all-data`,
|
||||
auth: {
|
||||
bearer: res.data.token
|
||||
}, ///small/-7/true
|
||||
body: {
|
||||
seedLevel: "small",
|
||||
timeZoneOffset: -7,
|
||||
e2e: true
|
||||
}
|
||||
})
|
||||
.its("body")
|
||||
.then((resjob) => {
|
||||
cy.log(`resjob is: ${JSON.stringify(resjob)}`);
|
||||
// expect(resjob.body).to.have.property('jobId');
|
||||
confirmJobDone(resjob.jobId, res.data.token);
|
||||
});
|
||||
},
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify("I understand")
|
||||
}).then(() => {
|
||||
cy.request({
|
||||
method: "POST",
|
||||
url: `${Cypress.env("apiBaseUrl")}trial/seed`,
|
||||
auth: {
|
||||
bearer: res.data.token
|
||||
}, ///small/-7/true
|
||||
body: {
|
||||
seedLevel: "small",
|
||||
timeZoneOffset: -7,
|
||||
e2e: true
|
||||
}
|
||||
})
|
||||
.its("body")
|
||||
.then((resjob) => {
|
||||
cy.log(`resjob is: ${JSON.stringify(resjob)}`);
|
||||
// expect(resjob.body).to.have.property('jobId');
|
||||
confirmJobDone(resjob.jobId, res.data.token);
|
||||
});
|
||||
});
|
||||
});
|
||||
//-----------------------------------------------------
|
||||
});
|
||||
@@ -49,3 +61,56 @@ function confirmJobDone(jobId, authToken) {
|
||||
confirmJobDone(jobId, authToken);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//===============================================
|
||||
// describe("SMOKE SETUP", () => {
|
||||
// it("Generates test data without issue", () => {
|
||||
// cy.request({
|
||||
// url: `${Cypress.env("apiBaseUrl")}auth`,
|
||||
// method: "POST",
|
||||
// body: {
|
||||
// login: Cypress.env("admin").login,
|
||||
// password: Cypress.env("admin").password
|
||||
// }
|
||||
// })
|
||||
// .its("body")
|
||||
// .then((res) => {
|
||||
// cy.request({
|
||||
// method: "POST",
|
||||
// url: `${Cypress.env("apiBaseUrl")}trial/seed`,
|
||||
// auth: {
|
||||
// bearer: res.data.token
|
||||
// }, ///small/-7/true
|
||||
// body: {
|
||||
// seedLevel: "small",
|
||||
// timeZoneOffset: -7,
|
||||
// e2e: true
|
||||
// }
|
||||
// })
|
||||
// .its("body")
|
||||
// .then((resjob) => {
|
||||
// cy.log(`resjob is: ${JSON.stringify(resjob)}`);
|
||||
// // expect(resjob.body).to.have.property('jobId');
|
||||
// confirmJobDone(resjob.jobId, res.data.token);
|
||||
// });
|
||||
// });
|
||||
// //-----------------------------------------------------
|
||||
// });
|
||||
// });
|
||||
// function confirmJobDone(jobId, authToken) {
|
||||
// cy.request({
|
||||
// method: "GET",
|
||||
// url: `${Cypress.env("apiBaseUrl")}job-operations/status/${jobId}`,
|
||||
// auth: {
|
||||
// bearer: authToken
|
||||
// }
|
||||
// }).then((resp) => {
|
||||
// //3 means job done
|
||||
// if (resp.body.data == 3) return;
|
||||
// // else recurse
|
||||
// cy.wait(1000);
|
||||
// confirmJobDone(jobId, authToken);
|
||||
// });
|
||||
// }
|
||||
|
||||
@@ -5,7 +5,7 @@ describe("SMOKE NAV", () => {
|
||||
|
||||
cy.get("[data-cy=navicon]").click();
|
||||
cy.get("[data-cy=home]").click();
|
||||
cy.get("[data-cy='nav/home-dashboard']").click();
|
||||
cy.get("[data-cy='nav/home-dashboard']").click();//26fail Timed out retrying after 5000ms: Expected to find element: [data-cy='nav/home-dashboard'], but never found it.
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
|
||||
cy.get("[data-cy=navicon]").click();
|
||||
|
||||
@@ -62,7 +62,7 @@ describe("Workorder creation", () => {
|
||||
cy.ayChooseGZPickList("projectId", "e2e");
|
||||
cy.get("[data-cy='serviceDate:date']").type(dayjs().format("YYYY-MM-DD"));
|
||||
cy.get("[data-cy='serviceDate:time']").type(dayjs().format("HH:mm"));
|
||||
cy.get("[data-cy=customerContactName]").type(`Jayne Smith`);
|
||||
cy.get("[data-cy=customerContactName]").type(`Jayne Smith`);//26fail Timed out retrying after 5000ms: Expected to find element: [data-cy=customerContactName], but never found it.
|
||||
cy.get("[data-cy=customerReferenceNumber]").type(
|
||||
`cref-${Cypress.config("cyid")}`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user