pestphp / pestphp/pest

[Bug]: Inputs with "*" character not located after 4.1.0 update

Open
#1,508 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
11.7k
Forks
538
Avg merge
4d 11h
Merged PRs (30d)
8

Description

What Happened

This test works fine in ~4.0 but breaks in ^4.1

Using vuetify and material design inputs I used to locate inputs with its label names like this:

$page->fill('Descrição *', 'Anel de Zircônia')
            ->fill('Barcode *', Ean::codeGenerator(13))
...
Image

#77 /var/www/httpdocs/v3/tests/Browser/ProdutoBrowserTest.php(6): Pest\Browser\Api\PendingAwaitablePage->__call('fill', Array)
#78 /var/www/httpdocs/v3/vendor/pestphp/pest/src/Factories/TestCaseMethodFactory.php(168): P\Tests\Browser\ProdutoBrowserTest->{closure:/var/www/httpdocs/v3/tests/Browser/ProdutoBrowserTest.php:5}()

How to Reproduce
$page->fill('Descrição *', 'Anel de Zircônia')
            ->fill('Barcode *', Ean::codeGenerator(13))
Sample Repository

No response

Pest Version

4.1.0

PHP Version

8.4.11

Operation System

Windows

Notes

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two $page->fill() calls from the report on Pest 4.1.0, using the Vuetify and Material Design inputs described. Check the failing call in tests/Browser/ProdutoBrowserTest.php and trace how the browser API locates labels containing *; done means both Descrição * and Barcode * are located and filled successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.