mirror of
https://github.com/bitwarden/browser
synced 2026-01-21 20:03:43 +00:00
[PM-30742] - do not show archive button in AC (#18345)
* do not show archive button in AC * do not show archive button in AC
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
|
||||
@if (showActionButtons) {
|
||||
<div class="tw-ml-auto">
|
||||
@if (userCanArchive$ | async) {
|
||||
@if ((userCanArchive$ | async) && !params.isAdminConsoleAction) {
|
||||
@if (isCipherArchived) {
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -249,6 +249,15 @@ describe("VaultItemDialogComponent", () => {
|
||||
});
|
||||
|
||||
describe("archive button", () => {
|
||||
it("should not show archive button in admin console", () => {
|
||||
(component as any).userCanArchive$ = of(true);
|
||||
component.setTestCipher({ canBeArchived: true });
|
||||
component.setTestParams({ mode: "form", isAdminConsoleAction: true });
|
||||
fixture.detectChanges();
|
||||
const archiveButton = fixture.debugElement.query(By.css("[biticonbutton='bwi-archive']"));
|
||||
expect(archiveButton).toBeFalsy();
|
||||
});
|
||||
|
||||
it("should show archive button when the user can archive the item and the item can be archived", () => {
|
||||
component.setTestCipher({ canBeArchived: true });
|
||||
(component as any).userCanArchive$ = of(true);
|
||||
|
||||
Reference in New Issue
Block a user