From 76ea0492b344c850d3d0dc6e41159cbd4d976ec3 Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Sun, 21 Sep 2025 12:19:10 +0200 Subject: [PATCH] Store failing page for Crawler test As the E2E/Crawler is very generic it's hard to pinpoint what page is failing and why. We stored the failing page(s) with GitLab CI but this was lost after the migration. --- .../E2E/Controller/ControllerRolesTraversalTest.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/webapp/tests/E2E/Controller/ControllerRolesTraversalTest.php b/webapp/tests/E2E/Controller/ControllerRolesTraversalTest.php index 4b8600441f..8d61df01f9 100644 --- a/webapp/tests/E2E/Controller/ControllerRolesTraversalTest.php +++ b/webapp/tests/E2E/Controller/ControllerRolesTraversalTest.php @@ -227,10 +227,12 @@ public function visitWithNoContest(string $url, bool $dropdown): void try { self::assertSelectorExists('a#navbarDropdownContests:contains("no contest")', "Failed at: " . $url); } catch (\Exception $e) { - $gitlabArtifacts = getenv('GITLABARTIFACTS'); - if ($gitlabArtifacts != '') { - $fileHandler = fopen(sprintf("%s/%s", $gitlabArtifacts, str_replace('/', '_s_', $url)), 'w'); - fwrite($fileHandler, $response->getContent()); + if (getenv('CI')) { // We're running in GHA. + $ciArtifacts = getenv('ARTIFACTS'); + if ($ciArtifacts != '') { + $fileHandler = fopen(sprintf("%s/%s", $ciArtifacts, str_replace('/', '_s_', $url)), 'w'); + fwrite($fileHandler, $response->getContent()); + } } throw $e; }