Issue Task Closed

#104702Test 'FileClipboardCest.php:seeAddRemoveMultipleRecords' fails sporadically

Ayke Halder 08/22/24, 13:25 updated 10/15/24, 09:09

Description

This test fails sporadically:

1) FileClipboardCest: See add remove multiple records
 Test  Acceptance/Application/FileList/FileClipboardCest.php:seeAddRemoveMultipleRecords

  [Facebook\WebDriver\Exception\ElementClickInterceptedException] element click intercepted: Element <button type="button" class="dropdown-item disabled" data-multi-record-selection-check-action="check-all" title="Check all">...</button> is not clickable at point (121, 269). Other element would receive the click: <li>...</li>
  (Session info: chrome-headless-shell=124.0.6367.118) 

See Slack discussion:
https://typo3.slack.com/archives/C03AM9R17/p1724316947431929

The button is disabled via CSS class="disabled":

.dropdown-item.disabled, .dropdown-item:disabled {
  pointer-events: none;
}

$I->waitForElementClickable() does not work with CSS pointer-events: none

$I->waitForElementClickable() boils down to:

    /**
     * Is the element currently enabled or not? This will generally return true
     * for everything but disabled input elements.
     *
     * @return bool
     */

Clean solution:

Make disabled buttons really disabled, then waitForElementClickable might work.

  • Current state: <button class="disabled">…</button>
  • Should be (also for a11y): <button class="disabled" disabled>…</button>

Quick solution:

Change the test.

  • Current: $I->waitForElementClickable('button[data-…="…"]');
  • Should be: $I->waitForElementVisible('button[data-…="…"]:not(.disabled)');

Reviews 6