File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
web-app/src/app/screens/Feed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,15 @@ export function generatePageTitle(
5151 feedName ?: string ,
5252) : string {
5353 let newDocTitle = getFeedFormattedName ( sortedProviders , feedName ) ;
54- const dataTypeVerbose = dataType === 'gtfs' ? 'Schedule' : 'Realtime' ;
5554
5655 if ( newDocTitle !== '' ) {
57- newDocTitle += ` GTFS ${ dataTypeVerbose } Feed - ` ;
56+ if ( dataType === 'gtfs' ) {
57+ newDocTitle += ' GTFS Schedule Feed - ' ;
58+ } else if ( dataType === 'gtfs_rt' ) {
59+ newDocTitle += ' GTFS Realtime Feed - ' ;
60+ } else if ( dataType === 'gbfs' ) {
61+ newDocTitle += ' GBFS Feed - ' ;
62+ }
5863 }
5964
6065 newDocTitle += 'Mobility Database' ;
Original file line number Diff line number Diff line change @@ -197,6 +197,9 @@ describe('Feed page', () => {
197197
198198 const titleAllEmpty = generatePageTitle ( [ ] , 'gtfs' , '' ) ;
199199 expect ( titleAllEmpty ) . toEqual ( 'Mobility Database' ) ;
200+
201+ const gbfsTitle = generatePageTitle ( [ 'Flamingo Porirua' ] , 'gbfs' ) ;
202+ expect ( gbfsTitle ) . toEqual ( 'Flamingo Porirua GBFS Feed - Mobility Database' ) ;
200203 } ) ;
201204
202205 it ( 'should generate the correct page description' , ( ) => {
You can’t perform that action at this time.
0 commit comments