Skip to content

Commit

Permalink
TRELLO-2716 : category name instead of slug
Browse files Browse the repository at this point in the history
  • Loading branch information
ssedoudbgouv committed Nov 16, 2024
1 parent 560e0e2 commit 9000256
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions mobile-tools/src/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('Test the categories path', () => {
const response = await request(app).get('/v1/categories')
const categories = response.body as Category[]
expect(categories).toContainEqual({
category: 'AchatMagasin',
category: 'Achat en magasin',
description: 'Prix, promotion, qualité, poids, garantie, …',
id: '10',
path: 'achat-magasin',
Expand All @@ -31,7 +31,7 @@ describe('Test the categories path', () => {
const response = await request(app).get('/v1/categories').query({lang: 'fr'})
const categories = response.body as Category[]
expect(categories).toContainEqual({
category: 'AchatMagasin',
category: 'Achat en magasin',
description: 'Prix, promotion, qualité, poids, garantie, …',
id: '10',
path: 'achat-magasin',
Expand All @@ -42,7 +42,7 @@ describe('Test the categories path', () => {
const response = await request(app).get('/v1/categories').query({lang: 'en'})
const categories = response.body as Category[]
expect(categories).toContainEqual({
category: 'AchatMagasin',
category: 'In-store purchases',
description: 'Price, promotion, quality, weight, warranty, etc.',
id: '10',
path: 'achat-magasin',
Expand Down
5 changes: 3 additions & 2 deletions mobile-tools/src/services/categories.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {Config} from '../config/config.js'

export interface Category {
category: string
name: string
description: string
id: string
path: string
Expand All @@ -17,7 +18,7 @@ export const minimizedAnomaliesEn = JSON.parse(fs.readFileSync('../shared/anomal

const categoriesFr: Category[] = anomaliesFr.map((anomaly: any) => {
return {
category: anomaly.category,
category: anomaly.title,
description: anomaly.description,
id: anomaly.id,
path: anomaly.path,
Expand All @@ -27,7 +28,7 @@ const categoriesFr: Category[] = anomaliesFr.map((anomaly: any) => {

const categoriesEn: Category[] = anomaliesEn.map((anomaly: any) => {
return {
category: anomaly.category,
category: anomaly.title,
description: anomaly.description,
id: anomaly.id,
path: anomaly.path,
Expand Down

0 comments on commit 9000256

Please sign in to comment.