1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-24 21:41:33 +01: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
No known key found for this signature in database
GPG Key ID: 3381A5457F8CCECF
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)))