fix tests

This commit is contained in:
Dan Harrin
2025-06-03 15:15:17 +01:00
parent 18f85a2358
commit 749b84cc2c
6 changed files with 15 additions and 15 deletions
@@ -303,7 +303,7 @@ $runGenerateManageRelatedRecordsPageCommand = function (TestCase $testCase): Pen
'--no-interaction' => true,
])
->expectsQuestion('Should the configuration be generated from the current database columns?', false)
->expectsQuestion('Does the model use soft deletes?', false);
->expectsQuestion('Does the model use soft-deletes?', false);
$testCase->artisan('make:filament-resource', [
'model' => 'User',
@@ -312,7 +312,7 @@ $runGenerateManageRelatedRecordsPageCommand = function (TestCase $testCase): Pen
])
->expectsQuestion('Would you like to generate a read-only view page for the resource?', false)
->expectsQuestion('Should the configuration be generated from the current database columns?', false)
->expectsQuestion('Does the model use soft deletes?', false);
->expectsQuestion('Does the model use soft-deletes?', false);
require_once __DIR__ . '/../../../Fixtures/Models/Team.php';
require_once app_path('Filament/Resources/TeamResource.php');
@@ -349,7 +349,7 @@ $generateManageRelatedRecordsPageCommandQuestions = [
'titleAttribute' => 'What is the title attribute for this model?',
'isGeneratedTable' => 'Should the table columns be generated from the current database columns?',
'hasViewOperation' => 'Would you like to generate a read-only view modal for the table?',
'isSoftDeletable' => 'Does the related model use soft deletes?',
'isSoftDeletable' => 'Does the related model use soft-deletes?',
'relationshipType' => 'What type of relationship is this?',
];
@@ -421,7 +421,7 @@ it('can generate a manage related records page class in a resource with a view o
->toMatchSnapshot();
});
it('can generate a manage related records page class in a resource with soft deletes', function () use ($runGenerateManageRelatedRecordsPageCommand, $generateManageRelatedRecordsPageCommandQuestions): void {
it('can generate a manage related records page class in a resource with soft-deletes', function () use ($runGenerateManageRelatedRecordsPageCommand, $generateManageRelatedRecordsPageCommandQuestions): void {
$questions = $generateManageRelatedRecordsPageCommandQuestions;
$runGenerateManageRelatedRecordsPageCommand($this)
@@ -117,7 +117,7 @@ it('can generate a relation manager with a view operation', function (): void {
->toMatchSnapshot();
});
it('can generate a relation manager with soft deletes', function (): void {
it('can generate a relation manager with soft-deletes', function (): void {
$this->artisan('make:filament-relation-manager', [
'resource' => 'Users',
'relationship' => 'teams',
@@ -104,7 +104,7 @@ it('can generate the form and table of a resource class', function (): void {
->toMatchSnapshot();
});
it('can generate a resource class with soft deletes', function (): void {
it('can generate a resource class with soft-deletes', function (): void {
$this->artisan('make:filament-resource', [
'model' => 'Post',
'--soft-deletes' => true,
@@ -118,7 +118,7 @@ it('can generate a resource class with soft deletes', function (): void {
->toMatchSnapshot();
});
it('can generate a resource edit page with soft deletes', function (): void {
it('can generate a resource edit page with soft-deletes', function (): void {
$this->artisan('make:filament-resource', [
'model' => 'Post',
'--soft-deletes' => true,
@@ -294,7 +294,7 @@ $runGenerateManageRelatedRecordsPageCommand = function (TestCase $testCase): Pen
'--no-interaction' => true,
])
->expectsQuestion('Should the configuration be generated from the current database columns?', false)
->expectsQuestion('Does the model use soft deletes?', false);
->expectsQuestion('Does the model use soft-deletes?', false);
$testCase->artisan('make:filament-resource', [
'model' => 'User',
@@ -303,7 +303,7 @@ $runGenerateManageRelatedRecordsPageCommand = function (TestCase $testCase): Pen
])
->expectsQuestion('Would you like to generate a read-only view page for the resource?', false)
->expectsQuestion('Should the configuration be generated from the current database columns?', false)
->expectsQuestion('Does the model use soft deletes?', false);
->expectsQuestion('Does the model use soft-deletes?', false);
require_once __DIR__ . '/../../Fixtures/Models/Team.php';
require_once app_path('Filament/Resources/Teams/TeamResource.php');
@@ -346,7 +346,7 @@ $generateManageRelatedRecordsPageCommandQuestions = [
'infolistSchemaClass' => 'Which infolist schema class would you like to use?',
'hasTableClass' => 'Would you like to use an existing table class?',
'tableClass' => 'Which table class would you like to use?',
'isSoftDeletable' => 'Does the related model use soft deletes?',
'isSoftDeletable' => 'Does the related model use soft-deletes?',
'relationshipType' => 'What type of relationship is this?',
];
@@ -484,7 +484,7 @@ it('can generate a manage related records page class in a resource with a table
->toMatchSnapshot();
});
it('can generate a manage related records page class in a resource with soft deletes', function () use ($runGenerateManageRelatedRecordsPageCommand, $generateManageRelatedRecordsPageCommandQuestions): void {
it('can generate a manage related records page class in a resource with soft-deletes', function () use ($runGenerateManageRelatedRecordsPageCommand, $generateManageRelatedRecordsPageCommandQuestions): void {
$questions = $generateManageRelatedRecordsPageCommandQuestions;
$runGenerateManageRelatedRecordsPageCommand($this)
@@ -161,7 +161,7 @@ it('can generate a relation manager with a table class', function (): void {
->toMatchSnapshot();
});
it('can generate a relation manager with soft deletes', function (): void {
it('can generate a relation manager with soft-deletes', function (): void {
$this->artisan('make:filament-relation-manager', [
'resource' => 'Users',
'relationship' => 'teams',
@@ -226,7 +226,7 @@ it('can generate the form, infolist, and table content embedded in a resource cl
->toMatchSnapshot();
});
it('can generate a resource class with soft deletes', function (): void {
it('can generate a resource class with soft-deletes', function (): void {
$this->artisan('make:filament-resource', [
'model' => 'Post',
'--soft-deletes' => true,
@@ -240,7 +240,7 @@ it('can generate a resource class with soft deletes', function (): void {
->toMatchSnapshot();
});
it('can generate a resource table with soft deletes', function (): void {
it('can generate a resource table with soft-deletes', function (): void {
$this->artisan('make:filament-resource', [
'model' => 'Post',
'--soft-deletes' => true,
@@ -254,7 +254,7 @@ it('can generate a resource table with soft deletes', function (): void {
->toMatchSnapshot();
});
it('can generate a resource edit page with soft deletes', function (): void {
it('can generate a resource edit page with soft-deletes', function (): void {
$this->artisan('make:filament-resource', [
'model' => 'Post',
'--soft-deletes' => true,