From 1d4a20f809c4bf79f04da0e6457b602c5329a678 Mon Sep 17 00:00:00 2001 From: Manuel Abascal Date: Wed, 29 Jan 2020 01:25:55 -0500 Subject: [PATCH 1/2] =?UTF-8?q?issue-6168:=20added=20leading=20zero=20to?= =?UTF-8?q?=20test=20runner=20counter=20in=20stats.=E2=80=A6=20(#6236)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * issue-6168: added leading zero to test runner counter in stats.tsx file * issue-6168: refactored code to fix failing unit test --- packages/reporter/src/header/stats.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/reporter/src/header/stats.tsx b/packages/reporter/src/header/stats.tsx index 094204246b1a..3e4a8c58ac96 100644 --- a/packages/reporter/src/header/stats.tsx +++ b/packages/reporter/src/header/stats.tsx @@ -4,7 +4,7 @@ import React from 'react' import { StatsStore } from './stats-store' const count = (num: number) => num > 0 ? num : '--' -const formatDuration = (duration: number) => duration > 0 ? (duration / 1000).toFixed(2) : '0' +const formatDuration = (duration: number) => duration ? String((duration / 1000).toFixed(2)).padStart(5, '0') : '--' interface Props { stats: StatsStore @@ -28,7 +28,7 @@ const Stats = observer(({ stats }: Props) => ( {count(stats.numPending)}
  • - {count(parseFloat(formatDuration(stats.duration)))} + {formatDuration(stats.duration)}
  • )) From 1edac1bfbe9e6acacc7af3f44470195046f18324 Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Fri, 31 Jan 2020 22:24:33 +0630 Subject: [PATCH 2/2] Add more debug logs around whether they have video recording disabled (#6284) * Add more debug logs around whether they have video recording disabled * clean up debug log :P --- packages/server/lib/modes/run.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/server/lib/modes/run.js b/packages/server/lib/modes/run.js index 94cfb770acd1..687d2db73646 100644 --- a/packages/server/lib/modes/run.js +++ b/packages/server/lib/modes/run.js @@ -660,6 +660,7 @@ const getVideoRecordingDelay = function (startedVideoCapture) { const maybeStartVideoRecording = Promise.method(function (options = {}) { const { spec, browser, video, videosFolder } = options + debug(`video recording has been ${video ? 'enabled' : 'disabled'}. video: %s`, video) // bail if we've been told not to capture // a video recording if (!video) {