diff --git a/src/portal/src/app/base/left-side-nav/project-quotas/project-quotas/project-quotas.component.html b/src/portal/src/app/base/left-side-nav/project-quotas/project-quotas/project-quotas.component.html index c37510b7c06..01dcc852547 100644 --- a/src/portal/src/app/base/left-side-nav/project-quotas/project-quotas/project-quotas.component.html +++ b/src/portal/src/app/base/left-side-nav/project-quotas/project-quotas/project-quotas.component.html @@ -25,6 +25,7 @@ diff --git a/src/portal/src/app/base/left-side-nav/project-quotas/project-quotas/project-quotas.component.spec.ts b/src/portal/src/app/base/left-side-nav/project-quotas/project-quotas/project-quotas.component.spec.ts index dfc93b80b7c..a201921413e 100644 --- a/src/portal/src/app/base/left-side-nav/project-quotas/project-quotas/project-quotas.component.spec.ts +++ b/src/portal/src/app/base/left-side-nav/project-quotas/project-quotas/project-quotas.component.spec.ts @@ -111,6 +111,7 @@ describe('ProjectQuotasComponent', () => { await fixture.whenStable(); const openEditButton: HTMLButtonElement = fixture.nativeElement.querySelector('#open-edit'); + expect(openEditButton.disabled).toBeFalse(); openEditButton.dispatchEvent(new Event('click')); fixture.detectChanges(); await fixture.whenStable(); @@ -118,6 +119,14 @@ describe('ProjectQuotasComponent', () => { fixture.nativeElement.querySelector('clr-modal'); expect(modal).toBeTruthy(); }); + it('edit quota should be disabled when storage per project not editable', async () => { + component.config.storage_per_project.editable = false; + fixture.detectChanges(); + await fixture.whenStable(); + const openEditButton: HTMLButtonElement = + fixture.nativeElement.querySelector('#open-edit'); + expect(openEditButton.disabled).toBeTrue(); + }); it('should call navigate function', async () => { // wait getting list and rendering await timeout(10);