From 71388c8ee7e68377294e1c2f36857424e5b1fe8b Mon Sep 17 00:00:00 2001 From: David Cheeseman <5287736+nuvious@users.noreply.github.com> Date: Fri, 26 Apr 2024 12:34:25 -0400 Subject: [PATCH 1/3] Added >=0 check on delta Added check on delta to see if it is positive. If it is, return 0 for value and 'seconds' for the unit per documentation below and convention demonstrated at line 48/52 (current/proposed time.ts implementation). https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format --- packages/coreutils/src/time.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/coreutils/src/time.ts b/packages/coreutils/src/time.ts index e6102982c6e6..66fae8d680d1 100644 --- a/packages/coreutils/src/time.ts +++ b/packages/coreutils/src/time.ts @@ -38,6 +38,10 @@ export namespace Time { style: format }); const delta = new Date(value).getTime() - Date.now(); + // Delta may be positive due to async execution; default to 0 seconds if it is + if (delta >= 0) { + return formatter.format(0, "seconds"); + } for (let unit of UNITS) { const amount = Math.ceil(delta / unit.milliseconds); if (amount === 0) { From f34c50634045dcaf402b471cd16964ca5200cc47 Mon Sep 17 00:00:00 2001 From: David Cheeseman <5287736+nuvious@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:35:33 -0400 Subject: [PATCH 2/3] Update galata.yml --- .github/workflows/galata.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/galata.yml b/.github/workflows/galata.yml index fcf28f674dc3..5af8e7f2dd18 100644 --- a/.github/workflows/galata.yml +++ b/.github/workflows/galata.yml @@ -7,6 +7,18 @@ on: branches: - main pull_request: + # TODO/MERGE BLOCKER: Remove after validating tests in personal fork before requesting review on PR + workflow_dispatch: + inputs: + logLevel: + description: 'Log level' + required: true + default: 'warning' + type: choice + options: + - info + - warning + - debug env: PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers From cc8653959e4061785d6ce58ba68596a42354fa80 Mon Sep 17 00:00:00 2001 From: David Cheeseman <5287736+nuvious@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:37:07 -0400 Subject: [PATCH 3/3] Update galata.yml Didn't need to do this, can just merge to main in my own branch to kick of testing CICD --- .github/workflows/galata.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/galata.yml b/.github/workflows/galata.yml index 5af8e7f2dd18..fcf28f674dc3 100644 --- a/.github/workflows/galata.yml +++ b/.github/workflows/galata.yml @@ -7,18 +7,6 @@ on: branches: - main pull_request: - # TODO/MERGE BLOCKER: Remove after validating tests in personal fork before requesting review on PR - workflow_dispatch: - inputs: - logLevel: - description: 'Log level' - required: true - default: 'warning' - type: choice - options: - - info - - warning - - debug env: PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers