|
1 | | -import { BidiModule, Dir, Direction, Directionality } from '@angular/cdk/bidi'; |
| 1 | +import { Directionality } from '@angular/cdk/bidi'; |
2 | 2 | import { ENTER, LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes'; |
3 | 3 | import { Component, DebugElement, ViewChild } from '@angular/core'; |
4 | 4 | import { ComponentFixture, discardPeriodicTasks, fakeAsync, TestBed, tick } from '@angular/core/testing'; |
@@ -476,20 +476,6 @@ export class NzTestCarouselBasicComponent { |
476 | 476 | beforeChange = jasmine.createSpy('beforeChange callback'); |
477 | 477 | } |
478 | 478 |
|
479 | | -@Component({ |
480 | | - standalone: true, |
481 | | - imports: [BidiModule, NzTestCarouselBasicComponent], |
482 | | - template: ` |
483 | | - <div [dir]="direction"> |
484 | | - <nz-test-carousel></nz-test-carousel> |
485 | | - </div> |
486 | | - ` |
487 | | -}) |
488 | | -export class NzTestCarouselRtlComponent { |
489 | | - @ViewChild(Dir) dir!: Dir; |
490 | | - direction: Direction = 'rtl'; |
491 | | -} |
492 | | - |
493 | 479 | @Component({ |
494 | 480 | standalone: true, |
495 | 481 | imports: [NzCarouselModule], |
@@ -531,7 +517,6 @@ describe('carousel', () => { |
531 | 517 | }); |
532 | 518 |
|
533 | 519 | TestBed.configureTestingModule({ |
534 | | - imports: [NzCarouselModule], |
535 | 520 | providers: [ |
536 | 521 | { |
537 | 522 | provide: Directionality, |
@@ -592,34 +577,4 @@ describe('carousel', () => { |
592 | 577 | tick(101); |
593 | 578 | expect(component.layout).toHaveBeenCalled(); |
594 | 579 | })); |
595 | | - |
596 | | - it('should set correct index as active in ltr mode', () => { |
597 | | - component.dir = 'ltr'; |
598 | | - component.carouselContents = [ |
599 | | - { |
600 | | - isActive: false |
601 | | - }, |
602 | | - { |
603 | | - isActive: false |
604 | | - } |
605 | | - ] as NzSafeAny; |
606 | | - component['markContentActive'](0); |
607 | | - |
608 | | - expect((component.carouselContents as NzSafeAny)[0].isActive).toBeTruthy(); |
609 | | - }); |
610 | | - |
611 | | - it('should set correct index as active in rtl mode', () => { |
612 | | - component.dir = 'rtl'; |
613 | | - component.carouselContents = [ |
614 | | - { |
615 | | - isActive: false |
616 | | - }, |
617 | | - { |
618 | | - isActive: false |
619 | | - } |
620 | | - ] as NzSafeAny; |
621 | | - component['markContentActive'](0); |
622 | | - |
623 | | - expect((component.carouselContents as NzSafeAny)[1].isActive).toBeTruthy(); |
624 | | - }); |
625 | 580 | }); |
0 commit comments