mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-20 12:36:53 +00:00
Chore: ditch the abandoned ngx-bootstrap-icons, roll our own (#14665)
This commit is contained in:
1 parent
786eac0b22
commit
7cdf8ec3c2
249 files changed
+1092
-1216
No files matched your search
@@ -4,7 +4,6 @@ import { provideHttpClientTesting } from '@angular/common/http/testing'
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing'
|
||||
|
||||
import { Clipboard } from '@angular/cdk/clipboard'
|
||||
import { allIcons, NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
|
||||
import { ToastLevel } from 'src/app/services/toast.service'
|
||||
import { ToastComponent } from './toast.component'
|
||||
|
||||
@@ -33,7 +32,7 @@ describe('ToastComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [ToastComponent, NgxBootstrapIconsModule.pick(allIcons)],
|
||||
imports: [ToastComponent],
|
||||
providers: [
|
||||
DatePipe,
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
@@ -140,7 +139,7 @@ describe('ToastComponent', () => {
|
||||
}
|
||||
fixture.detectChanges()
|
||||
const el: HTMLElement = fixture.nativeElement
|
||||
expect(el.querySelector('i-bs[name="check-circle"]')).not.toBeNull()
|
||||
expect(el.querySelector('pngx-bs-icon[name="check-circle"]')).not.toBeNull()
|
||||
expect(el.querySelector('ngb-toast').classList).not.toContain('toast-error')
|
||||
|
||||
fixture = TestBed.createComponent(ToastComponent)
|
||||
@@ -152,7 +151,7 @@ describe('ToastComponent', () => {
|
||||
fixture.detectChanges()
|
||||
const errorEl: HTMLElement = fixture.nativeElement
|
||||
expect(
|
||||
errorEl.querySelector('i-bs[name="exclamation-triangle"]')
|
||||
errorEl.querySelector('pngx-bs-icon[name="exclamation-triangle"]')
|
||||
).not.toBeNull()
|
||||
expect(errorEl.querySelector('ngb-toast').classList).toContain(
|
||||
'toast-error'
|
||||
@@ -162,7 +161,7 @@ describe('ToastComponent', () => {
|
||||
fixture.componentInstance.toast = { content: 'Started', delay: 5000 }
|
||||
fixture.detectChanges()
|
||||
expect(
|
||||
fixture.nativeElement.querySelector('i-bs[name="info-circle"]')
|
||||
fixture.nativeElement.querySelector('pngx-bs-icon[name="info-circle"]')
|
||||
).not.toBeNull()
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user