Skip to content

Commit

Permalink
Correct test failures from merge
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoungportable committed Mar 7, 2024
1 parent a8538e3 commit 8ddf4ef
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: PHPUnit
run: php vendor/bin/phpunit
run: php vendor/bin/phpunit --stop-on-defect
4 changes: 3 additions & 1 deletion src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public function handle()
$this->info('Adding permissions');

$this->info('Creating Custom Filament Theme');
$this->call('make:filament-theme');

$this->callSilent('make:filament-theme');

$this->call('vendor:publish', ['--tag' => 'filament-tiptap-editor-config']);

$this->info('Finished');
Expand Down
7 changes: 4 additions & 3 deletions tests/Filament/TaxonomyResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace Portable\FilaCms\Tests\Filament;

use Portable\FilaCms\Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Livewire\Livewire;
use Portable\FilaCms\Filament\Resources\TaxonomyResource as TargetResource;
use Portable\FilaCms\Models\Taxonomy as TargetModel;
use Portable\FilaCms\Tests\TestCase;
use Spatie\Permission\Models\Role;
use Livewire\Livewire;
use Illuminate\Foundation\Testing\WithFaker;

class TaxonomyResourceTest extends TestCase
{
Expand Down Expand Up @@ -54,6 +54,7 @@ public function test_can_create_record(): void
Livewire::test(TargetResource\Pages\CreateTaxonomy::class)
->fillForm([
'name' => $this->faker->firstName,
'taxonomy_resources' => array_keys(FilaCms::getContentModels())
])
->call('create')
->assertHasNoFormErrors();
Expand Down
9 changes: 3 additions & 6 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,17 @@ protected function setUp(): void
File::delete(config_path('filament-tiptap-editor.php'));

// remove migrations from revisionable
File::delete(database_path('migrations\2013_04_09_062329_create_revisions_table.php'));
File::delete(database_path('migrations/2013_04_09_062329_create_revisions_table.php'));

// remove filament theme
File::delete(resource_path('css\filament\admin\tailwind.config.js'));
File::delete(resource_path('css\filament\admin\theme.css'));
File::delete(resource_path('css/filament/admin/tailwind.config.js'));
File::delete(resource_path('css/filament/admin/theme.css'));

$this->artisan('fila-cms:install')
->expectsOutputToContain('Installing Filament Base...')
->expectsQuestion('Would you like to publish the FilaCMS config?(Y/n)', 'Y')
->expectsQuestion('Would you like to run migrations(Y/n)?', 'Y')
->expectsQuestion('Would you like to add the required trait to your App\\Models\\User model?(Y/n)', 'Y')
->expectsQuestion('theme.css already exists, do you want to overwrite it?', 'no')
->expectsQuestion('tailwind.config.js already exists, do you want to overwrite it?', 'no')

->expectsOutputToContain('Finished')
->assertExitCode(0);

Expand Down

0 comments on commit 8ddf4ef

Please sign in to comment.