Enhancement: relocate and smaller upload widget, dont limit upload list (#9244)

This commit is contained in:
shamoon
2025-02-27 13:13:36 -08:00
committed by GitHub
parent 0eb765c3e8
commit 865e9fe233
8 changed files with 73 additions and 115 deletions

View File

@@ -8,7 +8,6 @@ import {
} from '@angular/core/testing'
import { By } from '@angular/platform-browser'
import { RouterTestingModule } from '@angular/router/testing'
import { NgbAlert, NgbCollapse } from '@ng-bootstrap/ng-bootstrap'
import { NgxBootstrapIconsModule, allIcons } from 'ngx-bootstrap-icons'
import { routes } from 'src/app/app-routing.module'
import { PermissionsGuard } from 'src/app/guards/permissions.guard'
@@ -116,20 +115,6 @@ describe('UploadFileWidgetComponent', () => {
expect(component.getStatusColor(successStatus)).toEqual('success')
})
it('should enforce a maximum number of alerts', () => {
mockConsumerStatuses(websocketStatusService)
fixture.detectChanges()
// 5 total, 1 hidden
expect(fixture.debugElement.queryAll(By.directive(NgbAlert))).toHaveLength(
6
)
expect(
fixture.debugElement
.query(By.directive(NgbCollapse))
.queryAll(By.directive(NgbAlert))
).toHaveLength(1)
})
it('should allow dismissing an alert', () => {
const dismissSpy = jest.spyOn(websocketStatusService, 'dismiss')
component.dismiss(new FileStatus())
@@ -138,7 +123,6 @@ describe('UploadFileWidgetComponent', () => {
it('should allow dismissing completed alerts', fakeAsync(() => {
mockConsumerStatuses(websocketStatusService)
component.alertsExpanded = true
fixture.detectChanges()
jest
.spyOn(component, 'getStatusCompleted')