This commit is contained in:
2020-04-05 17:59:08 +00:00
parent 2858ab402e
commit 26f5658e03
2 changed files with 31 additions and 7 deletions

View File

@@ -267,8 +267,8 @@ export default {
//NOTE debounce with a watcher is a bit different, currently it has to be done exactly this way, nothing else will work properly //NOTE debounce with a watcher is a bit different, currently it has to be done exactly this way, nothing else will work properly
//https://vuejs.org/v2/guide/migration.html#debounce-Param-Attribute-for-v-model-removed //https://vuejs.org/v2/guide/migration.html#debounce-Param-Attribute-for-v-model-removed
//----------------- //-----------------
let vm = this; let vm = this;
let isATwoTermQuery = false; let isATwoTermQuery = false;
let queryTerms = []; let queryTerms = [];
//NOTE: empty query is valid; it means get the top 100 ordered by template order //NOTE: empty query is valid; it means get the top 100 ordered by template order
@@ -289,7 +289,7 @@ export default {
isATwoTermQuery = true; isATwoTermQuery = true;
} else { } else {
//one term only so push it into array //one term only so push it into array
queryTerms.push(searchEntered); queryTerms.push(searchFor);
//Marker term, will be weeded back out later //Marker term, will be weeded back out later
queryTerms.push("[?]"); queryTerms.push("[?]");
} }

View File

@@ -31,11 +31,35 @@ describe("PICK LIST TEMPLATE", () => {
cy.visit("/widgets/0"); cy.visit("/widgets/0");
cy.url().should("include", "/widgets/0"); cy.url().should("include", "/widgets/0");
//select a user with a zone set //select a user with a zone set
cy.get("[data-cy=userid] > .v-input").type( cy.get("[data-cy=userid] > .v-input")
"..zone1{downarrow}{downarrow}{enter}" .type("..zone")
); .wait(500)
.type("{downarrow}{downarrow}{enter}");
//tags is off so there shouldn't be any "zones" visible in there //tags is off so there shouldn't be any "zones" visible in there
cy.contains("zone1").should("not.exist"); 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");
//----------------- //-----------------
}); });
}); });