This commit is contained in:
2021-12-17 18:15:04 +00:00
parent 0b891e2e9d
commit 11b524c381
4 changed files with 569 additions and 33 deletions

View File

@@ -2,13 +2,13 @@
"defaultCommandTimeout":5000,
"integrationFolder": "tests",
"supportFile":"support",
"xbaseUrl": "http://localhost:7575",
"baseUrl": "https://test.helloayanova.com",
"xxxxbaseUrl":"http://localhost:8080",
"xxbaseUrl": "http://localhost:7575",
"xbaseUrl": "https://test.helloayanova.com",
"baseUrl":"http://localhost:8080",
"video":false,
"env": {
"xapiBaseUrl":"http://localhost:7575/api/v8.0/",
"apiBaseUrl":"https://test.helloayanova.com/api/v8.0/",
"apiBaseUrl":"http://localhost:7575/api/v8.0/",
"xapiBaseUrl":"https://test.helloayanova.com/api/v8.0/",
"adminusername": "superuser",
"adminpassword": "l3tm3in",
"accountinguser": "Accounting",

View File

@@ -1,2 +1,2 @@
rem ./node_modules/.bin/cypress run --browser firefox --no-exit
./node_modules/.bin/cypress run --browser chrome --no-exit
./node_modules/.bin/cypress run --browser firefox --no-exit
rem ./node_modules/.bin/cypress run --browser chrome --no-exit

View File

@@ -63,29 +63,29 @@ function confirmJobDone(jobId, authToken) {
}
before(() => {
cy.request({
url: `${Cypress.env("apiBaseUrl")}auth`,
method: "POST",
body: {
login: Cypress.env("adminusername"),
password: Cypress.env("adminpassword")
}
})
.its("body")
.then((res) => {
cy.request({
method: "POST",
url: `${Cypress.env("apiBaseUrl")}trial/seed/small/-7/true`,
auth: {
bearer: res.data.token
}
})
.its("body")
.then((resjob) => {
cy.log(`resjob is: ${resjob}`);
// expect(resjob.body).to.have.property('jobId');
confirmJobDone(resjob.jobId, res.data.token);
});
});
});
// before(() => {
// cy.request({
// url: `${Cypress.env("apiBaseUrl")}auth`,
// method: "POST",
// body: {
// login: Cypress.env("adminusername"),
// password: Cypress.env("adminpassword")
// }
// })
// .its("body")
// .then((res) => {
// cy.request({
// method: "POST",
// url: `${Cypress.env("apiBaseUrl")}trial/seed/small/-7/true`,
// auth: {
// bearer: res.data.token
// }
// })
// .its("body")
// .then((resjob) => {
// cy.log(`resjob is: ${resjob}`);
// // expect(resjob.body).to.have.property('jobId');
// confirmJobDone(resjob.jobId, res.data.token);
// });
// });
// });

View File

@@ -0,0 +1,536 @@
// Basic smoke test, visit every form to ensure they load
describe("SMOKE", () => {
it("Every form opens without error", () => {
cy.visit("/login");
cy.get("input[name=username]")
.clear()
.type(Cypress.env("adminusername"));
// {enter} causes the form to submit
cy.get("input[name=password]")
.clear()
.type(`${Cypress.env("adminpassword")}{enter}`);
//################# HOME
cy.visit("/home-dashboard");
cy.url().should("include", "/home-dashboard");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.visit("/home-search");
cy.url().should("include", "/home-search");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=phrase]");
cy.visit("/home-schedule");
cy.url().should("include", "/home-schedule");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=calendar]");
cy.visit("/home-memos");
cy.url().should("include", "/home-memos");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=memosTable]");
cy.visit("/home-memos/0"); //no reliable single id would work for existing
cy.url().should("include", "/home-memos/0");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=pickListSelectedUserId]");
cy.visit("/home-reminders");
cy.url().should("include", "/home-reminders");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=remindersTable]");
cy.visit("/home-reminders/0");
cy.url().should("include", "/home-reminders/0");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
cy.visit("/home-reviews");
cy.url().should("include", "/home-reviews");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=reviewsTable]");
cy.visit("/home-reviews/8/1");
cy.url().should("include", "/home-reviews/8/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=clickThru]");
cy.visit("/home-user-settings");
cy.url().should("include", "/home-user-settings");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=emailAddress]");
cy.visit("/home-password");
cy.url().should("include", "/home-password");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=loginName]");
cy.visit("/home-security");
cy.url().should("include", "/home-security");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=tfa]");
//can't do this without reset code etc, just logs out
// cy.visit("/home-reset");
// cy.url().should("include", "/home-reset");
// cy.get("[data-cy=loginName]");
cy.visit("/home-notify-subscriptions");
cy.url().should("include", "/home-notify-subscriptions");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=subsTable]");
cy.visit("/home-notify-subscriptions/0");
cy.url().should(
"include",
"/home-notify-subscriptions/0"
);
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=eventType]");
cy.visit("/home-notifications");
cy.url().should("include", "/home-notifications");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=notifications]");
cy.visit("/home-notify-direct");
cy.url().should("include", "/home-notify-direct");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=pickListSelectedUserId]");
//################# CUSTOMERS
cy.visit("/cust-customers");
cy.url().should("include", "/cust-customers");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=customersTable]");
cy.visit("/cust-customers/1");
cy.url().should("include", "/cust-customers/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
cy.visit("/cust-customer-notes/1");
cy.url().should("include", "/cust-customer-notes/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=clickThru]");
cy.visit("/cust-customer-note/0");
cy.url().should("include", "/cust-customer-note/0");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=notes]");
cy.visit("/cust-head-offices");
cy.url().should("include", "/cust-head-offices");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=headofficesTable]");
cy.visit("/cust-head-offices/1");
cy.url().should("include", "cust-head-offices/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
cy.visit("/cust-users");
cy.url().should("include", "/cust-users");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=custUsersTable]");
// cy.visit("/cust-users/0");
// cy.url().should("include", "/cust-users/0");
// cy.get("[data-cy=customerId]");
//################# SERVICE
cy.visit("/svc-schedule");
cy.url().should("include", "/svc-schedule");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=calendar]");
cy.visit("/svc-workorders");
cy.url().should("include", "/svc-workorders");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=workordersTable]");
cy.visit("/svc-workorders/1");
cy.url().should("include", "svc-workorders/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=serial]");
cy.visit("/svc-quotes");
cy.url().should("include", "/svc-quotes");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=quotesTable]");
cy.visit("/svc-pm-list");
cy.url().should("include", "/svc-pm-list");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=pmsTable]");
cy.visit("/svc-units");
cy.url().should("include", "/svc-units");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=unitsTable]");
cy.visit("/svc-units/1");
cy.url().should("include", "/svc-units/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=serial]");
cy.visit("/svc-unit-models");
cy.url().should("include", "/svc-unit-models");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=unitmodelsTable]");
cy.visit("/svc-unit-models/1");
cy.url().should("include", "svc-unit-models/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=number]");
cy.visit("/svc-loaners");
cy.url().should("include", "/svc-loaners");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=loanUnitsTable]");
cy.visit("/svc-loaners/1");
cy.url().should("include", "/svc-loaners/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
cy.visit("/svc-contracts");
cy.url().should("include", "/svc-contracts");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=contractsTable]");
cy.visit("/svc-contracts/1");
cy.url().should("include", "/svc-contracts/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
cy.visit("/svc-projects");
cy.url().should("include", "/svc-projects");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=projectsTable]");
cy.visit("/svc-projects/1");
cy.url().should("include", "/svc-projects/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
cy.visit("/svc-csr");
cy.url().should("include", "/svc-csr");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=csrTable]");
cy.visit("/svc-csr/1");
cy.url().should("include", "/svc-csr/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
//################# INVENTORY
cy.visit("/inv-parts");
cy.url().should("include", "/inv-parts");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=partsTable]");
cy.visit("/inv-parts/1");
cy.url().should("include", "/inv-parts/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=partName]");
cy.visit("/inv-purchase-orders");
cy.url().should("include", "/inv-purchase-orders");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=purchaseordersTable]");
cy.visit("/inv-purchase-orders/1");
cy.url().should("include", "/inv-purchase-orders/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=serial]");
cy.visit("/inv-part-inventory");
cy.url().should("include", "/inv-part-inventory");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=partInventoryTable]");
cy.visit("/inv-part-inventory-transactions");
cy.url().should(
"include",
"/inv-part-inventory-transactions"
);
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=partInventoryTransactionsTable]");
cy.visit("/inv-part-assemblies");
cy.url().should("include", "/inv-part-assemblies");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=partassemblysTable]");
cy.visit("/inv-part-assemblies/1");
cy.url().should("include", "/inv-part-assemblies/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
cy.visit("/inv-part-serials/1");
cy.url().should("include", "/inv-part-serials/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=selectedPartId]");
cy.visit("/inv-part-stock-levels/1");
cy.url().should("include", "/inv-part-stock-levels/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=selectedPartId]");
cy.visit("/inv-part-warehouses");
cy.url().should("include", "/inv-part-warehouses");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=partwarehousesTable]");
cy.visit("/inv-part-warehouses/1");
cy.url().should("include", "/inv-part-warehouses/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
cy.visit("/inv-part-adjustment");
cy.url().should("include", "/inv-part-adjustment");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=description]");
//################# VENDORS
cy.visit("/vendors");
cy.url().should("include", "/vendors");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=vendorsTable]");
cy.visit("/vendors/1");
cy.url().should("include", "vendors/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
//################# ACCOUNTING
cy.visit("/acc-service-rates");
cy.url().should("include", "/acc-service-rates");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=serviceRatesTable]");
cy.visit("/acc-service-rates/1");
cy.url().should("include", "/acc-service-rates/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
cy.visit("/acc-travel-rates");
cy.url().should("include", "/acc-travel-rates");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=travelRatesTable]");
cy.visit("/acc-travel-rates/1");
cy.url().should("include", "/acc-travel-rates/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
cy.visit("/acc-tax-codes");
cy.url().should("include", "/acc-tax-codes");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=taxCodesTable]");
cy.visit("/acc-tax-codes/1");
cy.url().should("include", "/acc-tax-codes/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
//################# ADMIN
cy.visit("/adm-global-settings");
cy.url().should("include", "/adm-global-settings");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=filterCaseSensitive]");
cy.visit("/adm-global-select-templates");
cy.url().should(
"include",
"/adm-global-select-templates"
);
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=selectTemplate]");
cy.visit("/adm-global-logo");
cy.url().should("include", "/adm-global-logo");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=uploadSmall]");
cy.visit("/adm-global-seeds");
cy.url().should("include", "/adm-global-seeds");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=purchaseOrderNextSerial]");
cy.visit("/adm-license");
cy.url().should("include", "/adm-license");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=licenseForm]");
cy.visit("/adm-users");
cy.url().should("include", "/adm-users");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=usersTable]");
cy.visit("/adm-users/1");
cy.url().should("include", "/adm-users/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
cy.visit("/adm-translations");
cy.url().should("include", "/adm-translations");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=transTable]");
cy.visit("/adm-translations/1");
cy.url().should("include", "/adm-translations/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
cy.visit("/adm-report-templates");
cy.url().should("include", "/adm-report-templates");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=reportTemplatesTable]");
cy.visit("/report-edit/1");
cy.url().should("include", "/report-edit/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=viewChange]");
cy.visit("/adm-attachments");
cy.url().should("include", "/adm-attachments");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=attachTable]");
cy.visit("/adm-history");
cy.url().should("include", "/adm-history");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=historyTable]");
cy.visit("/adm-import");
cy.url().should("include", "/adm-import");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=ayaType]");
//################# OPERATIONS
cy.visit("/ops-backup");
cy.url().should("include", "/ops-backup");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=backupTable]");
cy.visit("/ops-server-state");
cy.url().should("include", "/ops-server-state");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=serverStateOpen]");
cy.visit("/ops-jobs");
cy.url().should("include", "/ops-jobs");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=jobsTable]");
cy.visit("/ops-log");
cy.url().should("include", "/ops-log");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=selectedLog]");
cy.visit("/ops-metrics");
cy.url().should("include", "/ops-metrics");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=selectedTimePeriod]");
cy.visit("/ops-profile");
cy.url().should("include", "/ops-profile");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=profileCard]");
cy.visit("/ops-notification-settings");
cy.url().should("include", "/ops-notification-settings");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=smtpDeliveryActive]");
cy.visit("/ops-notify-queue");
cy.url().should("include", "/ops-notify-queue");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=notifyQueueTable]");
cy.visit("/ops-view-configuration");
cy.url().should("include", "/ops-view-configuration");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=configCard]");
//################# MISC
cy.visit("/about");
cy.url().should("include", "/about");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=versionCard]");
cy.visit("/applog");
cy.url().should("include", "/applog");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=logText]");
cy.visit("/customize/Customer");
cy.url().should("include", "/customize/Customer");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=customizeForm]");
cy.visit("/data-list-column-view/CustomerDataList");
cy.url().should(
"include",
"/data-list-column-view/CustomerDataList"
);
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=dlcForm]");
cy.visit("/home-reviews/2/1");
cy.url().should("include", "/home-reviews/2/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=reviewsTable]");
cy.visit("/history/3/1");
cy.url().should("include", "/history/3/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=timeLine]");
cy.visit("/open/8/1");
cy.url().should("include", "/cust-customers/1");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=name]");
cy.visit("/NOTFOUND");
cy.contains("404");
//LOGOUT MANAGER USER
cy.get("[data-cy=navicon]").click();
cy.get("[data-cy=logout]").click();
cy.url().should("include", "/login");
cy.get("[data-cy=generalerror]").should('not.exist');
//CUSTOMER PAGES
cy.get("input[name=username]")
.clear()
.type("Customer");
cy.get("input[name=password]")
.clear()
.type("Customer{enter}");
cy.url().should("include", "/customer-csr");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=csrTable]");
cy.visit("/customer-workorders");
cy.url().should("include", "/customer-workorders");
cy.get("[data-cy=generalerror]").should('not.exist');
cy.get("[data-cy=workordersTable]");
//LOGOUT
cy.get("[data-cy=navicon]").click();
cy.get("[data-cy=logout]").click();
cy.url().should("include", "/login");
cy.get("[data-cy=generalerror]").should('not.exist');
//-----------------------------------------------------
});
});