Fix invoicing period selfwash counts
This commit is contained in:
@@ -100,6 +100,10 @@ const xlvaskUsagePaginationSource = readFileSync(
|
||||
join(root, "src/components/displays/pagination/models/DepartmentPos/XLVaskUsagePagination.vue"),
|
||||
"utf8"
|
||||
);
|
||||
const xlvaskUsagePeriodConstantsSource = readFileSync(
|
||||
join(root, "src/components/displays/department/pos/sync/xlvaskUsagePeriodConstants.js"),
|
||||
"utf8"
|
||||
);
|
||||
const xlvaskUsageOrdersTableSource = readFileSync(
|
||||
join(root, "src/components/displays/department/pos/sync/xlvaskUsageOrdersTable.vue"),
|
||||
"utf8"
|
||||
@@ -477,7 +481,7 @@ describe("Periode tab contract", () => {
|
||||
expect(periodViewSelfWashSource).toContain(':load-all-at-once="true"');
|
||||
expect(xlvaskUsagePaginationSource).toContain("inheritPeriodFilters");
|
||||
expect(xlvaskUsagePaginationSource).toContain("loadAllAtOnce");
|
||||
expect(xlvaskUsagePaginationSource).toContain("const SELFWASH_PERIOD_ALL_LIMIT = 10000");
|
||||
expect(xlvaskUsagePeriodConstantsSource).toContain("export const SELFWASH_PERIOD_ALL_LIMIT = 10000");
|
||||
expect(xlvaskUsagePaginationSource).toContain("setMetaItemsPerPage(SELFWASH_PERIOD_ALL_LIMIT, false)");
|
||||
expect(xlvaskUsagePaginationSource).toContain(
|
||||
"const shouldShowLocalFilters = computed(() => !props.inheritPeriodFilters)"
|
||||
@@ -494,6 +498,7 @@ describe("Periode tab contract", () => {
|
||||
expect(periodRightSource).toContain("getCachedSelfWashCounts");
|
||||
expect(periodRightSource).toContain("setCachedSelfWashCounts");
|
||||
expect(periodRightSource).toContain("'/modules/xlvask/services/usage/orders'");
|
||||
expect(periodRightSource).toContain("limit: SELFWASH_PERIOD_ALL_LIMIT");
|
||||
expect(periodRightSource).toContain("StartTime-date_from:${dates.computed.formattedStartDate.value}");
|
||||
expect(periodRightSource).toContain("StartTime-date_to:${dates.computed.formattedEndDate.value}");
|
||||
expect(periodRightSource).toContain("if (type.name === 'self_wash')");
|
||||
@@ -502,6 +507,15 @@ describe("Periode tab contract", () => {
|
||||
expect(periodRightSource).not.toContain("showProgress: false");
|
||||
});
|
||||
|
||||
it("keeps Selvvask usage pagination scoped to the period view", () => {
|
||||
expect(xlvaskUsagePaginationSource).toContain("usePaginatedList");
|
||||
expect(xlvaskUsagePaginationSource).toContain("provide(PaginatedListKey, paginatedList)");
|
||||
expect(xlvaskUsageOrdersTableSource).toContain("usePaginatedListInstance");
|
||||
expect(xlvaskUsageOrdersTableSource).toContain(
|
||||
"const { orderBy, orderDirection, setOrder, loadList } = usePaginatedListInstance();"
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps Selvvask usage entries wrapped inside the period content area", () => {
|
||||
expect(xlvaskUsageOrdersTableSource).toContain("xlvask-usage-card-primary");
|
||||
expect(xlvaskUsageOrdersTableSource).toContain("xlvask-usage-card-status");
|
||||
|
||||
Reference in New Issue
Block a user