This commit is contained in:
2021-12-20 20:13:54 +00:00
parent 68c08d0cb0
commit c013fb6c9e
4 changed files with 108 additions and 29 deletions

View File

@@ -0,0 +1,57 @@
/// <reference types="cypress" />
describe("Memo features", () => {
it("should work", () => {
cy.ayLogin("accounting");
cy.get("[data-cy=navicon]").click();
cy.get("[data-cy=home]").click();
cy.get("[data-cy='nav/home-memos']").click();
cy.url().should("include", "/home-memos");
cy.get("[data-cy=memosTable]");
cy.get("[data-cy='memo-list:new']").click();
cy.url().should("include", "/home-memos/");
cy.get("[data-cy=pickListSelectedUserId]")
.click()
.type("accounting{downarrow}{enter}"); //select Accounting user (self)
cy.get("[data-cy=name]").type(
`${Cypress.config("cyid")}-test-subject{enter}`
);
cy.get("[data-cy=notes]").type(
`The quick brown fox jumped{enter}over the six lazy dogs{enter}eot`
);
//TODO: TURN THIS INTO A COMMAND AND THEN SWAP THAT OUT EVERY EXISTING TEST WITH TAG ENTRY
// cy.get("[data-cy=tags]").click().type("zone1{downarrow}{enter}"); //select some tags
// cy.get("[data-cy=tags]").click().type("blue{downarrow}{enter}");
// cy.get("[data-cy=tags]").click().type("zone2{downarrow}{enter}");
cy.ayChooseExistingTags("tags",['zone1','blue','zone2']);
cy.get("[data-cy='memo-edit:save'] > .v-btn__content").click();
cy.url().should("include", "/home-memos"); //wait for nav
cy.contains(`${Cypress.config("cyid")}-test-subject`).click(); //find and open memo record
cy.contains("zone1");
cy.contains("blue");
cy.contains("zone2");
//reply
cy.get("[data-cy=contextmenu]").click();
cy.get("[data-cy='memo-edit:reply']").click();
cy.url().should("include", "/home-memos/");
cy.get("[data-cy=notes]").type(`this is my reply`);
cy.get("[data-cy='memo-edit:save'] > .v-btn__content").click();
cy.contains(`RE: ${Cypress.config("cyid")}-test-subject`).click(); //find and open reply
//forward to superuser
cy.get("[data-cy=contextmenu]").click();
cy.get("[data-cy='memo-edit:forward']").click();
cy.url().should("include", "/home-memos/");
cy.get("[data-cy=notes]").type(
`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='memo-edit:save'] > .v-btn__content").click();
});
});

View File

@@ -124,8 +124,8 @@ describe.skip("When Accounting user logs in", () => {
cy.url().should("include", "/home-notify-subscriptions");
cy.get("[data-cy='notify-subscriptions:new']:first").click();
cy.url().should("include", "/home-notify-subscriptions/0");
cy.chooseVSelect("eventType", "Object created");
cy.chooseVSelect("ayaType", "Contract");
cy.ayChooseVSelect("eventType", "Object created");
cy.ayChooseVSelect("ayaType", "Contract");
cy.get("[data-cy='notify-subscription:save'] > .v-btn__content").click();
//confirm
cy.get("[data-cy=navicon]").click();
@@ -213,7 +213,7 @@ describe.skip("When Accounting user logs in", () => {
);
cy.get("[data-cy=charge]").type("100.00");
cy.get("[data-cy=cost]").type("50.00");
cy.chooseVSelect("unit", "hour");
cy.ayChooseVSelect("unit", "hour");
cy.get("[data-cy=notes]").type(`Test svc rate NOTES!!!{enter}eot{enter}`);
cy.get("[data-cy='service-rate-edit:save'] > .v-btn__content").click();
cy.get("[data-cy=navicon]").click();