This commit is contained in:
@@ -42,7 +42,7 @@ todo: is smoke test really excercising every list? Some are only available from
|
||||
this is important because it's going to drive future removal of unused locale keys
|
||||
LIST IS IN SMOKE>JS, JUST CODE IT
|
||||
|
||||
|
||||
localhost:8080//viewreport?oid=1&rid=1 erroring out, kosher?
|
||||
|
||||
## V8MIGRATE
|
||||
|
||||
@@ -53,6 +53,7 @@ todo: dirty big test again with contracts etc
|
||||
|
||||
## CLIENT MISC ITEMS
|
||||
|
||||
todo: render report directly not working due to server changes, needs to rehydrate the object type to work properly
|
||||
todo: bugbug sort a column in data table then remove that column from display will trigger error
|
||||
needs to gracefully handle missing columns
|
||||
|
||||
|
||||
@@ -173,6 +173,7 @@ export default {
|
||||
return;
|
||||
} else {
|
||||
//log unhandled api error
|
||||
|
||||
window.$gz.store.commit(
|
||||
"logItem",
|
||||
"API error: status=" +
|
||||
@@ -696,8 +697,11 @@ export default {
|
||||
|
||||
let res = await window.$gz.api.upsert("report/render", reportDataOptions);
|
||||
if (res.error) {
|
||||
throw new Error(window.$gz.errorHandler.errorToString(res));
|
||||
//throw new Error(res.error);
|
||||
if (redirectNotPopup) {
|
||||
return res;
|
||||
} else {
|
||||
throw new Error(window.$gz.errorHandler.errorToString(res));
|
||||
}
|
||||
} else {
|
||||
let reportUrl = window.$gz.api.reportDownloadUrl(res.data);
|
||||
if (redirectNotPopup) {
|
||||
|
||||
@@ -722,13 +722,24 @@ export default new Router({
|
||||
{
|
||||
//REPORT VIEW FROM URL
|
||||
path: "/viewreport",
|
||||
beforeEnter: (to, from, next) => {
|
||||
(async function() {
|
||||
//open report links have a query string /viewreport?oid=[objectid]&rid=[reportid]
|
||||
let objectId = parseInt(to.query.oid);
|
||||
let reportId = parseInt(to.query.rid);
|
||||
await window.$gz.api.renderReport(objectId, reportId, true);
|
||||
})();
|
||||
beforeEnter: async (to, from, next) => {
|
||||
// (async function() {
|
||||
//open report links have a query string /viewreport?oid=[objectid]&rid=[reportid]
|
||||
let objectId = parseInt(to.query.oid);
|
||||
let reportId = parseInt(to.query.rid);
|
||||
|
||||
let res = await window.$gz.api.renderReport(objectId, reportId, true);
|
||||
if (res.error) {
|
||||
//log the error and do a popup for it
|
||||
let msg = `/viewReport, query ${JSON.stringify(
|
||||
to.query
|
||||
)}, server error: ${JSON.stringify(res.error)}`;
|
||||
// window.$gz.store.commit("logItem", msg);
|
||||
window.$gz.eventBus.$emit("notify-error", msg);
|
||||
next("/applog");
|
||||
}
|
||||
|
||||
//})();
|
||||
|
||||
next(false);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="objectType && objectId" class="mb-6">
|
||||
<v-icon @click="navToTarget()" large>{{ iconForType() }}</v-icon
|
||||
<v-icon data-cy="clickThru" @click="navToTarget()" large>{{
|
||||
iconForType()
|
||||
}}</v-icon
|
||||
><span @click="navToTarget()" class="text-h5"> {{ name }}</span>
|
||||
</div>
|
||||
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
:aya-type="ayaTypes().Customer"
|
||||
:show-edit-icon="true"
|
||||
:label="$ay.t('Customer')"
|
||||
data-cy="clickThru"
|
||||
></gz-pick-list>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="objectType && objectId" class="mb-6">
|
||||
<v-icon @click="navToTarget()" large>{{ iconForType() }}</v-icon
|
||||
<v-icon data-cy="clickThru" @click="navToTarget()" large>{{
|
||||
iconForType()
|
||||
}}</v-icon
|
||||
><span @click="navToTarget()" class="text-h5"> {{ name }}</span>
|
||||
</div>
|
||||
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
||||
|
||||
@@ -16,22 +16,21 @@ describe("SMOKE", () => {
|
||||
/*
|
||||
|
||||
TODO:
|
||||
change widget form customize and datalistcolumnview to other form in prep for eventual widget removal
|
||||
ay-open
|
||||
home-memos/id edit form
|
||||
home-remidners/id
|
||||
home-reviews/objecttype/objectid
|
||||
home-reset (last? or at all?)
|
||||
cust-customer-notes/customerid
|
||||
cust-customer-note/recordid
|
||||
cust-users/recordid
|
||||
inv-part-serials/id
|
||||
inv-part-stock-levels/id
|
||||
inv-part-adjustment (is transaction edit form)
|
||||
acc-service-banks/recordid/objecttype/objectid
|
||||
adm-users/id
|
||||
adm-import
|
||||
/viewreport
|
||||
x ay-open path: "/open/:ayatype/:recordid",
|
||||
x home-memos/id edit form
|
||||
x home-remidners/id
|
||||
x home-reviews/objecttype/objectid
|
||||
x home-reset
|
||||
x cust-customer-notes/customerid
|
||||
x cust-customer-note/recordid
|
||||
XXXXx cust-users/recordid NOT WORKING, NEEDS MORE
|
||||
x inv-part-serials/id
|
||||
x inv-part-stock-levels/id
|
||||
x inv-part-adjustment (is transaction edit form)
|
||||
x acc-service-banks/recordid/objecttype/objectid
|
||||
x adm-users/id
|
||||
x adm-import
|
||||
/viewreport viewreport?oid=[objectid]&rid=[reportid]
|
||||
ay-evaluate !
|
||||
|
||||
|
||||
@@ -54,14 +53,26 @@ ay-evaluate !
|
||||
cy.url().should("include", "/home-memos");
|
||||
cy.get("[data-cy=memosTable]");
|
||||
|
||||
cy.visit("/home-memos/0"); //no reliable single id would work for existing
|
||||
cy.url().should("include", "/home-memos/0");
|
||||
cy.get("[data-cy=pickListSelectedUserId]");
|
||||
|
||||
cy.visit("/home-reminders");
|
||||
cy.url().should("include", "/home-reminders");
|
||||
cy.get("[data-cy=remindersTable]");
|
||||
|
||||
cy.visit("/home-reminders/0");
|
||||
cy.url().should("include", "/home-reminders/0");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/home-reviews");
|
||||
cy.url().should("include", "/home-reviews");
|
||||
cy.get("[data-cy=reviewsTable]");
|
||||
|
||||
cy.visit("/home-reviews/8/1");
|
||||
cy.url().should("include", "/home-reviews/8/1");
|
||||
cy.get("[data-cy=clickThru]");
|
||||
|
||||
cy.visit("/home-user-settings");
|
||||
cy.url().should("include", "/home-user-settings");
|
||||
cy.get("[data-cy=emailAddress]");
|
||||
@@ -70,6 +81,11 @@ ay-evaluate !
|
||||
cy.url().should("include", "/home-password");
|
||||
cy.get("[data-cy=loginName]");
|
||||
|
||||
//can't do this without reset code etc, just logs out
|
||||
// cy.visit("/home-reset");
|
||||
// cy.url().should("include", "/home-reset");
|
||||
// cy.get("[data-cy=loginName]");
|
||||
|
||||
cy.visit("/home-notify-subscriptions");
|
||||
cy.url().should("include", "/home-notify-subscriptions");
|
||||
cy.get("[data-cy=subsTable]");
|
||||
@@ -95,6 +111,14 @@ ay-evaluate !
|
||||
cy.url().should("include", "/cust-customers/1");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/cust-customer-notes/1");
|
||||
cy.url().should("include", "/cust-customer-notes/1");
|
||||
cy.get("[data-cy=clickThru]");
|
||||
|
||||
cy.visit("/cust-customer-note/0");
|
||||
cy.url().should("include", "/cust-customer-note/0");
|
||||
cy.get("[data-cy=notes]");
|
||||
|
||||
cy.visit("/cust-head-offices");
|
||||
cy.url().should("include", "/cust-head-offices");
|
||||
cy.get("[data-cy=headofficesTable]");
|
||||
@@ -107,6 +131,10 @@ ay-evaluate !
|
||||
cy.url().should("include", "/cust-users");
|
||||
cy.get("[data-cy=custUsersTable]");
|
||||
|
||||
// cy.visit("/cust-users/0");
|
||||
// cy.url().should("include", "/cust-users/0");
|
||||
// cy.get("[data-cy=customerId]");
|
||||
|
||||
//################# SERVICE
|
||||
cy.visit("/svc-schedule");
|
||||
cy.url().should("include", "/svc-schedule");
|
||||
@@ -217,6 +245,14 @@ ay-evaluate !
|
||||
cy.url().should("include", "/inv-part-assemblies/1");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/inv-part-serials/1");
|
||||
cy.url().should("include", "/inv-part-serials/1");
|
||||
cy.get("[data-cy=selectedPartId]");
|
||||
|
||||
cy.visit("/inv-part-stock-levels/1");
|
||||
cy.url().should("include", "/inv-part-stock-levels/1");
|
||||
cy.get("[data-cy=selectedPartId]");
|
||||
|
||||
cy.visit("/inv-part-warehouses");
|
||||
cy.url().should("include", "/inv-part-warehouses");
|
||||
cy.get("[data-cy=partwarehousesTable]");
|
||||
@@ -225,9 +261,9 @@ ay-evaluate !
|
||||
cy.url().should("include", "/inv-part-warehouses/1");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
// cy.visit("/inv-part-requests");
|
||||
// cy.url().should("include", "/inv-part-requests");
|
||||
// cy.get("[data-cy=underconstruction]");
|
||||
cy.visit("/inv-part-adjustment");
|
||||
cy.url().should("include", "/inv-part-adjustment");
|
||||
cy.get("[data-cy=description]");
|
||||
|
||||
//################# VENDORS
|
||||
cy.visit("/vendors");
|
||||
@@ -243,6 +279,14 @@ ay-evaluate !
|
||||
cy.url().should("include", "/acc-service-banks");
|
||||
cy.get("[data-cy=serviceBanksTable]");
|
||||
|
||||
cy.visit("/acc-service-banks/8/1");
|
||||
cy.url().should("include", "/acc-service-banks/8/1");
|
||||
cy.get("[data-cy=clickThru]");
|
||||
|
||||
cy.visit("/acc-service-banks/0/8/1");
|
||||
cy.url().should("include", "/acc-service-banks/0/8/1");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/acc-service-rates");
|
||||
cy.url().should("include", "/acc-service-rates");
|
||||
cy.get("[data-cy=serviceRatesTable]");
|
||||
@@ -288,6 +332,10 @@ ay-evaluate !
|
||||
cy.url().should("include", "/adm-users");
|
||||
cy.get("[data-cy=usersTable]");
|
||||
|
||||
cy.visit("/adm-users/1");
|
||||
cy.url().should("include", "/adm-users/1");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/adm-translations");
|
||||
cy.url().should("include", "/adm-translations");
|
||||
cy.get("[data-cy=transTable]");
|
||||
@@ -312,6 +360,10 @@ ay-evaluate !
|
||||
cy.url().should("include", "/adm-history");
|
||||
cy.get("[data-cy=historyTable]");
|
||||
|
||||
cy.visit("/adm-import");
|
||||
cy.url().should("include", "/adm-import");
|
||||
cy.get("[data-cy=ayaType]");
|
||||
|
||||
//################# OPERATIONS
|
||||
cy.visit("/ops-backup");
|
||||
cy.url().should("include", "/ops-backup");
|
||||
@@ -358,14 +410,12 @@ ay-evaluate !
|
||||
cy.url().should("include", "/applog");
|
||||
cy.get("[data-cy=logText]");
|
||||
|
||||
//todo: change to non widget form
|
||||
cy.visit("/customize/Widget");
|
||||
cy.url().should("include", "/customize/Widget");
|
||||
cy.visit("/customize/Customer");
|
||||
cy.url().should("include", "/customize/Customer");
|
||||
cy.get("[data-cy=customizeForm]");
|
||||
|
||||
//todo: change to non widget form
|
||||
cy.visit("/data-list-column-view/TestWidgetDataList");
|
||||
cy.url().should("include", "/data-list-column-view/TestWidgetDataList");
|
||||
cy.visit("/data-list-column-view/CustomerDataList");
|
||||
cy.url().should("include", "/data-list-column-view/CustomerDataList");
|
||||
cy.get("[data-cy=dlcForm]");
|
||||
|
||||
cy.visit("/home-reviews/2/1");
|
||||
@@ -376,14 +426,22 @@ ay-evaluate !
|
||||
cy.url().should("include", "/history/3/1");
|
||||
cy.get("[data-cy=timeLine]");
|
||||
|
||||
cy.visit("/widgets");
|
||||
cy.url().should("include", "/widgets");
|
||||
cy.get("[data-cy=widgetsTable]");
|
||||
|
||||
cy.visit("/widgets/0");
|
||||
cy.url().should("include", "/widgets/0");
|
||||
cy.visit("/open/8/1");
|
||||
cy.url().should("include", "/cust-customers/1");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
// cy.visit("/viewreport?oid=1&rid=1");
|
||||
// cy.url().should("include", "/cust-customers/1");
|
||||
// cy.get("[data-cy=name]");
|
||||
|
||||
// cy.visit("/widgets");
|
||||
// cy.url().should("include", "/widgets");
|
||||
// cy.get("[data-cy=widgetsTable]");
|
||||
|
||||
// cy.visit("/widgets/0");
|
||||
// cy.url().should("include", "/widgets/0");
|
||||
// cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/NOTFOUND");
|
||||
cy.contains("404");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user