File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ public function setCurrentInstanceLabel(?string $label): self
2727
2828 public function allSegments (): array
2929 {
30- $ url = sharp ()->config ()->get ('custom_url_segment ' );
30+ $ url = sharp ()->config ()->get ('custom_url_segment ' )
31+ .'/ ' .sharp ()->context ()->globalFilterUrlSegmentValue ();
3132
3233 return $ this
3334 ->breadcrumbItems ()
Original file line number Diff line number Diff line change 1919});
2020
2121it ('builds the breadcrumb for an entity list ' , function () {
22- $ this
23- ->get (route ('code16.sharp.list ' , ['person ' ]))
22+ $ this ->get (route ('code16.sharp.list ' , ['person ' ]))
2423 ->assertOk ();
2524
2625 expect (sharp ()->context ()->isEntityList ())->toBeTrue ()
27- ->and (sharp ()->context ()->breadcrumb ()->allSegments ())->toHaveCount (1 );
26+ ->and (sharp ()->context ()->breadcrumb ()->allSegments ())->toHaveCount (1 )
27+ ->and (sharp ()->context ()->breadcrumb ()->allSegments ()[0 ]['url ' ])->toEqual (url ('sharp/root/s-list/person ' ));
2828});
2929
3030it ('builds the breadcrumb for a show page ' , function () {
4646it ('builds the breadcrumb for a single show page ' , function () {
4747 sharp ()->config ()->declareEntity (SinglePersonEntity::class);
4848
49- $ this
50- ->get (route ('code16.sharp.single-show ' , 'single-person ' ))
49+ $ this ->get (route ('code16.sharp.single-show ' , 'single-person ' ))
5150 ->assertOk ();
5251
5352 expect (sharp ()->context ())
You can’t perform that action at this time.
0 commit comments