29 lines
1.1 KiB
JavaScript
29 lines
1.1 KiB
JavaScript
/// <reference types="cypress" />
|
|
describe("Travel rate", () => {
|
|
it("should work", () => {
|
|
cy.ayLogin("accounting");
|
|
cy.visit("/acc-travel-rates");
|
|
cy.url().should("include", "/acc-travel-rates");
|
|
cy.get("[data-cy=travelRatesTable]");
|
|
cy.get("[data-cy='travel-rate-list:new']:first").click();
|
|
cy.get("[data-cy=name]").type(
|
|
`${Cypress.config("cyid")}-test-travel-rate{enter}`
|
|
);
|
|
cy.get("[data-cy=accountNumber]").type(
|
|
`${Cypress.config("cyid")}-trvl-act-#{enter}`
|
|
);
|
|
cy.get("[data-cy=charge]").type("2.00");
|
|
cy.get("[data-cy=cost]").type("1.00");
|
|
cy.get("[data-cy=unit]").type("{downarrow}{enter}"); //choose first in list
|
|
cy.get("[data-cy=notes]").type(`Test trvl rate NOTES!!!{enter}eot{enter}`);
|
|
cy.get("[data-cy='travel-rate-edit:save'] > .v-btn__content").click();
|
|
|
|
cy.visit("/acc-travel-rates");
|
|
cy.url().should("include", "/acc-travel-rates");
|
|
cy.contains(`${Cypress.config("cyid")}-test-travel-rate`);
|
|
|
|
//END OF TEST
|
|
//-----------------------------------------------------
|
|
});
|
|
});
|