@@ -53,6 +53,7 @@ public function execute($instanceId, array $data = []): array {}
5353 'instanceSelection ' => null ,
5454 'confirmation ' => null ,
5555 'hasForm ' => false ,
56+ 'icon ' => null ,
5657 ],
5758 ],
5859 ],
@@ -66,6 +67,7 @@ public function execute($instanceId, array $data = []): array {}
6667 'description ' => null ,
6768 'confirmation ' => null ,
6869 'hasForm ' => false ,
70+ 'icon ' => null ,
6971 ],
7072 ],
7173 ],
@@ -265,7 +267,7 @@ public function getListData(): array|\Illuminate\Contracts\Support\Arrayable
265267 expect ($ list ->listConfig ()['commands ' ]['instance ' ][0 ][0 ]['authorization ' ])->toEqual ([1 , 2 ]);
266268});
267269
268- it ('allows to define a description on a command ' , function () {
270+ it ('allows to define a description & icon on a command ' , function () {
269271 $ list = new class () extends FakeSharpEntityList
270272 {
271273 public function getEntityCommands (): ?array
@@ -280,7 +282,8 @@ public function label(): string
280282
281283 public function buildCommandConfig (): void
282284 {
283- $ this ->configureDescription ('My Entity Command description ' );
285+ $ this ->configureDescription ('My Entity Command description ' )
286+ ->configureIcon ('testicon-user ' );
284287 }
285288
286289 public function execute (array $ data = []): array {}
@@ -291,7 +294,13 @@ public function execute(array $data = []): array {}
291294
292295 $ list ->buildListConfig ();
293296
294- expect ($ list ->listConfig ()['commands ' ]['entity ' ][0 ][0 ]['description ' ])->toEqual ('My Entity Command description ' );
297+ expect ($ list ->listConfig ()['commands ' ]['entity ' ][0 ][0 ])->toMatchArray ([
298+ 'description ' => 'My Entity Command description ' ,
299+ 'icon ' => [
300+ 'name ' => 'testicon-user ' ,
301+ 'svg ' => '<svg><!--user--></svg> ' ,
302+ ],
303+ ]);
295304});
296305
297306it ('allows to define separators in instance commands ' , function () {
0 commit comments