This commit is contained in:
65
ayanova/tests/e2e/OLD/select-list-templates.js
Normal file
65
ayanova/tests/e2e/OLD/select-list-templates.js
Normal file
@@ -0,0 +1,65 @@
|
||||
// https://docs.cypress.io/api/introduction/api.html
|
||||
|
||||
describe("PICK LIST TEMPLATE", () => {
|
||||
it("Successfully changes pick list template", () => {
|
||||
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.url().should("include", "/home-dashboard");
|
||||
|
||||
cy.visit("/adm-global-settings");
|
||||
cy.url().should("include", "/adm-global-settings");
|
||||
cy.get("[data-cy=picklisttemplates]").click();
|
||||
cy.url().should("include", "/adm-global-select-templates");
|
||||
cy.get("[data-cy=SelectTemplate]").type("3{enter}", { force: true });
|
||||
|
||||
//hide tags field
|
||||
cy.get("[data-cy=usertagsInclude]").uncheck({ force: true });
|
||||
// cy.get(
|
||||
// '[data-cy="adm-global-select-templates:save"] > .v-btn__content > .v-icon'
|
||||
// ).click();
|
||||
cy.get(
|
||||
'[data-cy="adm-global-select-templates:save"] > .v-btn__content > .v-icon'
|
||||
).click({ force: true });
|
||||
cy.visit("/widgets/0");
|
||||
cy.url().should("include", "/widgets/0");
|
||||
//select a user with a zone set
|
||||
cy.get("[data-cy=userid] > .v-input")
|
||||
.type("..zone")
|
||||
.wait(500)
|
||||
.type("{downarrow}{downarrow}{enter}");
|
||||
//tags is off so there shouldn't be any "zones" visible in there
|
||||
cy.contains("zone").should("not.exist");
|
||||
|
||||
//NOW DO THE OPPOSITE
|
||||
cy.visit("/adm-global-settings");
|
||||
cy.url().should("include", "/adm-global-settings");
|
||||
cy.get("[data-cy=picklisttemplates]").click();
|
||||
cy.url().should("include", "/adm-global-select-templates");
|
||||
cy.get("[data-cy=SelectTemplate]").type("3{enter}", { force: true });
|
||||
|
||||
//show tags field
|
||||
cy.get("[data-cy=usertagsInclude]").check({ force: true });
|
||||
cy.get(
|
||||
'[data-cy="adm-global-select-templates:save"] > .v-btn__content > .v-icon'
|
||||
).click({ force: true });
|
||||
cy.visit("/widgets/0");
|
||||
cy.url().should("include", "/widgets/0");
|
||||
//select a user with a zone set
|
||||
cy.get("[data-cy=userid] > .v-input")
|
||||
.type("..zone")
|
||||
.wait(500)
|
||||
.type("{downarrow}{downarrow}{enter}");
|
||||
//tags is on so there should be "zone1" visible in there
|
||||
cy.contains("zone").should("exist");
|
||||
|
||||
//-----------------
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user