1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 20:24:01 +00:00

[PM-5189] Working through jest tests for OverlayBackground and refining repositioning delays

This commit is contained in:
Cesar Gonzalez
2024-06-25 12:06:30 -05:00
parent b5a5481581
commit b9c18b5526
2 changed files with 3 additions and 3 deletions

View File

@@ -515,7 +515,7 @@ describe("OverlayBackground", () => {
async function flushUpdateInlineMenuPromises() {
await flushOverlayRepositionPromises();
await flushPromises();
jest.advanceTimersByTime(150);
jest.advanceTimersByTime(250);
await flushPromises();
}

View File

@@ -163,7 +163,7 @@ export class OverlayBackground implements OverlayBackgroundInterface {
private initOverlayEventObservables() {
this.repositionInlineMenuSubject
.pipe(
debounceTime(800),
debounceTime(950),
switchMap((sender) => this.repositionInlineMenu(sender)),
)
.subscribe();
@@ -176,7 +176,7 @@ export class OverlayBackground implements OverlayBackgroundInterface {
// Debounce used to update inline menu position
merge(
this.startUpdateInlineMenuPositionSubject.pipe(debounceTime(150)),
this.startUpdateInlineMenuPositionSubject.pipe(debounceTime(250)),
this.cancelUpdateInlineMenuPositionSubject,
)
.pipe(switchMap((sender) => this.updateInlineMenuPositionAfterRepositionEvent(sender)))