mirror of
https://github.com/bitwarden/browser
synced 2026-02-13 23:13:36 +00:00
Merge branch 'main' into pm-28613-bug-vertical-squish
This commit is contained in:
@@ -20,7 +20,13 @@
|
||||
{{ "emptyVaultDescription" | i18n }}
|
||||
</p>
|
||||
</ng-container>
|
||||
<a slot="button" bitButton buttonType="secondary" [routerLink]="['/add-cipher']">
|
||||
<a
|
||||
slot="button"
|
||||
bitButton
|
||||
buttonType="secondary"
|
||||
[routerLink]="['/add-cipher']"
|
||||
[queryParams]="{ prefillNameAndURIFromTab: true }"
|
||||
>
|
||||
{{ "newLogin" | i18n }}
|
||||
</a>
|
||||
</bit-no-items>
|
||||
|
||||
@@ -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