mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
Show disabled Sends within Send list view (#11555)
With #10192 we introduced the new send-list-filters, and filtered out any disabled sends. These still need to be shown as the the other clients still support enabling/disabling Sends This will be removed once all clients use the same shared components. Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
parent
7afc99da1e
commit
40ab96a7ce
@ -1,6 +1,6 @@
|
||||
import { TestBed } from "@angular/core/testing";
|
||||
import { FormBuilder } from "@angular/forms";
|
||||
import { BehaviorSubject, first } from "rxjs";
|
||||
import { BehaviorSubject } from "rxjs";
|
||||
|
||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
@ -46,16 +46,6 @@ describe("SendListFiltersService", () => {
|
||||
expect(service.sendTypes.map((c) => c.value)).toEqual([SendType.File, SendType.Text]);
|
||||
});
|
||||
|
||||
it("filters disabled sends", (done) => {
|
||||
const sends = [{ disabled: true }, { disabled: false }, { disabled: true }] as SendView[];
|
||||
service.filterFunction$.pipe(first()).subscribe((filterFunction) => {
|
||||
expect(filterFunction(sends)).toEqual([sends[1]]);
|
||||
done();
|
||||
});
|
||||
|
||||
service.filterForm.patchValue({});
|
||||
});
|
||||
|
||||
it("resets the filter form", () => {
|
||||
service.filterForm.patchValue({ sendType: SendType.Text });
|
||||
service.resetFilterForm();
|
||||
|
@ -44,11 +44,6 @@ export class SendListFiltersService {
|
||||
map(
|
||||
(filters) => (sends: SendView[]) =>
|
||||
sends.filter((send) => {
|
||||
// do not show disabled sends
|
||||
if (send.disabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (filters.sendType !== null && send.type !== filters.sendType) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user