This commit is contained in:
20
e2e/tests/regression/accounting-user/000-setup.js
Normal file
20
e2e/tests/regression/accounting-user/000-setup.js
Normal 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
|
||||
//-----------------------------------------------------
|
||||
});
|
||||
});
|
||||
19
e2e/tests/regression/accounting-user/0100-search.js
Normal file
19
e2e/tests/regression/accounting-user/0100-search.js
Normal 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
|
||||
//-----------------------------------------------------
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user