Skip to content

Commit df801f8

Browse files
committed
refactor: remove redundant comments and simplify element class references in tests
1 parent f16d552 commit df801f8

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

tests/Browser/Playwright/Page/InputValueTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
});
1515

1616
it('gets empty value for empty inputs', function (): void {
17-
// First clear the input to ensure it's empty
1817
$this->page->fill('#test-input', '');
1918
$value = $this->page->inputValue('#test-input');
2019

tests/Browser/Playwright/Page/QuerySelectorAllTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
declare(strict_types=1);
44

5+
use Pest\Browser\Playwright\Element;
6+
57
describe('querySelectorAll', function (): void {
68
beforeEach(function (): void {
79
$this->page = $this->page('/test/frame-tests');
@@ -19,7 +21,7 @@
1921

2022
expect($elements)->toBeArray();
2123
expect($elements)->toHaveCount(1);
22-
expect($elements[0])->toBeInstanceOf(Pest\Browser\Playwright\Element::class);
24+
expect($elements[0])->toBeInstanceOf(Element::class);
2325
});
2426

2527
it('returns multiple elements when multiple match', function (): void {
@@ -29,7 +31,7 @@
2931
expect(count($elements))->toBeGreaterThan(1);
3032

3133
foreach ($elements as $element) {
32-
expect($element)->toBeInstanceOf(Pest\Browser\Playwright\Element::class);
34+
expect($element)->toBeInstanceOf(Element::class);
3335
}
3436
});
3537

@@ -40,7 +42,7 @@
4042
expect(count($inputs))->toBeGreaterThan(0);
4143

4244
foreach ($inputs as $input) {
43-
expect($input)->toBeInstanceOf(Pest\Browser\Playwright\Element::class);
45+
expect($input)->toBeInstanceOf(Element::class);
4446
}
4547
});
4648

0 commit comments

Comments
 (0)