mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-16 01:31:09 -06:00
Fix: replace drag drop & clipboard dependencies with Angular CDK (#4362)
* Swap ngx-drag-drop dependency for Angular CDK * Swap ngx-clipboard dependency for Angular CDK
This commit is contained in:
@@ -18,7 +18,7 @@ import { ShareLinkService } from 'src/app/services/rest/share-link.service'
|
||||
import { ToastService } from 'src/app/services/toast.service'
|
||||
import { environment } from 'src/environments/environment'
|
||||
import { ShareLinksDropdownComponent } from './share-links-dropdown.component'
|
||||
import { ClipboardService } from 'ngx-clipboard'
|
||||
import { Clipboard } from '@angular/cdk/clipboard'
|
||||
|
||||
describe('ShareLinksDropdownComponent', () => {
|
||||
let component: ShareLinksDropdownComponent
|
||||
@@ -26,7 +26,7 @@ describe('ShareLinksDropdownComponent', () => {
|
||||
let shareLinkService: ShareLinkService
|
||||
let toastService: ToastService
|
||||
let httpController: HttpTestingController
|
||||
let clipboardService: ClipboardService
|
||||
let clipboard: Clipboard
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -38,7 +38,7 @@ describe('ShareLinksDropdownComponent', () => {
|
||||
shareLinkService = TestBed.inject(ShareLinkService)
|
||||
toastService = TestBed.inject(ToastService)
|
||||
httpController = TestBed.inject(HttpTestingController)
|
||||
clipboardService = TestBed.inject(ClipboardService)
|
||||
clipboard = TestBed.inject(Clipboard)
|
||||
|
||||
component = fixture.componentInstance
|
||||
fixture.detectChanges()
|
||||
@@ -102,7 +102,7 @@ describe('ShareLinksDropdownComponent', () => {
|
||||
const expiration = new Date()
|
||||
expiration.setDate(expiration.getDate() + 7)
|
||||
|
||||
const copySpy = jest.spyOn(clipboardService, 'copy')
|
||||
const copySpy = jest.spyOn(clipboard, 'copy')
|
||||
const refreshSpy = jest.spyOn(component, 'refresh')
|
||||
|
||||
component.createLink()
|
||||
|
||||
Reference in New Issue
Block a user