Final (?) de-widgetification

This commit is contained in:
2021-09-07 14:33:48 +00:00
parent 195edf7791
commit db8eafb1c0
22 changed files with 44 additions and 1062 deletions

View File

@@ -16,25 +16,25 @@
// .clear()
// .type(`${Cypress.env("adminpassword")}{enter}`);
// cy.visit("/widgets/1");
// cy.url().should("include", "/widgets/1");
// 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=WidgetCustom8]").should("not.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/Widget");
// cy.url().should("include", "/customize/customer");
// //hide serial
// cy.get("[data-cy=SerialVisible]").uncheck({ force: true });
// cy.wait(10);
// //show widget 8 and set it to a type
// cy.get("[data-cy=WidgetCustom8]").scrollIntoView();
// cy.get("[data-cy=WidgetCustom8Visible]").check({ force: true });
// cy.get("[data-cy=WidgetCustom8SelectType]").type("tr{enter}", {
// //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
// });
@@ -43,22 +43,22 @@
// cy.go("back");
// //check customize worked
// cy.get("[data-cy=serial]").should("not.exist");
// cy.get("[data-cy=WidgetCustom8]").should("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/Widget");
// cy.url().should("include", "/customize/customer");
// cy.get("[data-cy=SerialVisible]").check({ force: true });
// cy.get("[data-cy=WidgetCustom8Visible]").uncheck({ force: true });
// cy.get("[data-cy=WidgetCustom8SelectType]").type("te{enter}", {
// 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=WidgetCustom8]").should("not.exist");
// cy.get("[data-cy=customerCustom8]").should("not.exist");
// //-----
// });
// });

View File

@@ -11,11 +11,11 @@ describe("GZ-DATA-TABLE", () => {
.clear()
.type("BizAdmin{enter}");
//cy.url().should("include", "/home-dashboard");
cy.visit("/widgets");
cy.url().should("include", "/widgets");
cy.visit("/customers");
cy.url().should("include", "/customers");
cy.contains("Rows per page");
//select default widget list view
//select default customer list view
cy.get("[data-cy=selectlistview]").type("-{enter}", { force: true });
//confirm we see the data expected
cy.contains("Name");
@@ -24,7 +24,7 @@ describe("GZ-DATA-TABLE", () => {
//refresh
cy.get("[data-cy=refresh]").click();
//confirm the first column is the widget name
//confirm the first column is the customer name
cy.get("thead > tr > th:nth-child(1) > span").contains("Name");
// cy.get('[aria-label="Next page"] > .v-btn__content > .v-icon').click();
@@ -53,7 +53,7 @@ describe("GZ-DATA-TABLE", () => {
'[data-cy="columncard:username"] > .v-card__text > .d-flex > :nth-child(1) > .v-btn__content > [data-cy=movestart]'
).click();
//go back to widgetlist
//go back to customerlist
cy.go("back");
//confirm the first column is now the username
@@ -62,20 +62,20 @@ describe("GZ-DATA-TABLE", () => {
//switch back to default filter
cy.get("[data-cy=selectlistview]").type("-{enter}{esc}", { force: true });
//open a widget record
//open a customer record
cy.wait(100);
cy.get("tbody > :nth-child(1) > :nth-child(1)").click();
//cy.get(":nth-child(1) > :nth-child(1) > .subtitle-1 > a").click();
//confirm on widget edit form
cy.get('[data-cy="widget-edit:delete"]');
//confirm on customer edit form
cy.get('[data-cy="customer-edit:delete"]');
//go back to widgetlist
//go back to customerlist
cy.go("back");
//new
cy.get("[data-cy='widget-list:new']").click();
cy.url().should("include", "/widgets/0");
cy.get("[data-cy='customer-list:new']").click();
cy.url().should("include", "/customers/0");
//cy.get("thead > tr > th:nth-child(1)").contains("User");

View File

@@ -28,8 +28,8 @@ describe("PICK LIST TEMPLATE", () => {
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");
cy.visit("/customers/0");
cy.url().should("include", "/customers/0");
//select a user with a zone set
cy.get("[data-cy=userid] > .v-input")
.type("..zone")
@@ -50,8 +50,8 @@ describe("PICK LIST TEMPLATE", () => {
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");
cy.visit("/customers/0");
cy.url().should("include", "/customers/0");
//select a user with a zone set
cy.get("[data-cy=userid] > .v-input")
.type("..zone")

View File

@@ -46,7 +46,7 @@ describe("SEARCH", () => {
sub = t;
//nave to first result form
cy.get("[data-cy=btnopenitem1]").click();
cy.url().should("include", "/widget");
cy.url().should("include", "/customer");
//name field should contain whatever was shown in search results list
cy.contains(sub).should("exist");
});

View File

@@ -430,18 +430,6 @@ describe("SMOKE", () => {
cy.url({ timeout: 10000 }).should("include", "/cust-customers/1");
cy.get("[data-cy=name]");
// cy.visit("/viewreport?oid=1&rid=1");
// cy.url({ timeout: 10000 }).should("include", "/cust-customers/1");
// cy.get("[data-cy=name]");
// cy.visit("/widgets");
// cy.url({ timeout: 10000 }).should("include", "/widgets");
// cy.get("[data-cy=widgetsTable]");
// cy.visit("/widgets/0");
// cy.url({ timeout: 10000 }).should("include", "/widgets/0");
// cy.get("[data-cy=name]");
cy.visit("/NOTFOUND");
cy.contains("404");

View File

@@ -3,8 +3,8 @@
// const { WatchIgnorePlugin } = require("webpack");
//https://docs.cypress.io/guides/references/assertions.html#BDD-Assertions
describe("WIDGET FORM", () => {
it("Performs all crud ops on widget successfully", () => {
describe("customer FORM", () => {
it("Performs all crud ops on customer successfully", () => {
let unique = new Date().getTime();
cy.visit("/login");
cy.get("input[name=username]")
@@ -19,8 +19,8 @@ describe("WIDGET FORM", () => {
cy.url().should("include", "/ay-evaluate");
//POST
cy.visit("/widgets/0");
cy.url().should("include", "/widgets/0");
cy.visit("/customers/0");
cy.url().should("include", "/customers/0");
//cy.wait(5000);
//save the start url for later
@@ -69,20 +69,20 @@ describe("WIDGET FORM", () => {
force: true
}); //esc necessary to close tags control
cy.get(
"[data-cy=WidgetCustom2]"
"[data-cy=customerCustom2]"
).type("Custom text field testing a...b...c...{enter}EOT", { force: true });
//GET ROUTE
//SAve the record and ensure it's different
cy.get('[data-cy="widget-edit:save"]').click();
cy.url().should("include", "/widgets");
cy.get('[data-cy="customer-edit:save"]').click();
cy.url().should("include", "/customers");
cy.get("[data-cy=serial]").should("not.have.value", 0); //server sets new value on save
//PUT
cy.get("[data-cy=count]").type("321", { force: true });
cy.get('[data-cy="widget-edit:save"]').click({ force: true });
cy.get('[data-cy="customer-edit:save"]').click({ force: true });
//now get it back again and confirm settings
@@ -91,7 +91,7 @@ describe("WIDGET FORM", () => {
//delete the record
cy.get("[data-cy=contextmenu]").click();
cy.get('[data-cy="widget-edit:delete"]').click();
cy.get('[data-cy="customer-edit:delete"]').click();
cy.get('[data-cy="gzconfirm:yesbutton"]').click();
// //LOGOUT