From e513481bf04fc8c56f702cc977de9d31f361f397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Y=C4=B1lmaz?= Date: Tue, 28 Mar 2023 21:37:07 +0300 Subject: [PATCH] test subtitle directive --- .../lib/tests/card-subtitle.directive.spec.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 npm/ng-packs/packages/theme-shared/src/lib/tests/card-subtitle.directive.spec.ts diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tests/card-subtitle.directive.spec.ts b/npm/ng-packs/packages/theme-shared/src/lib/tests/card-subtitle.directive.spec.ts new file mode 100644 index 0000000000..4995067635 --- /dev/null +++ b/npm/ng-packs/packages/theme-shared/src/lib/tests/card-subtitle.directive.spec.ts @@ -0,0 +1,22 @@ +import { createHostFactory, SpectatorHost } from '@ngneat/spectator'; +import { CardSubtitle } from '../components'; + +describe('AbpCardSubtitleDirective', () => { + let spectator: SpectatorHost; + + const createHost = createHostFactory(CardSubtitle); + + beforeEach(() => (spectator = createHost(`

CardSubtitle

`))); + + it('should create an instance', () => { + expect(spectator).toBeTruthy(); + }); + + it('should have class card-subtitle', () => { + expect(spectator.element.classList).toContain('card-subtitle'); + }); + + it('should have CardSubtitle text', () => { + expect(spectator.element.textContent).toContain('CardSubtitle'); + }); +});