This commit is contained in:
2021-10-29 20:16:53 +00:00
parent 9544547019
commit 6ffcb519eb
2 changed files with 39 additions and 5 deletions

View File

@@ -18,3 +18,10 @@ import './commands'
// Alternatively you can use CommonJS syntax:
// require('./commands')
//unique test run ID for all tests
Cypress.config('cyid', `cy${new Date().getTime()}`);
//cypid+1635536946931-test-subject
// before(() => {
// cy.visit('/users/new')
// })

View File

@@ -15,9 +15,10 @@ describe("When Accounting user logs in", () => {
//open nav pane
cy.get("[data-cy=navicon]").click();
cy.contains("Accounting"); //accounting is part of name displayed at top
cy.get("[data-cy=home]").click();
//DASHBOARD
cy.get("[data-cy=home]").click();
/*
cy.get("[data-cy='nav/home-dashboard']").click();
cy.url().should("include", "/home-dashboard");
@@ -34,18 +35,44 @@ describe("When Accounting user logs in", () => {
//MEMOS
cy.get("[data-cy=navicon]").click();
*/
cy.get("[data-cy='nav/home-memos']").click();
cy.url().should("include", "/home-memos");
cy.get("[data-cy=memosTable]");
//new memo
cy.get("[data-cy='memo-list:new']").click();
// cy.get('[data-cy=pickListSelectedUserId] > .v-input > .v-input__control')
cy.get('[data-cy=pickListSelectedUserId]').click().type("accounting{enter}");
cy.get("[data-cy=name]").type("cypress-test-subject-xxx{enter}");
cy.url().should("include", "/home-memos/");
cy.get("[data-cy=pickListSelectedUserId]")
.click()
.type("accounting{enter}");
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`
);
cy.get("[data-cy=tags]")
.click()
.type("zone1{enter}blue{enter}zone2{enter}");//select some tags
cy.get("[data-cy='memo-edit:save']").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']").click();
// cy.get("[data-cy='nav/home-memos']");
// cy.get("[data-cy='nav/home-reminders']");
// cy.get("[data-cy='nav/home-reviews']");