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:
@@ -515,7 +515,7 @@ describe("OverlayBackground", () => {
|
||||
async function flushUpdateInlineMenuPromises() {
|
||||
await flushOverlayRepositionPromises();
|
||||
await flushPromises();
|
||||
jest.advanceTimersByTime(150);
|
||||
jest.advanceTimersByTime(250);
|
||||
await flushPromises();
|
||||
}
|
||||
|
||||
|
||||
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user