This commit is contained in:
@@ -23,3 +23,10 @@
|
||||
//
|
||||
// -- This will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||
|
||||
Cypress.Commands.add("chooseVSelect", (dataCyTag, selectionText) => {
|
||||
cy.get(`[data-cy=${dataCyTag}]`).click({ force: true });
|
||||
cy.get(".v-list-item__title")
|
||||
.contains(new RegExp("^" + selectionText + "$", "g"))
|
||||
.click({ force: true });
|
||||
});
|
||||
|
||||
@@ -30,7 +30,7 @@ describe("When Accounting user logs in", () => {
|
||||
cy.url().should("include", "/home-user-settings");
|
||||
cy.get("[data-cy='nativeDateTimeInput']").check({ force: true });
|
||||
|
||||
/* */
|
||||
/*
|
||||
|
||||
//DASHBOARD
|
||||
|
||||
@@ -113,6 +113,36 @@ describe("When Accounting user logs in", () => {
|
||||
cy.get("[data-cy='nav/home-reminders']").click();
|
||||
cy.url().should("include", "/home-reminders");
|
||||
|
||||
//SCHEDULE
|
||||
//should show reminder made above in month display by default
|
||||
cy.get("[data-cy=navicon]").click();
|
||||
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();
|
||||
cy.get("[data-cy='nav/home-notify-subscriptions']").click();
|
||||
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("ayaType", "Contract");
|
||||
|
||||
// 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});
|
||||
|
||||
//=========================================================
|
||||
// cy.get("[data-cy='nav/home-reminders']");
|
||||
// cy.get("[data-cy='nav/home-reviews']");
|
||||
|
||||
Reference in New Issue
Block a user