This commit is contained in:
2021-12-20 19:12:32 +00:00
parent c08b169919
commit f3ff88229e
20 changed files with 99 additions and 229 deletions

View File

@@ -0,0 +1,20 @@
/// <reference types="cypress" />
describe("When Accounting user logs in", () => {
it("should set up accounting block user options", () => {
cy.ayLogin("accounting");
//open nav pane
cy.get("[data-cy=navicon]").click();
cy.contains("- Accounting"); //part of name displayed at top
//USER OPTIONS
cy.get("[data-cy=home]").click();
cy.get("[data-cy='nav/home-user-settings']").click();
cy.url().should("include", "/home-user-settings");
cy.get("[data-cy='nativeDateTimeInput']").check({ force: true });
//END OF TEST
//-----------------------------------------------------
});
});

View File

@@ -0,0 +1,19 @@
/// <reference types="cypress" />
describe("Search", () => {
it("should work", () => {
//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");
//END OF TEST
//-----------------------------------------------------
});
});

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
describe("When Accounting user logs in", () => {
describe.skip("When Accounting user logs in", () => {
it("should correctly run all functionality", () => {
//format for typing input and setting value is always YYYY-MM-DD for date and HH:MM in 24 hour time for time
const dNow = new Date();
@@ -14,16 +14,7 @@ describe("When Accounting user logs in", () => {
.toString()
.padStart(2, "0")}:${dNow.getMinutes().toString().padStart(2, "0")}`;
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");
cy.ayLogin("accounting");
//open nav pane
cy.get("[data-cy=navicon]").click();