From eb868eebd72ff8f551687f5a7074143516f53c65 Mon Sep 17 00:00:00 2001 From: Matt Bishop Date: Wed, 14 Aug 2024 11:21:22 -0400 Subject: [PATCH 1/3] Upload test results to Codecov (#10510) --- .github/workflows/test.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 909bb93f683..a4aa94a2ed0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,12 +84,18 @@ jobs: reporter: jest-junit fail-on-error: true - - name: Upload to codecov.io + - name: Upload coverage to codecov.io uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0 if: ${{ needs.check-test-secrets.outputs.available == 'true' }} env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - name: Upload results to codecov.io + uses: codecov/test-results-action@1b5b448b98e58ba90d1a1a1d9fcb72ca2263be46 # v1.0.0 + if: ${{ needs.check-test-secrets.outputs.available == 'true' }} + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + rust: name: Run Rust tests on ${{ matrix.os }} runs-on: ${{ matrix.os || 'ubuntu-latest' }} From 5fad0725548916b08c9cdaf10196ebea301e5889 Mon Sep 17 00:00:00 2001 From: Cesar Gonzalez Date: Wed, 14 Aug 2024 10:39:23 -0500 Subject: [PATCH 2/3] [PM-10155] Fixing broken jest tests for auto-submit content script (#10512) --- .../content/auto-submit-login.spec.ts | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/apps/browser/src/autofill/content/auto-submit-login.spec.ts b/apps/browser/src/autofill/content/auto-submit-login.spec.ts index c5bc9dbccbd..d8a192dbcab 100644 --- a/apps/browser/src/autofill/content/auto-submit-login.spec.ts +++ b/apps/browser/src/autofill/content/auto-submit-login.spec.ts @@ -61,10 +61,13 @@ describe("AutoSubmitLogin content script", () => { await initAutoSubmitWorkflow(); - expect(chrome.runtime.sendMessage).toHaveBeenCalledWith({ - command: "updateIsFieldCurrentlyFilling", - isFieldCurrentlyFilling: false, - }); + expect(chrome.runtime.sendMessage).toHaveBeenCalledWith( + { + command: "updateIsFieldCurrentlyFilling", + isFieldCurrentlyFilling: false, + }, + expect.any(Function), + ); }); describe("when the page contains form fields", () => { @@ -78,10 +81,13 @@ describe("AutoSubmitLogin content script", () => { }); await flushPromises(); - expect(chrome.runtime.sendMessage).toHaveBeenCalledWith({ - command: "updateIsFieldCurrentlyFilling", - isFieldCurrentlyFilling: false, - }); + expect(chrome.runtime.sendMessage).toHaveBeenCalledWith( + { + command: "updateIsFieldCurrentlyFilling", + isFieldCurrentlyFilling: false, + }, + expect.any(Function), + ); }); describe("triggering auto-submit on formless fields", () => { From 910ae7d799213688aa09675e83bb0cff861971d4 Mon Sep 17 00:00:00 2001 From: Cesar Gonzalez Date: Wed, 14 Aug 2024 11:03:38 -0500 Subject: [PATCH 3/3] [PM-10796] Fix inline menu cipher list scroll behavior (#10500) * [PM-10796] Fix inline menu setting of scroll class when showing new item button with a list of ciphers * [PM-10796] Fix inline menu setting of scroll class when showing new item button with a list of ciphers --- .../pages/list/autofill-inline-menu-list.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts b/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts index 6ec0bc83991..b5dc76f2226 100644 --- a/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-inline-menu-list.ts @@ -177,6 +177,7 @@ export class AutofillInlineMenuList extends AutofillInlineMenuPageElement { this.loadPageOfCiphers(); this.inlineMenuListContainer.appendChild(this.ciphersList); + this.toggleScrollClass(); if (!this.showInlineMenuAccountCreation) { return; @@ -973,13 +974,19 @@ export class AutofillInlineMenuList extends AutofillInlineMenuPageElement { * * @param height - The height of the inline menu list actions container. */ - private toggleScrollClass = (height: number) => { + private toggleScrollClass = (height?: number) => { if (!this.ciphersList) { return; } const scrollbarClass = "inline-menu-list-actions--scrollbar"; - if (height >= 170) { + let containerHeight = height; + if (!containerHeight) { + const inlineMenuListContainerRects = this.inlineMenuListContainer.getBoundingClientRect(); + containerHeight = inlineMenuListContainerRects.height; + } + + if (containerHeight >= 170) { this.ciphersList.classList.add(scrollbarClass); return; }