This commit is contained in:
2021-12-20 18:20:37 +00:00
parent 971efcf732
commit 183c79aa7f
14 changed files with 34 additions and 18 deletions

View File

@@ -1,10 +1,11 @@
{ {
"defaultCommandTimeout":7000, "defaultCommandTimeout":5000,
"retries": 3,
"integrationFolder": "tests", "integrationFolder": "tests",
"supportFile":"support", "supportFile":"support",
"xxbaseUrl": "http://localhost:7575", "xbaseUrl": "http://localhost:7575",
"baseUrl": "https://test.helloayanova.com", "baseUrl": "https://test.helloayanova.com",
"xbaseUrl":"http://localhost:8080", "xxxxbaseUrl":"http://localhost:8080",
"video":false, "video":false,
"env": { "env": {
"xapiBaseUrl":"http://localhost:7575/api/v8.0/", "xapiBaseUrl":"http://localhost:7575/api/v8.0/",

View File

@@ -29,3 +29,18 @@ describe("SMOKE SETUP", () => {
//----------------------------------------------------- //-----------------------------------------------------
}); });
}); });
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);
});
}

View File

@@ -10,6 +10,7 @@ describe("SMOKE HOME SECTION", () => {
cy.get("input[name=password]") cy.get("input[name=password]")
.clear() .clear()
.type(`${Cypress.env("adminpassword")}{enter}`); .type(`${Cypress.env("adminpassword")}{enter}`);
cy.url().should("include", "/ay-evaluate");
//################# HOME //################# HOME
cy.visit("/home-dashboard"); cy.visit("/home-dashboard");

View File

@@ -10,8 +10,7 @@ describe("SMOKE CUSTOMER SECTION", () => {
cy.get("input[name=password]") cy.get("input[name=password]")
.clear() .clear()
.type(`${Cypress.env("adminpassword")}{enter}`); .type(`${Cypress.env("adminpassword")}{enter}`);
cy.url().should("include", "/ay-evaluate");
//################# CUSTOMERS //################# CUSTOMERS
cy.visit("/cust-customers"); cy.visit("/cust-customers");

View File

@@ -10,7 +10,7 @@ describe("SMOKE SERVICE MISC SECTION", () => {
cy.get("input[name=password]") cy.get("input[name=password]")
.clear() .clear()
.type(`${Cypress.env("adminpassword")}{enter}`); .type(`${Cypress.env("adminpassword")}{enter}`);
cy.url().should("include", "/ay-evaluate");
//################# SERVICE //################# SERVICE
cy.visit("/svc-schedule"); cy.visit("/svc-schedule");
cy.url().should("include", "/svc-schedule"); cy.url().should("include", "/svc-schedule");
@@ -127,7 +127,6 @@ describe("SMOKE SERVICE MISC SECTION", () => {
cy.get("[data-cy=generalerror]").should("not.exist"); cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=name]"); cy.get("[data-cy=name]");
//----------------------------------------------------- //-----------------------------------------------------
}); });
}); });

View File

