@@ -47,16 +47,14 @@ const orgRoute: Route = {
4747 id : ORGANIZATION_MATCH_ID ,
4848 data : {
4949 organization : { title : "Acme" } ,
50- project : { name : "my-project" } ,
51- environment : { type : "PRODUCTION" } ,
5250 } ,
5351} ;
5452
5553describe ( "pageMeta" , ( ) => {
5654 it ( "adds the project and environment scope to an environment page" , ( ) => {
5755 const title = renderTitle ( [ rootRoute , orgRoute , { id : "routes/runs" , meta : pageMeta ( "Runs" ) } ] ) ;
5856
59- expect ( title ) . toBe ( "Runs | my-project (Prod) | Trigger.dev" ) ;
57+ expect ( title ) . toBe ( "Runs | Trigger.dev" ) ;
6058 } ) ;
6159
6260 it ( "uses the deepest declared title" , ( ) => {
@@ -67,7 +65,7 @@ describe("pageMeta", () => {
6765 { id : "routes/runs.$runParam" , meta : pageMeta ( [ "run_abc" , "Runs" ] ) } ,
6866 ] ) ;
6967
70- expect ( title ) . toBe ( "run_abc | Runs | my-project (Prod) | Trigger.dev" ) ;
68+ expect ( title ) . toBe ( "run_abc | Runs | Trigger.dev" ) ;
7169 } ) ;
7270
7371 it ( "falls back to the nearest declared title, then the app title" , ( ) => {
@@ -78,7 +76,7 @@ describe("pageMeta", () => {
7876 { id : "routes/runs" , meta : pageMeta ( "Runs" ) } ,
7977 { id : "routes/runs._index" } ,
8078 ] )
81- ) . toBe ( "Runs | my-project (Prod) | Trigger.dev" ) ;
79+ ) . toBe ( "Runs | Trigger.dev" ) ;
8280
8381 expect ( renderTitle ( [ rootRoute , orgRoute , { id : "routes/runs._index" } ] ) ) . toBe ( "Trigger.dev" ) ;
8482 } ) ;
@@ -95,17 +93,17 @@ describe("pageMeta", () => {
9593 orgRoute ,
9694 { id : "routes/task" , data : { task : { slug : "my-task" } } , meta } ,
9795 ] )
98- ) . toBe ( "my-task | Tasks | my-project (Prod) | Trigger.dev" ) ;
96+ ) . toBe ( "my-task | Tasks | Trigger.dev" ) ;
9997
10098 expect (
10199 renderTitle ( [ rootRoute , orgRoute , { id : "routes/task" , meta } ] , {
102100 ...ENV_PARAMS ,
103101 taskParam : "other" ,
104102 } )
105- ) . toBe ( "other | Tasks | my-project (Prod) | Trigger.dev" ) ;
103+ ) . toBe ( "other | Tasks | Trigger.dev" ) ;
106104 } ) ;
107105
108- it ( "keeps the org name for org-scoped pages and the app env tag" , ( ) => {
106+ it ( "keeps the app env tag" , ( ) => {
109107 const stagingRoot : Route = {
110108 id : "root" ,
111109 data : { appEnv : "staging" } ,
@@ -121,20 +119,7 @@ describe("pageMeta", () => {
121119 { organizationSlug : "acme" }
122120 ) ;
123121
124- expect ( title ) . toBe ( "Team | Acme | Trigger.dev (staging)" ) ;
125- } ) ;
126-
127- it ( "ignores the project the org loader resolved when the URL names none" , ( ) => {
128- // The org loader always resolves a "best" project, so an org page would otherwise
129- // advertise a project the user is not looking at.
130- const title = renderTitle (
131- [ rootRoute , orgRoute , { id : "routes/team" , meta : pageMeta ( "Team" ) } ] ,
132- {
133- organizationSlug : "acme" ,
134- }
135- ) ;
136-
137- expect ( title ) . toBe ( "Team | Acme | Trigger.dev" ) ;
122+ expect ( title ) . toBe ( "Team | Trigger.dev (staging)" ) ;
138123 } ) ;
139124
140125 it ( "carries the root's non-title tags through" , ( ) => {
@@ -150,6 +135,6 @@ describe("pageMeta", () => {
150135 } as any ) as MetaDescriptor [ ] ;
151136
152137 expect ( descriptors ) . toContainEqual ( { name : "viewport" , content : "width=1024" } ) ;
153- expect ( renderTitle ( routes ) ) . toBe ( "Runs | my-project (Prod) | Trigger.dev" ) ;
138+ expect ( renderTitle ( routes ) ) . toBe ( "Runs | Trigger.dev" ) ;
154139 } ) ;
155140} ) ;
0 commit comments