mirror of
https://github.com/bitwarden/browser
synced 2026-02-22 04:14:04 +00:00
Merge remote-tracking branch 'origin/main' into feature/passkey-provider
This commit is contained in:
@@ -125,6 +125,10 @@ describe("VaultPopupAutofillService", () => {
|
||||
});
|
||||
|
||||
it("should only fetch the current tab once when subscribed to multiple times", async () => {
|
||||
(BrowserApi.getTabFromCurrentWindow as jest.Mock).mockClear();
|
||||
|
||||
service.refreshCurrentTab();
|
||||
|
||||
const firstTracked = subscribeTo(service.currentAutofillTab$);
|
||||
const secondTracked = subscribeTo(service.currentAutofillTab$);
|
||||
|
||||
@@ -195,6 +199,7 @@ describe("VaultPopupAutofillService", () => {
|
||||
|
||||
// Refresh the current tab so the mockedPageDetails$ are used
|
||||
service.refreshCurrentTab();
|
||||
(service as any)._currentPageDetails$ = of(mockPageDetails);
|
||||
});
|
||||
|
||||
describe("doAutofill()", () => {
|
||||
|
||||
@@ -4,6 +4,7 @@ import { Injectable } from "@angular/core";
|
||||
import { ActivatedRoute } from "@angular/router";
|
||||
import {
|
||||
combineLatest,
|
||||
debounceTime,
|
||||
firstValueFrom,
|
||||
map,
|
||||
Observable,
|
||||
@@ -164,6 +165,7 @@ export class VaultPopupAutofillService {
|
||||
}),
|
||||
);
|
||||
}),
|
||||
debounceTime(50),
|
||||
shareReplay({ refCount: false, bufferSize: 1 }),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user