- Updated QuoteDetailsCardEditor to display localized descriptions for articles. - Modified QuoteEdit to exclude localized descriptions from the payload sent to the server. - Implemented GetCatalogArticlesByIdsUseCase for fetching catalog articles by IDs. - Enhanced ICatalogRepository with methods for retrieving articles by ID. - Introduced CatalogArticle and CatalogArticleTranslation entities for better catalog representation. - Added resolveLocalizedQuoteDescriptions service to resolve descriptions based on user language. - Updated sales context to include catalog article lookup functionality. - Refactored quote controllers and presenters to utilize localized descriptions. - Added tests for ArticleIdentifier validation and new catalog entities. - Created test configuration for isolated testing environments.
27 lines
1.2 KiB
TypeScript
27 lines
1.2 KiB
TypeScript
/* Test-only configuration. It never targets the development or production database by default. */
|
|
module.exports = {
|
|
jwt: {
|
|
secret_key: process.env.TEST_JWT_SECRET || "test-jwt-secret",
|
|
refresh_secret_key: process.env.TEST_JWT_REFRESH_SECRET || "test-jwt-refresh-secret",
|
|
token_expiration: "1h",
|
|
refresh_token_expiration: "1h",
|
|
},
|
|
database: {
|
|
host: process.env.TEST_MYSQL_HOST || "127.0.0.1",
|
|
port: Number(process.env.TEST_MYSQL_PORT || 3306),
|
|
dialect: "mysql",
|
|
database: process.env.TEST_MYSQL_DATABASE || "uecko_test",
|
|
username: process.env.TEST_MYSQL_USER || "uecko_test",
|
|
password: process.env.TEST_MYSQL_PASSWORD || "",
|
|
},
|
|
server: { hostname: "127.0.0.1", port: 0, cors_origin: "*" },
|
|
defaults: {
|
|
dealer_logos_upload_path: "/tmp/uecko-test/dealer-logos",
|
|
dealer_logo_placeholder: "/tmp/uecko-test/logo-placeholder.png",
|
|
support: { from: "test@example.invalid", subject: "Test" },
|
|
},
|
|
admin: { name: "Test admin", email: "admin@example.invalid", password: "test", language: "es" },
|
|
sample_dealer: { name: "Test dealer", email: "dealer@example.invalid", password: "test", language: "en" },
|
|
nodemailer: { brevo: {} },
|
|
};
|