From 160f8e208ea06d3426339105556b02405432496b Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 1 Nov 2021 22:11:47 +0000 Subject: [PATCH] --- .../accounting-user/accounting-features.js | 47 ++++++++++++------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/e2e/tests/regression/accounting-user/accounting-features.js b/e2e/tests/regression/accounting-user/accounting-features.js index ecf1b92..c8cb7de 100644 --- a/e2e/tests/regression/accounting-user/accounting-features.js +++ b/e2e/tests/regression/accounting-user/accounting-features.js @@ -102,10 +102,10 @@ describe("When Accounting user logs in", () => { cy.get("[data-cy=name]").type( `${Cypress.config("cyid")}-test-reminder{enter}` ); - cy.get("[data-cy='dpick:startDate']").type(dToday); - cy.get("[data-cy='tpick:startDate']").type(tNow); - cy.get("[data-cy='dpick:stopDate']").type(dToday); - cy.get("[data-cy='tpick:stopDate']").type(tOneHourFromNow); + cy.get("[data-cy='startDate:date']").type(dToday); + cy.get("[data-cy='startDate:time']").type(tNow); + cy.get("[data-cy='stopDate:date']").type(dToday); + cy.get("[data-cy='stopDate:time']").type(tOneHourFromNow); cy.get("[data-cy=notes]").type(`This is a reminder{enter}eot{enter}`); cy.get(".v-color-picker__input > input").clear().type("#11E1D07E{enter}"); //select a color cy.get('[data-cy="reminder-edit:save"] > .v-btn__content').click(); @@ -119,7 +119,7 @@ describe("When Accounting user logs in", () => { cy.get("[data-cy='nav/home-schedule']").click(); cy.url().should("include", "/home-schedule"); cy.contains(`${Cypress.config("cyid")}-test-reminder`); -*/ + //NOTIFICATION SUBSCRIPTION cy.get("[data-cy=navicon]").click(); @@ -127,21 +127,32 @@ describe("When Accounting user logs in", () => { cy.url().should("include", "/home-notify-subscriptions"); cy.get("[data-cy='notify-subscriptions:new']").click(); cy.url().should("include", "/home-notify-subscriptions/0"); - //autocomplete method required - cy.get("[data-cy=eventType]").type("O", { force: true }); //bring up the menu by typing an available option - cy.contains("Object created").click({ force: true }); //look for the option and click it on the page - + cy.chooseVSelect("eventType", "Object created"); cy.chooseVSelect("ayaType", "Contract"); + cy.get("[data-cy='notify-subscription:save'] > .v-btn__content").click(); + //confirm + cy.get("[data-cy=navicon]").click(); + cy.get("[data-cy='nav/home-notify-subscriptions']").click(); + cy.url().should("include", "/home-notify-subscriptions"); + cy.contains("Object created"); + cy.contains("Contract"); + cy.contains("Deliver in application"); +*/ - // cy.get("[data-cy=ayaType]").click({force:true});//.contains(".v-list-item__title","Contract").click({force:true}); - // cy.get(".v-list-item__title").contains(/^Contract$/).click({force:true}); - - //this one is scoped to a class of .ayaType that had to be jigged on to the menu to work see the notify subscription code - //reason being that looking for Contract unscoped matches eventType above and selects again in there, the class is required to put - //on the vmenu that is generated so that it can find it in there rather than in the wrong place, ugly workaround required because not fixed yet in this case: - //https://github.com/vuetifyjs/vuetify/issues/10988#issuecomment-726089949 - //note it's prefixed with .cy for future to strip it all back out when vuetify gets their e2e testing shit together properly (likely v3) - //cy.get(".cyAyaType").contains("Contract").click({force:true}); + //CONTRACT + cy.get("[data-cy=navicon]").click(); + cy.get("[data-cy=accounting]").click(); + cy.get("[data-cy='nav/svc-contracts']").click(); + cy.url().should("include", "/svc-contracts"); + cy.get("[data-cy=contractsTable]"); + cy.get("[data-cy='contract-list:new']").click(); + cy.get("[data-cy=name]").type( + `${Cypress.config("cyid")}-test-contract{enter}` + ); + cy.get("[data-cy='responseTime:days']").type('1'); + cy.get("[data-cy='partsOverridePct']").type('2'); + cy.get("[data-cy='serviceRatesOverridePct']").type('3'); + cy.get("[data-cy='travelRatesOverridePct']").type('4'); //========================================================= // cy.get("[data-cy='nav/home-reminders']");