feat: custom class in entry form
and update Dusk test for featured image selection
This commit is contained in:
parent
bef3ae7f41
commit
ae662a30ef
2 changed files with 8 additions and 2 deletions
|
|
@ -43,8 +43,9 @@ class EntryForm
|
|||
->dehydrated(false)
|
||||
->hintAction(
|
||||
Action::make('featured_picker')
|
||||
->label('Pick from Gallery')
|
||||
->label('Featured Image from Gallery')
|
||||
->icon('heroicon-m-photo')
|
||||
->extraAttributes(['id' => 'featured-picker-button'])
|
||||
->schema([
|
||||
Select::make('image_id')
|
||||
->label('Select an existing image')
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use Laravel\Dusk\Browser;
|
|||
use Tests\Browser\Concerns\AuthenticatesUsers;
|
||||
use Tests\DuskTestCase;
|
||||
|
||||
class UploadImageAdminTest extends DuskTestCase
|
||||
class CreateEntryAdminTest extends DuskTestCase
|
||||
{
|
||||
use DatabaseTruncation;
|
||||
use AuthenticatesUsers;
|
||||
|
|
@ -53,6 +53,11 @@ class UploadImageAdminTest extends DuskTestCase
|
|||
->waitForText('Updated at')
|
||||
->assertSee('Updated at')
|
||||
->visit('/admin/entries/1/edit')
|
||||
->waitForText('Edit TEST ENTRY')
|
||||
->pause(2000)
|
||||
->waitForText('Featured Image')
|
||||
->click('#featured-picker-button')
|
||||
|
||||
->pause(10000),
|
||||
1000 // Custom pause time for this test
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue