renderScreenshotSummary function

void renderScreenshotSummary(
  1. LiveBlock block,
  2. Iterable<PlaybookScreenshotFile> saved
)

Adds a line for each folder of saved screenshots to block, e.g. ✓ 6 screenshots in screenshots/sign_up_to_dashboard/.

A failing step's screenshot is already printed under the step, so only the others are counted.

Implementation

void renderScreenshotSummary(
  LiveBlock block,
  Iterable<PlaybookScreenshotFile> saved,
) => renderScreenshotFolders(block, [
  for (final PlaybookScreenshotFile file in saved)
    if (!file.isFailure) file.file,
]);