// import { DatePipe } from '@angular/common';
// import { createComponentFactory, Spectator } from '@ngneat/spectator';
// import { MockPipe } from 'ng-mocks';
// import { PackageListItemComponent } from './package-list-item.component';
// import { ArrivalStatusColorClassPipe, ArrivalStatusPipe } from '@shared/pipes/package-inspection';

// describe('PackageListItemComponent', () => {
//   let spectator: Spectator<PackageListItemComponent>;
//   const createComponent = createComponentFactory({
//     component: PackageListItemComponent,
//     declarations: [
//       MockPipe(ArrivalStatusColorClassPipe, (value) => `mock:ArrivalStatusColorClassPipe:${value}`),
//       MockPipe(ArrivalStatusPipe, (value) => `mock:ArrivalStatusPipe:${value}`),
//     ],
//   });

//   beforeEach(() => {
//     spectator = createComponent();
//   });

//   it('should create', () => {
//     expect(spectator.component).toBeTruthy();
//   });

//   describe('.page-package-list-item__package-number', () => {
//     it('should display the package number', () => {
//       const packageNumber = '123';
//       spectator.component.package = { packageNumber } as any;
//       spectator.detectComponentChanges();
//       expect(spectator.query('.page-package-list-item__package-number')).toHaveText(packageNumber);
//     });
//   });

//   describe('.page-package-list-item__delivery-note-number', () => {
//     it('should display the delivery note number', () => {
//       const deliveryNoteNumber = '123';
//       spectator.component.package = { deliveryNoteNumber } as any;
//       spectator.detectComponentChanges();
//       expect(spectator.query('.page-package-list-item__delivery-note-number')).toHaveText(deliveryNoteNumber);
//     });
//   });

//   describe('.page-package-list-item__number-divider', () => {
//     it('should display the divider between the package number and the delivery note number', () => {
//       const packageNumber = '123';
//       const deliveryNoteNumber = '456';
//       spectator.component.package = { packageNumber, deliveryNoteNumber } as any;
//       spectator.detectComponentChanges();
//       expect(spectator.query('.page-package-list-item__number-divider')).toHaveText('|');
//     });

//     it('should not display the divider when the package number is not set', () => {
//       const deliveryNoteNumber = '456';
//       spectator.component.package = { deliveryNoteNumber } as any;
//       spectator.detectComponentChanges();
//       expect(spectator.query('.page-package-list-item__number-divider')).toBeNull();
//     });

//     it('should not display the divider when the delivery note number is not set', () => {
//       const packageNumber = '123';
//       spectator.component.package = { packageNumber } as any;
//       spectator.detectComponentChanges();
//       expect(spectator.query('.page-package-list-item__number-divider')).toBeNull();
//     });
//   });

//   describe('.page-package-list-item__estimated-delivery-date', () => {
//     it('should display the estimated delivery date', () => {
//       const estimatedDeliveryDate = '2021-01-01';
//       spectator.component.package = { estimatedDeliveryDate } as any;
//       spectator.detectComponentChanges();
//       expect(spectator.query('.page-package-list-item__estimated-delivery-date')).toHaveText('Jan 1, 2021');
//     });
//   });

//   describe('.page-package-list-item__items-count', () => {
//     it('should display the items count', () => {
//       const items = 123;
//       spectator.component.package = { items } as any;
//       spectator.detectComponentChanges();
//       expect(spectator.query('.page-package-list-item__items-count')).toHaveText('123');
//     });
//   });

//   describe('.page-package-list-item__arrival-status', () => {
//     it('should display the arrival status', () => {
//       const arrivalStatus = '123';
//       spectator.component.package = { arrivalStatus } as any;
//       spectator.detectComponentChanges();
//       expect(spectator.query('.page-package-list-item__arrival-status')).toHaveText('mock:ArrivalStatusPipe:123');
//     });

//     it('should have the class from the arrival status color class pipe', () => {
//       const arrivalStatus = '123';
//       spectator.component.package = { arrivalStatus } as any;
//       spectator.detectComponentChanges();
//       expect(spectator.query('.page-package-list-item__arrival-status')).toHaveClass('mock:ArrivalStatusColorClassPipe:123');
//     });
//   });
// });