@@ -10,7 +10,7 @@ describe("SMOKE SERVICE WO SECTION", () => {
cy.get("input[name=password]") cy.get("input[name=password]")
.clear() .clear()
.type(`${Cypress.env("adminpassword")}{enter}`); .type(`${Cypress.env("adminpassword")}{enter}`);
cy.url().should("include", "/ay-evaluate");
//################# SERVICE WO //################# SERVICE WO
cy.visit("/svc-workorders"); cy.visit("/svc-workorders");

View File

@@ -11,6 +11,7 @@ describe("SMOKE SERVICE QUOTE SECTION", () => {
.clear() .clear()
.type(`${Cypress.env("adminpassword")}{enter}`); .type(`${Cypress.env("adminpassword")}{enter}`);
cy.visit("/svc-quotes"); cy.visit("/svc-quotes");
cy.url().should("include", "/svc-quotes"); cy.url().should("include", "/svc-quotes");
cy.get("[data-cy=generalerror]").should("not.exist"); cy.get("[data-cy=generalerror]").should("not.exist");

View File

@@ -10,13 +10,13 @@ describe("SMOKE SERVICE PM SECTION", () => {
cy.get("input[name=password]") cy.get("input[name=password]")
.clear() .clear()
.type(`${Cypress.env("adminpassword")}{enter}`); .type(`${Cypress.env("adminpassword")}{enter}`);
cy.url().should("include", "/ay-evaluate");
cy.visit("/svc-pms"); cy.visit("/svc-pms");
cy.url().should("include", "/svc-pms"); cy.url().should("include", "/svc-pms");
cy.get("[data-cy=generalerror]").should("not.exist"); cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=pmsTable]"); cy.get("[data-cy=pmsTable]");
cy.visit("/svc-pm-items"); cy.visit("/svc-pm-items");
cy.url().should("include", "/svc-pm-items"); cy.url().should("include", "/svc-pm-items");
cy.get("[data-cy=generalerror]").should("not.exist"); cy.get("[data-cy=generalerror]").should("not.exist");
@@ -42,7 +42,6 @@ describe("SMOKE SERVICE PM SECTION", () => {
cy.get("[data-cy=generalerror]").should("not.exist"); cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=PMItemPartsTable]"); cy.get("[data-cy=PMItemPartsTable]");
cy.visit("/svc-pm-item-labors"); cy.visit("/svc-pm-item-labors");
cy.url().should("include", "/svc-pm-item-labors"); cy.url().should("include", "/svc-pm-item-labors");
cy.get("[data-cy=generalerror]").should("not.exist"); cy.get("[data-cy=generalerror]").should("not.exist");

View File

@@ -10,8 +10,8 @@ describe("SMOKE INVENTORY", () => {
cy.get("input[name=password]") cy.get("input[name=password]")
.clear() .clear()
.type(`${Cypress.env("adminpassword")}{enter}`); .type(`${Cypress.env("adminpassword")}{enter}`);
cy.url().should("include", "/ay-evaluate");
//################# INVENTORY //################# INVENTORY
cy.visit("/inv-parts"); cy.visit("/inv-parts");
cy.url().should("include", "/inv-parts"); cy.url().should("include", "/inv-parts");

View File

@@ -10,8 +10,8 @@ describe("SMOKE VENDORS SECTION", () => {
cy.get("input[name=password]") cy.get("input[name=password]")
.clear() .clear()
.type(`${Cypress.env("adminpassword")}{enter}`); .type(`${Cypress.env("adminpassword")}{enter}`);
cy.url().should("include", "/ay-evaluate");
//################# VENDORS //################# VENDORS
cy.visit("/vendors"); cy.visit("/vendors");
cy.url().should("include", "/vendors"); cy.url().should("include", "/vendors");

View File

@@ -10,6 +10,7 @@ describe("SMOKE", () => {
cy.get("input[name=password]") cy.get("input[name=password]")
.clear() .clear()
.type(`${Cypress.env("adminpassword")}{enter}`); .type(`${Cypress.env("adminpassword")}{enter}`);
cy.url().should("include", "/ay-evaluate");
//################# ACCOUNTING //################# ACCOUNTING

View File

@@ -10,7 +10,7 @@ describe("SMOKE ADMIN SECTION", () => {
cy.get("input[name=password]") cy.get("input[name=password]")
.clear() .clear()
.type(`${Cypress.env("adminpassword")}{enter}`); .type(`${Cypress.env("adminpassword")}{enter}`);
cy.url().should("include", "/ay-evaluate");
//################# ADMIN //################# ADMIN
cy.visit("/adm-global-settings"); cy.visit("/adm-global-settings");
cy.url().should("include", "/adm-global-settings"); cy.url().should("include", "/adm-global-settings");

View File

@@ -10,7 +10,7 @@ describe("SMOKE OPERATIONS SECTION", () => {
cy.get("input[name=password]") cy.get("input[name=password]")
.clear() .clear()
.type(`${Cypress.env("adminpassword")}{enter}`); .type(`${Cypress.env("adminpassword")}{enter}`);
cy.url().should("include", "/ay-evaluate");
//################# OPERATIONS //################# OPERATIONS
cy.visit("/ops-backup"); cy.visit("/ops-backup");

View File

@@ -10,8 +10,8 @@ describe("SMOKE MISC", () => {
cy.get("input[name=password]") cy.get("input[name=password]")
.clear() .clear()
.type(`${Cypress.env("adminpassword")}{enter}`); .type(`${Cypress.env("adminpassword")}{enter}`);
cy.url().should("include", "/ay-evaluate");
cy.url().should("include", "/ay-evaluate");
//################# MISC //################# MISC
cy.visit("/about"); cy.visit("/about");
cy.url().should("include", "/about"); cy.url().should("include", "/about");