From 8bfd2ed40d09379870f74a430d4e72cb6a52470a Mon Sep 17 00:00:00 2001
From: Christian Kuhn <lolli@schwarzbu.ch>
Date: Mon, 27 Nov 2023 11:08:57 +0100
Subject: [PATCH] [BUGFIX] Avoid side effect in acceptance tests
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

FalMetadataCest changes the title of styleguide
'bus_lane.jpg'. InlineFalCest uses the title to
look up details in element information modal and
stumbles. Check for the filename only to avoid
this side effect.

Resolves: #102523
Releases: 11.5
Change-Id: I6b111194e9888690bf630ef24b86ac8947223127
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81971
Reviewed-by: Jasmina Ließmann <minapokhalo+typo3@gmail.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Jasmina Ließmann <minapokhalo+typo3@gmail.com>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Andreas Kienast <a.fernandez@scripting-base.de>
Reviewed-by: Andreas Kienast <a.fernandez@scripting-base.de>
---
 .../Tests/Acceptance/Application/FormEngine/InlineFalCest.php  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/typo3/sysext/core/Tests/Acceptance/Application/FormEngine/InlineFalCest.php b/typo3/sysext/core/Tests/Acceptance/Application/FormEngine/InlineFalCest.php
index 4f4b4986f826..a71dfdbb792c 100644
--- a/typo3/sysext/core/Tests/Acceptance/Application/FormEngine/InlineFalCest.php
+++ b/typo3/sysext/core/Tests/Acceptance/Application/FormEngine/InlineFalCest.php
@@ -51,7 +51,6 @@ class InlineFalCest
     {
         $infoButtonSelector = '.tab-content button[data-action="infowindow"]';
         $I->wait(2);
-        $filename = $I->grabTextFrom(self::$filenameSelector);
         $I->click($infoButtonSelector);
         $I->wait(2);
         $modalDialog->canSeeDialog();
@@ -59,7 +58,7 @@ class InlineFalCest
         $I->switchToIFrame('.modal-iframe');
         $I->wait(2);
         $modalTitle = $I->grabTextFrom('.card-title');
-        $I->assertStringContainsString($filename, $modalTitle);
+        $I->assertStringContainsString('bus_lane.jpg', $modalTitle);
     }
 
     public function hideFalRelation(ApplicationTester $I): void
-- 
GitLab