feat: implement user authentication traits
and tests for admin panel image uploads
This commit is contained in:
parent
4cb9d078b1
commit
bef3ae7f41
5 changed files with 106 additions and 104 deletions
|
|
@ -7,7 +7,7 @@ use Laravel\Dusk\Browser;
|
|||
use Tests\Browser\Concerns\AuthenticatesUsers;
|
||||
use Tests\DuskTestCase;
|
||||
|
||||
class LoginTest extends DuskTestCase
|
||||
class UploadImageAdminTest extends DuskTestCase
|
||||
{
|
||||
use DatabaseTruncation;
|
||||
use AuthenticatesUsers;
|
||||
|
|
@ -31,13 +31,14 @@ class LoginTest extends DuskTestCase
|
|||
->assertTitleContains('Media')
|
||||
->clickLink('New media')
|
||||
->waitForText('Create Media')
|
||||
->pause(1000)
|
||||
->type('#form\\.name', 'test image')
|
||||
->assertVisible('.filepond--drop-label')
|
||||
->attach('.filepond--browser', $filePath)
|
||||
->waitforText('Create')
|
||||
->clickLink('Create')
|
||||
// ->assertSee('Upload successful')
|
||||
->pause(10000),
|
||||
->pause(7000)
|
||||
->waitForText('Create')
|
||||
->waitFor('#key-bindings-1:not([disabled])')
|
||||
->click('#key-bindings-1')
|
||||
->assertSee('Collection name'),
|
||||
1000 // Custom pause time for this test
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue