- Implemented `usePaymentMethodUpdateMutation` for updating payment methods with validation. - Created settings controllers and hooks for managing payment methods. - Added UI components for creating, editing, deleting, and displaying payment methods. - Introduced error handling and feedback mechanisms for payment method operations. - Developed form schemas and utility functions for handling payment method data. - Established a new settings page for managing payment methods with appropriate loading and error states.
27 lines
842 B
TypeScript
27 lines
842 B
TypeScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import { CatalogsModuleManifest } from "./manifest";
|
|
|
|
test("publica la entry de Settings para payment methods", () => {
|
|
assert.deepEqual(CatalogsModuleManifest.settings, {
|
|
entries: [
|
|
{
|
|
id: "payment-methods",
|
|
sectionId: "general",
|
|
labelKey: "settings.paymentMethods.title",
|
|
path: "/settings/general/payment-methods",
|
|
},
|
|
],
|
|
});
|
|
});
|
|
|
|
test("expone una ruta modular para settings/general/payment-methods", () => {
|
|
const routes = CatalogsModuleManifest.routes?.({});
|
|
const settingsRoute = routes?.find((route) => route.path === "settings/general/payment-methods");
|
|
|
|
assert.ok(settingsRoute);
|
|
assert.equal(settingsRoute?.handle?.layout, "app-sidebar");
|
|
assert.equal(settingsRoute?.handle?.protected, true);
|
|
});
|