From 6ffcb519ebae6b61badb6b9ce0aac73f603f7cfd Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 29 Oct 2021 20:16:53 +0000 Subject: [PATCH] --- e2e/support/index.js | 7 ++++ .../accounting-user/accounting-features.js | 37 ++++++++++++++++--- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/e2e/support/index.js b/e2e/support/index.js index d68db96..3a0f06a 100644 --- a/e2e/support/index.js +++ b/e2e/support/index.js @@ -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') +// }) \ No newline at end of file diff --git a/e2e/tests/regression/accounting-user/accounting-features.js b/e2e/tests/regression/accounting-user/accounting-features.js index 9cbe278..ce4df4a 100644 --- a/e2e/tests/regression/accounting-user/accounting-features.js +++ b/e2e/tests/regression/accounting-user/accounting-features.js @@ -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']");