60 lines
1.8 KiB
JavaScript
60 lines
1.8 KiB
JavaScript
describe("GZ-DATA-TABLE", () => {
|
|
it("Data table works", () => {
|
|
cy.visit("/login");
|
|
|
|
cy.get("input[name=username]")
|
|
.clear()
|
|
.type("BizAdminFull");
|
|
|
|
// {enter} causes the form to submit
|
|
cy.get("input[name=password]")
|
|
.clear()
|
|
.type("BizAdminFull{enter}");
|
|
cy.url().should("include", "/home-dashboard");
|
|
cy.visit("/widgets");
|
|
cy.url().should("include", "/widgets");
|
|
|
|
cy.contains("Rows per page");
|
|
//select default widget list view
|
|
cy.get("[data-cy=selectlistview]").type("-{enter}", { force: true });
|
|
//confirm we see the data expected
|
|
cy.contains("Name");
|
|
cy.contains("Serial #");
|
|
cy.contains("Price");
|
|
//refresh
|
|
cy.get("[data-cy=refresh]").click();
|
|
|
|
//change datafilters
|
|
cy.get("[data-cy=selectlistview]").type("-{enter}", { force: true });
|
|
|
|
//filter
|
|
cy.get("[data-cy=filter]").click();
|
|
cy.contains("List view");
|
|
//move username to first position
|
|
cy.get(
|
|
'[data-cy="columncard:username"] > .v-card__text > .d-flex > :nth-child(1) > .v-btn__content > [data-cy=movestart]'
|
|
).click();
|
|
|
|
//go back to widgetlist
|
|
cy.go("back");
|
|
|
|
//confirm the first column is the username
|
|
// console.log(
|
|
// cy.get("thead > tr > th:nth-child(1) > span").invoke("innerText")
|
|
// );
|
|
cy.get("thead > tr > th:nth-child(1) > span").contains("NUser");
|
|
|
|
//cy.get("thead > tr > th:nth-child(1)").contains("User");
|
|
|
|
// //navigate and confirm
|
|
// //open nav and home menu
|
|
// cy.get("[data-cy=navicon]").click();
|
|
// cy.get("[data-cy=home]").click();
|
|
// cy.get("[data-cy='nav/home-user-settings']").click();
|
|
//
|
|
// cy.get("[data-cy=contextmenu]").click();
|
|
// cy.get("[data-cy='app:logout']").click();
|
|
// cy.url().should("include", "/login");
|
|
});
|
|
});
|