Skip to content

Commit

Permalink
Copy across recent changes from v5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Jan 12, 2024
1 parent 3560aff commit 3f3ff18
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v5.6.1 (2024-01-09)

### What's fixed
* Fix "Listable: Hidden" fields not showing in column picker #392 by @caseydwyer



## v5.6.0 (2023-12-23)

### What's improved
Expand Down
28 changes: 28 additions & 0 deletions tests/ResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,32 @@ public function can_get_listable_columns()
'seo_description',
], $resource->listableColumns()->toArray());
}

/** @test */
public function can_get_title_field()
{
$blueprint = Blueprint::make()->setContents([
'tabs' => [
'main' => [
'sections' => [
[
'fields' => [
['handle' => 'values->listable_hidden_field', 'field' => ['type' => 'text', 'listable' => 'hidden']],
['handle' => 'values->listable_shown_field', 'field' => ['type' => 'text', 'listable' => true]],
['handle' => 'values->not_listable_field', 'field' => ['type' => 'text', 'listable' => false]],
],
],
],
],
],
]);

Blueprint::shouldReceive('find')->with('runway::post')->andReturn($blueprint);

Runway::discoverResources();

$resource = Runway::findResource('post');

$this->assertEquals('values->listable_shown_field', $resource->titleField());
}
}

0 comments on commit 3f3ff18

Please sign in to comment.