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:
parent
b5a5481581
commit
b9c18b5526
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user