Make DrupalSelenium2Driver::click timeout configurable

Created on 26 March 2025, 9 days ago

Problem/Motivation

I've been looking into Layout builder tests in the slow group and trying to improve them. This particular change takes LayoutBuilderDisableInteractionsTest from 2:10 to 1:01 locally

Multiple times in this test, we verify that an element is not clickable by verifying that the exception from DrupalSelenium2Driver::click has been caught. Each time we try catch to this exception, we need to wait the full 10 seconds.

This looks to be the only test that catches the expection as part of this testing, and there should be no BC implications, a new parameter will retain the existing 10 seconds value.

Steps to reproduce

  • Run LayoutBuilderDisableInteractionsTest
  • Apply MR
  • Run LayoutBuilderDisableInteractionsTest and see test time has been lowered.

Proposed resolution

Add a new optional $timeout parameter to LayoutBuilderDisableInteractionsTest::click with a default value of 10 seconds

Remaining tasks

  • Open MR
  • Discuss
  • Review & merge if the approach is approved.

API changes

New timeout parameter added to LayoutBuilderDisableInteractionsTest::click with a 10 second default value.

📌 Task
Status

Active

Version

11.0 🔥

Component

phpunit

Created by

🇳🇿New Zealand danielveza Brisbane, AU

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @danielveza
  • 🇳🇿New Zealand danielveza Brisbane, AU

    Ah actually. While I was prepping the MR for this it wasn't as easy as I was initially thinking when I opened this because we can't override the click element, and other approaches I was thinking about wasn't as clean as I was hoping for.

    Postponing this one so I can think about it a bit more.

Production build 0.71.5 2024