1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-13 15:03:26 +00:00

Merge branch 'main' into ps/extension-refresh

This commit is contained in:
Victoria League
2024-08-14 13:21:55 -04:00
committed by GitHub
3 changed files with 30 additions and 11 deletions

View File

@@ -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' }}

View File

@@ -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", () => {

View File

@@ -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;
}