wip: article AI polish, category SEO fields, cover generator, membership plan seeder
This commit is contained in:
@@ -77,7 +77,7 @@ class PaidContentCommerceTest extends TestCase
|
||||
$author = User::factory()->create();
|
||||
[$article] = $this->makeArticle([
|
||||
'user_id' => $author->id,
|
||||
'content' => "## Intro\n\n".str_repeat('teaser ', 10)."UNIQUE_FULL_TOKEN ".str_repeat('tail ', 10),
|
||||
'content' => "## Intro\n\n".str_repeat('teaser ', 10).'UNIQUE_FULL_TOKEN '.str_repeat('tail ', 10),
|
||||
]);
|
||||
|
||||
ArticleProduct::query()->create([
|
||||
@@ -353,6 +353,20 @@ class PaidContentCommerceTest extends TestCase
|
||||
$this->assertSame(AccessDecision::NEED_PURCHASE, $access->resolve($article, null)->status);
|
||||
}
|
||||
|
||||
public function test_article_table_hooks_expose_price_column_and_filter(): void
|
||||
{
|
||||
$columnNames = collect(Hook::collect('filament.article.table.columns'))
|
||||
->map(fn ($column) => $column->getName())
|
||||
->all();
|
||||
$this->assertContains('paid_content_enabled', $columnNames);
|
||||
$this->assertContains('paid_content_price', $columnNames);
|
||||
|
||||
$filterNames = collect(Hook::collect('filament.article.table.filters'))
|
||||
->map(fn ($filter) => $filter->getName())
|
||||
->all();
|
||||
$this->assertContains('paid_enabled', $filterNames);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $overrides
|
||||
* @return array{0: Article, 1: User, 2: Category}
|
||||
|
||||
Reference in New Issue
Block a user