mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 02:34:21 +00:00
fix(journey): a dead translation key, and two cards that spoke differently
`common.errorOccurred` is in no locale. It sat in the reorder failure toast already and I copied it into three more places, so a failed dismiss, restore or reorder printed the key at the reader. They all say `common.errorTitle` now. The suggestion mark on a phone card was the word spelled out, which took a third of a 136px card and pushed the date off it; it is the same plus the desktop suggestion card offers, and the card's italic dimmed title carries the rest. Dismissing a suggestion from the entry sheet has its own full-width row above the buttons rather than a two-line label wedged between Delete and Cancel. And two cards that should have been one design: the dashboard's spotlight trip wrote its facts in capitals on a panel of dark glass, the journey hero wrote them in sentence case on a gradient with its badge loose in a corner. The journey card is built the way the trip card is now, and the trip card's three pills are set like the DAY x OF y badge beside them, a size down and on the same ground.
This commit is contained in:
@@ -195,7 +195,8 @@ describe('JourneyMapGL', () => {
|
||||
render(<JourneyMapGL checkins={[]} entries={entries} />)
|
||||
expect(mapboxgl.accessToken).toBe('pk.test_token')
|
||||
expect(mapboxgl.Map).toHaveBeenCalledTimes(1)
|
||||
expect(mapOptions()).toMatchObject({ style: 'mapbox://styles/mapbox/standard', attributionControl: true })
|
||||
// Collapsed to its ⓘ rather than a strip of text across the bottom (#2299).
|
||||
expect(mapOptions()).toMatchObject({ style: 'mapbox://styles/mapbox/standard', attributionControl: { compact: true } })
|
||||
})
|
||||
|
||||
it('FE-COMP-JMAPGL-003: maplibre needs no token and opts out of the around-center rotate', () => {
|
||||
@@ -331,7 +332,7 @@ describe('JourneyMapGL', () => {
|
||||
const html = popupHtml()
|
||||
expect(html).toContain('>Louvre<')
|
||||
expect(html).toContain('trek-journey-popup-place')
|
||||
expect(html).toContain('trek-journey-popup-sep')
|
||||
expect(html).toContain('trek-journey-popup-chip')
|
||||
})
|
||||
|
||||
it('FE-COMP-JMAPGL-014: the popup falls back to the location name when the entry has no title', () => {
|
||||
@@ -349,9 +350,9 @@ describe('JourneyMapGL', () => {
|
||||
|
||||
const html = popupHtml()
|
||||
expect(html).toContain('>Reykjavík<')
|
||||
// the location moved to the title line, so there is no place chip left below
|
||||
// the location moved to the title line, so there is no place chip left below.
|
||||
// The date keeps its own chip, which is why only the place one is checked.
|
||||
expect(html).not.toContain('trek-journey-popup-place')
|
||||
expect(html).not.toContain('trek-journey-popup-sep')
|
||||
})
|
||||
|
||||
it('FE-COMP-JMAPGL-015: an entry with neither title nor place still gets a heading', () => {
|
||||
|
||||
Reference in New Issue
Block a user