Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox Behat testing is very fragile #1972

Closed
mvorisek opened this issue Jan 20, 2023 · 1 comment · Fixed by #2033 or #2113
Closed

Firefox Behat testing is very fragile #1972

mvorisek opened this issue Jan 20, 2023 · 1 comment · Fixed by #2033 or #2113
Labels

Comments

@mvorisek
Copy link
Member

Firefox Behat testing is failing too often. Problem should be identified and fixed.

@mvorisek
Copy link
Member Author

mvorisek commented Sep 23, 2023

  Scenario: search no ajax                              # tests-behat/grid.feature:13
    Given I am on "collection/grid.php?no-ajax=1"       # Behat\MinkExtension\Context\MinkContext::visit()
    Then I search grid for "kingdom"                    # Atk4\Ui\Behat\Context::iSearchGridFor()
    ┌─ @BeforeStep # Atk4\Ui\Behat\Context::closeAllToasts()
    │
    ╳  WebDriver\Exception\JavaScriptError: TypeError: jQuery(...).toast is not a function
    ╳  Stack trace:
    ╳  #0 vendor/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php(166): WebDriver\Exception::factory()
    ╳  #1 vendor/instaclick/php-webdriver/lib/WebDriver/Session.php(436): WebDriver\AbstractWebDriver->curl()
    ╳  #2 vendor/atk4/behat-mink-selenium2-driver/src/Selenium2Driver.php(1068): WebDriver\Session->execute()
    ╳  #3 src/Behat/MinkSession.php(28): Behat\Mink\Driver\Selenium2Driver->executeScript()
    ╳  #4 src/Behat/Context.php(66): Atk4\Ui\Behat\MinkSession->executeScript()

  Scenario: Checkbox click event must not bubble to row click                    # tests-behat/grid.feature:19
    ┌─ @BeforeStep # Atk4\Ui\Behat\Context::closeAllToasts()
    │
    ╳  WebDriver\Exception\JavaScriptError: TypeError: jQuery(...).toast is not a function
    ╳  Stack trace:
    ╳  #0 vendor/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php(166): WebDriver\Exception::factory()
    ╳  #1 vendor/instaclick/php-webdriver/lib/WebDriver/Session.php(436): WebDriver\AbstractWebDriver->curl()
    ╳  #2 vendor/atk4/behat-mink-selenium2-driver/src/Selenium2Driver.php(1068): WebDriver\Session->execute()
    ╳  #3 src/Behat/MinkSession.php(28): Behat\Mink\Driver\Selenium2Driver->executeScript()
    ╳  #4 src/Behat/Context.php(66): Atk4\Ui\Behat\MinkSession->executeScript()

  Scenario: popup column header                                                  # tests-behat/grid.feature:40
    ┌─ @BeforeStep # Atk4\Ui\Behat\Context::closeAllToasts()
    │
     ...

--- Failed scenarios:

    tests-behat/grid.feature:13
    tests-behat/grid.feature:19
    tests-behat/grid.feature:40
    tests-behat/grid.feature:52
    tests-behat/grid.feature:65
    tests-behat/grid.feature:80
    tests-behat/grid.feature:89
    tests-behat/js.feature:3
    tests-behat/js.feature:28
    tests-behat/lookup.feature:3
    tests-behat/lookup.feature:12

92 scenarios (81 passed, 11 failed)

for some reason failing mostly on Oracle, but in 1/10 cases also on MSSQL and in 1/20 in SQLite too

PHP_CLI_SERVER_WORKERS=4 for webserver does not help. The most decisive repro config is Oracle DB!

UPDATE: The reason seems to be Firefox updates document.readyState only after at least part of the new page has been loaded (and Oracle testing needed a little more time per request as connect to an Oracle DB takes a little more time)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant