diff --git a/apps/user-ui/JEST-TEST-CASES.md b/apps/user-ui/JEST-TEST-CASES.md index 9b7df3d..e9e3184 100644 --- a/apps/user-ui/JEST-TEST-CASES.md +++ b/apps/user-ui/JEST-TEST-CASES.md @@ -1352,6 +1352,7 @@ Covered by HOME-81..98, plus: | LOC-54 | edge | QuickDelivery flash | “within 1 hour”; back; LocationBar | | LOC-55 | edge | startup gate, one non-default address | auto-opens region + selects address | | LOC-56 | edge | regular switcher, one non-default address | no auto-select/close | +| LOC-57 | edge | LocationBar long address | one line (`numberOfLines=1`) with tail ellipsis; bar stays 2 lines | | SLOTQ-01 | edge | foreign address | warning; switch confirm; clear cart/home | | SLOTQ-02 | edge | unavailable region | alert | | SLOTQ-03 | edge | no selected/default address | “Select address” | diff --git a/apps/user-ui/src/components/LocationBar.tsx b/apps/user-ui/src/components/LocationBar.tsx index 5a6da77..a2a8ee0 100644 --- a/apps/user-ui/src/components/LocationBar.tsx +++ b/apps/user-ui/src/components/LocationBar.tsx @@ -80,7 +80,9 @@ const LocationBar: React.FC = () => { {activeAddress ? ( {formatAddress(activeAddress)} diff --git a/apps/user-ui/tests/components/location-components.test.tsx b/apps/user-ui/tests/components/location-components.test.tsx index 5d49aab..9ddbf8a 100644 --- a/apps/user-ui/tests/components/location-components.test.tsx +++ b/apps/user-ui/tests/components/location-components.test.tsx @@ -612,6 +612,20 @@ describe('Location components (LOC)', () => { expect(queryByText('12 Main Road, Near Temple, Mahabubnagar')).toBeNull() }) + it('LOC-57: LocationBar truncates the address to a single line', async () => { + setRegionHook({ region: REGION_1, regionId: 1, boundId: 7 }) + signIn() + setAddresses([S1, S2]) + useAddressStore.getState().setSelectedAddressId(11) + const { getByText } = renderWithProviders(, { auth: false }) + await flush(2) + + const address = getByText('12 Main Road, Near Temple, Mahabubnagar') + // Two-line bar: "Deliver to " then one ellipsised address line. + expect(address.props.numberOfLines).toBe(1) + expect(address.props.ellipsizeMode).toBe('tail') + }) + it('LOC-34: LocationMapStep builds the URL with optional lat/lng params', () => { const withCoords = renderWithProviders( , diff --git a/change-log.txt b/change-log.txt index b3ce148..e22f00c 100644 --- a/change-log.txt +++ b/change-log.txt @@ -10334,3 +10334,23 @@ Mirror: stored token -> isLoading:false; selfData error with UNAUTHORIZED -> log --- apps/web-ui/src/lib/trpc-client.ts Mirror of the RN event: setUnauthorizedHandler() invoked when the API answers 401 UNAUTHORIZED. + +[2026-10-26 00:31 IST] LocationBar address line is capped at one line so the bar is always exactly +two lines ("Deliver to " + one address line, ellipsised with "…"). + +--- apps/user-ui/src/components/LocationBar.tsx +@@ + + {formatAddress(activeAddress)} + + +--- apps/user-ui/tests/components/location-components.test.tsx +Added LOC-57: the address text uses numberOfLines=1 + ellipsizeMode="tail". + +--- apps/user-ui/JEST-TEST-CASES.md +LOC-57 row.