This commit is contained in:
@@ -18,3 +18,10 @@ import './commands'
|
|||||||
|
|
||||||
// Alternatively you can use CommonJS syntax:
|
// Alternatively you can use CommonJS syntax:
|
||||||
// require('./commands')
|
// 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')
|
||||||
|
// })
|
||||||
@@ -15,9 +15,10 @@ describe("When Accounting user logs in", () => {
|
|||||||
//open nav pane
|
//open nav pane
|
||||||
cy.get("[data-cy=navicon]").click();
|
cy.get("[data-cy=navicon]").click();
|
||||||
cy.contains("Accounting"); //accounting is part of name displayed at top
|
cy.contains("Accounting"); //accounting is part of name displayed at top
|
||||||
|
cy.get("[data-cy=home]").click();
|
||||||
|
|
||||||
//DASHBOARD
|
//DASHBOARD
|
||||||
cy.get("[data-cy=home]").click();
|
/*
|
||||||
cy.get("[data-cy='nav/home-dashboard']").click();
|
cy.get("[data-cy='nav/home-dashboard']").click();
|
||||||
cy.url().should("include", "/home-dashboard");
|
cy.url().should("include", "/home-dashboard");
|
||||||
|
|
||||||
@@ -34,14 +35,40 @@ describe("When Accounting user logs in", () => {
|
|||||||
|
|
||||||
//MEMOS
|
//MEMOS
|
||||||
cy.get("[data-cy=navicon]").click();
|
cy.get("[data-cy=navicon]").click();
|
||||||
|
*/
|
||||||
cy.get("[data-cy='nav/home-memos']").click();
|
cy.get("[data-cy='nav/home-memos']").click();
|
||||||
cy.url().should("include", "/home-memos");
|
cy.url().should("include", "/home-memos");
|
||||||
cy.get("[data-cy=memosTable]");
|
cy.get("[data-cy=memosTable]");
|
||||||
//new memo
|
//new memo
|
||||||
cy.get("[data-cy='memo-list:new']").click();
|
cy.get("[data-cy='memo-list:new']").click();
|
||||||
// cy.get('[data-cy=pickListSelectedUserId] > .v-input > .v-input__control')
|
cy.url().should("include", "/home-memos/");
|
||||||
cy.get('[data-cy=pickListSelectedUserId]').click().type("accounting{enter}");
|
cy.get("[data-cy=pickListSelectedUserId]")
|
||||||
cy.get("[data-cy=name]").type("cypress-test-subject-xxx{enter}");
|
.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();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user