Fix debug screenshot
All checks were successful
Push image to registry / build-image (push) Successful in 5m35s
All checks were successful
Push image to registry / build-image (push) Successful in 5m35s
This commit is contained in:
@ -9,19 +9,19 @@ use function rtrim;
|
|||||||
class JobDebugScreenshot {
|
class JobDebugScreenshot {
|
||||||
public const IMG_FILE_NAME = "debug-";
|
public const IMG_FILE_NAME = "debug-";
|
||||||
|
|
||||||
public static function getFileName(int $jobId): string {
|
public static function getFileName(int $jobId, bool $withExtension = false): string {
|
||||||
return static::IMG_FILE_NAME . $jobId . ".png";
|
return static::IMG_FILE_NAME . $jobId . ($withExtension ? ".png": "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getImgFileAbsolutePath(int $jobId): string {
|
public static function getImgFileAbsolutePath(int $jobId): string {
|
||||||
return rtrim(Browser::$storeScreenshotsAt, '/') . "/" . static::getFileName($jobId);
|
return rtrim(Browser::$storeScreenshotsAt, '/') . "/" . static::getFileName($jobId, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getImgFileProjectPath(int $jobId): string {
|
public static function getImgFileProjectPath(int $jobId): string {
|
||||||
return app_path("Browser/screenshots/" . static::getFileName($jobId));
|
return app_path("Browser/screenshots/" . static::getFileName($jobId, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getImgFileExternalPath(int $jobId): string {
|
public static function getImgFileExternalPath(int $jobId): string {
|
||||||
return "screenshots/" . static::getFileName($jobId);
|
return "screenshots/" . static::getFileName($jobId, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user