From 3598eda3fd75c2ae5c226e4a1f1ef010bf3adf8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Fri, 27 Feb 2026 20:00:48 -0300 Subject: [PATCH] Fix E2E failing tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These tests fail sometimes. This is an attempt to fix them. Signed-off-by: MaurĂ­cio Meneghini Fauth --- tests/end-to-end/CreateRemoveUserTest.php | 2 +- tests/end-to-end/ServerSettingsTest.php | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/end-to-end/CreateRemoveUserTest.php b/tests/end-to-end/CreateRemoveUserTest.php index db731be4f8..2c71ebf1f7 100644 --- a/tests/end-to-end/CreateRemoveUserTest.php +++ b/tests/end-to-end/CreateRemoveUserTest.php @@ -75,7 +75,7 @@ class CreateRemoveUserTest extends TestBase $this->byId('text_pma_pw2')->sendKeys($this->txtPassword); // Make sure the element is visible before clicking - $this->scrollIntoView('createdb-1'); + $this->scrollIntoView('createdb-1', 150); $this->waitForElement('id', 'createdb-1')->click(); $this->waitForElement('id', 'createdb-2')->click(); diff --git a/tests/end-to-end/ServerSettingsTest.php b/tests/end-to-end/ServerSettingsTest.php index fb97ebea30..7da7f854b8 100644 --- a/tests/end-to-end/ServerSettingsTest.php +++ b/tests/end-to-end/ServerSettingsTest.php @@ -35,15 +35,12 @@ class ServerSettingsTest extends TestBase */ private function saveConfig(): void { - // Submit the form - $ele = $this->waitForElement( + $this->scrollToBottom(); + $this->waitForElement( 'xpath', "//div[contains(@class, 'tab-pane') and contains(@class, 'show')" - . " and contains(@class, 'active')]//input[@value='Apply']", - ); - $this->scrollToBottom(); - $this->moveto($ele); - $ele->click(); + . " and contains(@class, 'active')]//input[@value='Apply']", + )->click(); $success = $this->waitUntilElementIsPresent('cssSelector', '.alert-success', 5000); self::assertStringContainsString('Configuration has been saved', $success->getText());