//################# COMMENTED OUT BECAUSE TOO PROBLEMATIC TO TEST, HAS SIDE EFFECTS AND IF IT FAILS THEN NEEDS TO BE REVERSED TO RE-RUN THE TEST AGAIN //BAH // // https://docs.cypress.io/api/introduction/api.html // describe("CUSTOMIZE", () => { // it("Edits and works", () => { // cy.visit("/login"); // cy.get("input[name=username]") // .clear() // .type(Cypress.env("adminusername")); // // {enter} causes the form to submit // cy.get("input[name=password]") // .clear() // .type(`${Cypress.env("adminpassword")}{enter}`); // cy.visit("/customers/1"); // cy.url().should("include", "/customers/1"); // //check serial field is present, then hide it and check it's gone then re-show it again // cy.get("[data-cy=serial]").should("exist"); // cy.get("[data-cy=customerCustom8]").should("not.exist"); // cy.wait(100); // cy.get("[data-cy=contextmenu]").click(); // cy.get('[data-cy="app:customize"]').click(); // cy.url().should("include", "/customize/customer"); // //hide serial // cy.get("[data-cy=SerialVisible]").uncheck({ force: true }); // cy.wait(10); // //show customer 8 and set it to a type // cy.get("[data-cy=customerCustom8]").scrollIntoView(); // cy.get("[data-cy=customerCustom8Visible]").check({ force: true }); // cy.get("[data-cy=customerCustom8SelectType]").type("tr{enter}", { // force: true // }); // cy.get('[data-cy="customize:save"] > .v-btn__content > .v-icon').click(); // cy.go("back"); // //check customize worked // cy.get("[data-cy=serial]").should("not.exist"); // cy.get("[data-cy=customerCustom8]").should("exist"); // //reverse // cy.wait(100); // cy.get("[data-cy=contextmenu]").click(); // cy.get('[data-cy="app:customize"]').click(); // cy.url().should("include", "/customize/customer"); // cy.get("[data-cy=SerialVisible]").check({ force: true }); // cy.get("[data-cy=customerCustom8Visible]").uncheck({ force: true }); // cy.get("[data-cy=customerCustom8SelectType]").type("te{enter}", { // force: true // }); // cy.get('[data-cy="customize:save"] > .v-btn__content > .v-icon').click(); // cy.go("back"); // cy.get("[data-cy=serial]").should("exist"); // cy.get("[data-cy=customerCustom8]").should("not.exist"); // //----- // }); // });