createTestUser("login-test@example.com"); $filePath = base_path('tests/Browser/fixtures/robot.webp'); $this->browse(function (Browser $browser) use ($user, $filePath) { $this->loginUser($browser, $user); $this->assertWithDebugPause( $browser, fn($b) => $b->visit('/admin/media') ->waitForLocation('/admin/media') ->assertPathIs('/admin/media') ->assertTitleContains('Media') ->clickLink('Add') ->waitForText('Create Asset') ->type('#form\\.alt_text', 'test image') ->assertVisible('.filepond--drop-label') ->attach('.filepond--browser', $filePath) ->pause(7000) ->waitForText('Create Asset') ->waitFor('#key-bindings-1:not([disabled])') ->click('#key-bindings-1') ->pause(1000) ->visit('/admin/entries') ->waitForLocation('/admin/entries') ->assertPathIs('/admin/entries') ->assertTitleContains('Entries') ->clickLink('New entry') ->waitForText('Create Entry') ->type('#form\\.title', 'TEST ENTRY') ->keys('#form\\.title', '{tab}') ->waitForText('Create') ->click('#key-bindings-1') ->waitForText('Updated at') ->assertSee('Updated at') ->visit('/admin/entries/1/edit') ->waitForText('Edit TEST ENTRY') ->waitForText('Featured Image') ->click('#featured-picker-button') ->pause(5000) ->waitForText('Select an existing image') ->pause(3000), // TODO: find a way to select the image 1000 // Custom pause time for this test ); }); } }