Repository navigation
Replies: 2 comments
|
Hi @edwinheij, I added an example in the PowerGrid Demo repository for Browser Testing. //tests/Browser/FilterFieldTest.php
$searchField = '[wire\:model\.live\.debounce\.700ms="search"]';
it('can filter by existing record')
->visit('/examples/actions-from-view')
->assertSee('Arkansas Possum Pie')
->fill($searchField, 'Bacalhau')
->assertDontSee('Arkansas Possum Pie')
->assertSee('Bacalhau com natas');I have used Higher Order Testing as a personal code styling preference, but It might be relevant that I've raised the timeout, and I did not include //Pest.php
pest()->browser()->timeout(20000);
pest()->extend(TestCase::class)->in('Browser');
pest()->extend(TestCase::class)
->beforeEach(function () {
$this->withoutVite();
})
->in('Feature'); |
0 replies
|
Coming to think, Vite can also be restored in a single test container. //Pest.php
pest()
->in('Feature')
->beforeEach(fn () => $this->withoutVite());//Feature/SomeTest.php
it('can filter by existing record')
->withVite() // 👈
->visit('/my-route')
->assertSee('Something cool'); |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Someone ever tried to do a browser test?
I started with a simple 'global search', but something is not going well. This is my test:
But the filter isn't triggered.
Anyone having thoughts on this?
The short installation for PestPHP Browser testing can be found here: https://pestphp.com/docs/pest-v4-is-here-now-with-browser-testing#content-pest-v4-is-here-now-with-browser-testing
All reactions