This commit is contained in:
2021-12-17 00:44:59 +00:00
parent 1d3fbc5352
commit 3ec770fb8c
4 changed files with 23 additions and 22 deletions

View File

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

View File

@@ -26,16 +26,15 @@
Cypress.Commands.add("chooseVSelect", (dataCyTag, selectionText) => { Cypress.Commands.add("chooseVSelect", (dataCyTag, selectionText) => {
cy.get(`[data-cy='${dataCyTag}']`).click({ force: true }); cy.get(`[data-cy='${dataCyTag}']`).click({ force: true });
cy.get(".v-list-item__title") cy.get(".v-list-item__title")
.contains(new RegExp("^" + selectionText + "$", "g")) .contains(new RegExp("^" + selectionText + "$", "g"))
.click({ force: true }); .click({ force: true });
}); });
Cypress.Commands.add("choosePickList", (dataCyTag, selectionText) => { Cypress.Commands.add("choosePickList", (dataCyTag, selectionText) => {
cy.get(`[data-cy='${dataCyTag}']`).click({ force: true }).type(selectionText); cy.get(`[data-cy='${dataCyTag}']`).click({ force: true }).type(selectionText);
cy.wait(500);
cy.get(".v-list-item__title") cy.get(".v-list-item__title")
//.contains(selectionText) .contains(new RegExp(selectionText))
.contains(new RegExp("^" + selectionText + "$", "g")) .click();
.click({ force: true });
}); });

View File

@@ -94,7 +94,9 @@ describe("When Accounting user logs in", () => {
cy.get("[data-cy=notes]").type( cy.get("[data-cy=notes]").type(
`Hello SuperUser this is my forward to you!{enter}eot{enter}` `Hello SuperUser this is my forward to you!{enter}eot{enter}`
); );
cy.get("[data-cy=pickListSelectedUserId]").click().type("SuperUser{downarrow}{enter}"); cy.get("[data-cy=pickListSelectedUserId]")
.click()
.type("SuperUser{downarrow}{enter}");
cy.get("[data-cy='memo-edit:save'] > .v-btn__content").click(); cy.get("[data-cy='memo-edit:save'] > .v-btn__content").click();
//REMINDERS //REMINDERS
@@ -195,12 +197,6 @@ describe("When Accounting user logs in", () => {
cy.contains("12 PM"); //just something to find in day view to confirm we made it there cy.contains("12 PM"); //just something to find in day view to confirm we made it there
cy.contains(`${Cypress.config("cyid")}-test-review`); cy.contains(`${Cypress.config("cyid")}-test-review`);
//NOTIFICATION
cy.get("[data-cy=notification]").click();
cy.url().should("include", "/home-notifications");
cy.contains("Object created");
cy.contains(`${Cypress.config("cyid")}-test-contract`);
//HISTORY //HISTORY
cy.get("[data-cy=navicon]").click(); cy.get("[data-cy=navicon]").click();
cy.get("[data-cy='nav/home-history']").click(); cy.get("[data-cy='nav/home-history']").click();
@@ -247,7 +243,7 @@ describe("When Accounting user logs in", () => {
); );
cy.get("[data-cy=charge]").type("2.00"); cy.get("[data-cy=charge]").type("2.00");
cy.get("[data-cy=cost]").type("1.00"); cy.get("[data-cy=cost]").type("1.00");
cy.get("[data-cy=unit]").type("{downarrow}{enter}");//choose first in list cy.get("[data-cy=unit]").type("{downarrow}{enter}"); //choose first in list
cy.get("[data-cy=notes]").type(`Test trvl rate NOTES!!!{enter}eot{enter}`); cy.get("[data-cy=notes]").type(`Test trvl rate NOTES!!!{enter}eot{enter}`);
cy.get("[data-cy='travel-rate-edit:save'] > .v-btn__content").click(); cy.get("[data-cy='travel-rate-edit:save'] > .v-btn__content").click();
cy.get("[data-cy=navicon]").click(); cy.get("[data-cy=navicon]").click();
@@ -275,6 +271,12 @@ describe("When Accounting user logs in", () => {
cy.url().should("include", "/acc-tax-codes"); cy.url().should("include", "/acc-tax-codes");
cy.contains(`${Cypress.config("cyid")}-test-tax-code`); cy.contains(`${Cypress.config("cyid")}-test-tax-code`);
//NOTIFICATION
cy.get("[data-cy=notification]").click();
cy.url().should("include", "/home-notifications");
cy.contains("Object created");
cy.contains(`${Cypress.config("cyid")}-test-contract`);
//LOGOUT //LOGOUT
cy.get("[data-cy=navicon]").click(); cy.get("[data-cy=navicon]").click();
cy.get("[data-cy=logout]").click(); cy.get("[data-cy=logout]").click();

View File

@@ -125,7 +125,7 @@ describe("When Service user logs in", () => {
//Unit //Unit
cy.get("[data-cy=woItemHeader]").click(); cy.get("[data-cy=woItemHeader]").click();
cy.get("[data-cy=woItemAddUnit]").click(); cy.get("[data-cy=woItemAddUnit]").click({force:true});
cy.choosePickList("units.unitId", "e2e"); cy.choosePickList("units.unitId", "e2e");
cy.get("[data-cy=woItemUnitGetWarrantyInfo]").click(); cy.get("[data-cy=woItemUnitGetWarrantyInfo]").click();
cy.contains("Receipt Number:"); //just confirm it displayed something cy.contains("Receipt Number:"); //just confirm it displayed something
@@ -163,8 +163,8 @@ describe("When Service user logs in", () => {
cy.get("[data-cy=woItemPartAssemblyAdd]").click(); cy.get("[data-cy=woItemPartAssemblyAdd]").click();
//Labor //Labor
cy.get("[data-cy=woItemHeader]").click(); cy.get("[data-cy=woItemHeader]").click({force:true});
cy.get("[data-cy=woItemAddLabor]").click(); cy.get("[data-cy=woItemAddLabor]").click({force:true});
cy.get("[data-cy='serviceStartDate:date']").type( cy.get("[data-cy='serviceStartDate:date']").type(
dayjs().format("YYYY-MM-DD") dayjs().format("YYYY-MM-DD")