Codeception / module-playwright

Playwright testing module in PHP
MIT License
5 stars 2 forks source link

waitForText and "" #3

Closed eXorus closed 1 week ago

eXorus commented 1 month ago

I have a passing test with webdriver that do:

$I->waitForText("results for "dev"")

and it's failing here:

There was 1 failure:
1) SearchCest: Student can search courses and paths | "paths","dev","Web Developer"
 Test  tests/Web/Product/SearchCest.php:studentCanSearchCoursesAndPaths
 Step  Wait for text "results for "dev""
 Fail  locator.isVisible: Unexpected token "dev" while parsing selector ":has-text("results for "dev"")"
Call log:
  -   checking visibility of :has-text("results for "dev"") >> nth=0

Scenario Steps:

 17. $I->waitForText("results for "dev"") at tests/Support/Traits/CustomAssertions.php:55
 16. $I->grabMultiple("#mainSearch ul li a") at tests/Support/Page/Product/SearchPage.php:46
 15. $I->type("dev",1) at tests/Support/Page/Product/SearchPage.php:25
 14. $I->click("#algolia-search-input") at tests/Support/Page/Product/SearchPage.php:24
 13. $I->waitForClickable("#algolia-search-input") at tests/Support/Page/Product/SearchPage.php:23
 12. $I->click("#main-search form") at tests/Support/Page/Product/SearchPage.php:22

I can't to anything because I really search for a text in the html page like this results for "dev"

DavertMik commented 1 month ago

@eXorus could you write a failing test and make PR? Seems like the issue is with double quotes here

DavertMik commented 1 week ago

@eXorus this is a bug in CodeceptJS, I need to fix it there

https://github.com/codeceptjs/CodeceptJS/issues/4523