mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 10:43:35 +00:00
[PM-12704] - fix loading state for send list (#11264)
* fix loading state for send service * fix test * fix test and service
This commit is contained in:
@@ -62,9 +62,15 @@ describe("SendItemsService", () => {
|
||||
it("should update loading$ when sends are loading", (done) => {
|
||||
const sendsLoading$ = new Subject<void>();
|
||||
(service as any)._sendsLoading$ = sendsLoading$;
|
||||
let sendLoadingIndex = 0;
|
||||
service.loading$.subscribe((loading) => {
|
||||
expect(loading).toBe(true);
|
||||
done();
|
||||
if (sendLoadingIndex === 0) {
|
||||
expect(loading).toBe(true);
|
||||
sendLoadingIndex++;
|
||||
} else {
|
||||
expect(loading).toBe(false);
|
||||
done();
|
||||
}
|
||||
});
|
||||
|
||||
sendsLoading$.next();
|
||||
|
||||
Reference in New Issue
Block a user