/// describe("When Accounting user logs in", () => { it("should allow user all functionality available to them", () => { cy.visit("/login"); cy.get("input[name=username]").clear().type(Cypress.env("accountinguser")); // {enter} causes the form to submit cy.get("input[name=password]") .clear() .type(`${Cypress.env("accountingpassword")}{enter}`); cy.url().should("include", "/ay-evaluate"); //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='nav/home-dashboard']").click(); cy.url().should("include", "/home-dashboard"); //SEARCH cy.get("[data-cy=navicon]").click(); cy.get("[data-cy='nav/home-search']").click(); cy.url().should("include", "/home-search"); cy.get("[data-cy=phrase]").clear().type("xyz{enter}"); //check for expected results cy.contains("Customer"); cy.contains("XYZ Accounting"); cy.contains("Head Office"); cy.contains("XYZ Head Office"); //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.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']"); // cy.get("[data-cy='nav/home-user-settings']"); // cy.get("[data-cy='nav/home-notify-subscriptions']"); // cy.get("[data-cy='nav/home-history']"); //----------------------------------------------------- }); });