Skip to content

Commit 63eb231

Browse files
committed
Store the output of the page
1 parent b6b7112 commit 63eb231

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

webapp/tests/E2E/Controller/ControllerRolesTraversalTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,12 @@ public function visitWithNoContest(string $url, bool $dropdown): void
227227
try {
228228
self::assertSelectorExists('a#navbarDropdownContests:contains("no contest")', "Failed at: " . $url);
229229
} catch (\Exception $e) {
230-
$gitlabArtifacts = getenv('GITLABARTIFACTS');
231-
if ($gitlabArtifacts != '') {
232-
$fileHandler = fopen(sprintf("%s/%s", $gitlabArtifacts, str_replace('/', '_s_', $url)), 'w');
233-
fwrite($fileHandler, $response->getContent());
230+
if (getenv('CI')) { // We're running in GHA.
231+
$ciArtifacts = getenv('ARTIFACTS');
232+
if ($ciArtifacts != '') {
233+
$fileHandler = fopen(sprintf("%s/%s", $ciArtifacts, str_replace('/', '_s_', $url)), 'w');
234+
fwrite($fileHandler, $response->getContent());
235+
}
234236
}
235237
throw $e;
236238
}

0 commit comments

Comments
 (0)