Skip to content

Commit 2bd335d

Browse files
committed
test(trips): align journey panel i18n
Update localized JourneyPanel assertions and align journey namespace ordering in English manifests.
1 parent 2fa2af4 commit 2bd335d

4 files changed

Lines changed: 67 additions & 67 deletions

File tree

β€Žweb/src/features/trips/components/JourneyPanel.test.tsxβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe('JourneyPanel', () => {
120120
expect(mockList).toHaveBeenCalledWith(7, '');
121121
expect(screen.getByText('Tahoe ski trip')).toBeInTheDocument();
122122
expect(screen.getByText('Home β†’ Tahoe')).toBeInTheDocument();
123-
expect(screen.getByText('planned')).toBeInTheDocument();
123+
expect(screen.getAllByText('Planned').length).toBeGreaterThan(0);
124124
expect(screen.getByText('v1')).toBeInTheDocument();
125125
});
126126

@@ -140,7 +140,7 @@ describe('JourneyPanel', () => {
140140
mockCreate.mockReturnValue({ mutate, isPending: false });
141141
renderPanel();
142142
fireEvent.click(screen.getByText('Plan journey'));
143-
fireEvent.change(screen.getByLabelText('Journey name'), {
143+
fireEvent.change(screen.getByLabelText(/Journey name/), {
144144
target: { value: 'Vegas weekend' },
145145
});
146146
fireEvent.change(screen.getByLabelText('Destination'), {

β€Žweb/src/i18n/en/locale-trips.jsonβ€Ž

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,65 @@
11
{
2+
"journey": {
3+
"page": {
4+
"navTitle": "Journeys",
5+
"title": "Journeys",
6+
"subtitle": "Door-to-door trip companion: plan the drive, ride it live with replans, then debrief."
7+
},
8+
"col": {
9+
"journey": "Journey",
10+
"status": "Status",
11+
"plan": "Plan",
12+
"updated": "Updated",
13+
"actions": "Actions"
14+
},
15+
"noRoute": "Route not set yet",
16+
"planVersion": "v{{version}}",
17+
"open": "Open",
18+
"list": {
19+
"title": "Planned journeys",
20+
"subtitle": "One session per trip, from planning through the live drive to the debrief.",
21+
"loading": "Loading journeys…",
22+
"empty": "No journeys yet. Plan one above and it will live here from planning to debrief."
23+
},
24+
"status": {
25+
"planned": "Planned",
26+
"active": "Active",
27+
"paused": "Paused",
28+
"completed": "Completed",
29+
"aborted": "Aborted"
30+
},
31+
"filter": {
32+
"status": "Filter by status",
33+
"all": "All"
34+
},
35+
"action": {
36+
"cancel": "Cancel",
37+
"plan": "Plan journey"
38+
},
39+
"form": {
40+
"name": "Journey name",
41+
"namePlaceholder": "Tahoe ski trip",
42+
"origin": "Origin",
43+
"destination": "Destination",
44+
"submit": "Create journey"
45+
},
46+
"detail": {
47+
"title": "Journey detail",
48+
"loading": "Loading journey…",
49+
"empty": "Select a journey to manage its lifecycle and plans."
50+
},
51+
"transition": {
52+
"start": "Start",
53+
"pause": "Pause",
54+
"resume": "Resume",
55+
"complete": "Complete",
56+
"abort": "Abort"
57+
},
58+
"plans": {
59+
"title": "Plan versions",
60+
"empty": "No plans saved yet β€” the stop optimizer lands here."
61+
}
62+
},
263
"trips": {
364
"detail": {
465
"title": "Trip Detail",
@@ -108,66 +169,5 @@
108169
"energy": "Energy",
109170
"cost": "Cost"
110171
}
111-
},
112-
"journey": {
113-
"page": {
114-
"navTitle": "Journeys",
115-
"title": "Journeys",
116-
"subtitle": "Door-to-door trip companion: plan the drive, ride it live with replans, then debrief."
117-
},
118-
"col": {
119-
"journey": "Journey",
120-
"status": "Status",
121-
"plan": "Plan",
122-
"updated": "Updated",
123-
"actions": "Actions"
124-
},
125-
"noRoute": "Route not set yet",
126-
"planVersion": "v{{version}}",
127-
"open": "Open",
128-
"list": {
129-
"title": "Planned journeys",
130-
"subtitle": "One session per trip, from planning through the live drive to the debrief.",
131-
"loading": "Loading journeys…",
132-
"empty": "No journeys yet. Plan one above and it will live here from planning to debrief."
133-
},
134-
"status": {
135-
"planned": "Planned",
136-
"active": "Active",
137-
"paused": "Paused",
138-
"completed": "Completed",
139-
"aborted": "Aborted"
140-
},
141-
"filter": {
142-
"status": "Filter by status",
143-
"all": "All"
144-
},
145-
"action": {
146-
"cancel": "Cancel",
147-
"plan": "Plan journey"
148-
},
149-
"form": {
150-
"name": "Journey name",
151-
"namePlaceholder": "Tahoe ski trip",
152-
"origin": "Origin",
153-
"destination": "Destination",
154-
"submit": "Create journey"
155-
},
156-
"detail": {
157-
"title": "Journey detail",
158-
"loading": "Loading journey…",
159-
"empty": "Select a journey to manage its lifecycle and plans."
160-
},
161-
"transition": {
162-
"start": "Start",
163-
"pause": "Pause",
164-
"resume": "Resume",
165-
"complete": "Complete",
166-
"abort": "Abort"
167-
},
168-
"plans": {
169-
"title": "Plan versions",
170-
"empty": "No plans saved yet β€” the stop optimizer lands here."
171-
}
172172
}
173173
}

β€Žweb/src/i18n/en/runtime-manifest.jsonβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,8 @@
675675
"tempImpact"
676676
],
677677
"trips": [
678-
"trips",
679-
"journey"
678+
"journey",
679+
"trips"
680680
],
681681
"vehicle-systems": [
682682
"cabinThermal",

β€Žweb/src/i18n/en/usage-manifest.jsonβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,8 +1210,8 @@
12101210
"tempImpact"
12111211
],
12121212
"trips": [
1213-
"trips",
1214-
"journey"
1213+
"journey",
1214+
"trips"
12151215
],
12161216
"vehicle-systems": [
12171217
"cabinThermal",

0 commit comments

Comments
Β (0)