Skip to content

Commit

Permalink
test(design): add package names to top level spec describes (#2756)
Browse files Browse the repository at this point in the history
  • Loading branch information
xelaint committed Feb 23, 2024
1 parent 8531484 commit ee631b0
Show file tree
Hide file tree
Showing 101 changed files with 131 additions and 200 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { DaffAccordionItemContentDirective } from './accordion-item-content.dire
})
class WrapperComponent {}

describe('DaffAccordionItemContentDirective', () => {
describe('@daffodil/design/accordion | DaffAccordionItemContentDirective', () => {
let accordionItemContent: DaffAccordionItemContentDirective;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { DaffAccordionItemTitleDirective } from './accordion-item-title.directiv
})
class WrapperComponent {}

describe('DaffAccordionItemTitleDirective', () => {
describe('@daffodil/design/accordion | DaffAccordionItemTitleDirective', () => {
let accordionItemTitle: DaffAccordionItemTitleDirective;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class WrapperComponent {
initiallyActiveValue: boolean;
}

describe('DaffAccordionItemComponent', () => {
describe('@daffodil/design/accordion | DaffAccordionItemComponent', () => {
let fixture: ComponentFixture<WrapperComponent>;
let wrapper: WrapperComponent;
let accordionHeader: DebugElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {

import { DaffAccordionComponent } from './accordion.component';

describe('DaffAccordionComponent', () => {
describe('@daffodil/design/accordion | DaffAccordionComponent', () => {
let component: DaffAccordionComponent;
let fixture: ComponentFixture<DaffAccordionComponent>;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getAnimationState } from './accordion-animation-state';

describe('accordionAnimationState Calculation', () => {
describe('@daffodil/design/accordion | accordionAnimationState Calculation', () => {

it('should return `open` if it is open', () => {
expect(getAnimationState(true)).toEqual('open');
Expand Down
2 changes: 1 addition & 1 deletion libs/design/article/src/article/article.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { DaffArticleComponent } from './article.component';

class WrapperComponent {}

describe('DaffArticleComponent', () => {
describe('@daffodil/design/article | DaffArticleComponent', () => {
let fixture: ComponentFixture<WrapperComponent>;
let de: DebugElement;
let wrapper: WrapperComponent;
Expand Down
2 changes: 1 addition & 1 deletion libs/design/button/src/button/button.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class WrapperComponent {
tabindex = 0;
}

describe('DaffButtonComponent', () => {
describe('@daffodil/design/button | DaffButtonComponent', () => {
let fixture: ComponentFixture<WrapperComponent>;
let wrapper: WrapperComponent;
let de: DebugElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { DaffCalloutBodyDirective } from './callout-body.directive';
})
class WrapperComponent {}

describe('DaffCalloutBodyDirective', () => {
describe('@daffodil/design/callout | DaffCalloutBodyDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { DaffCalloutIconDirective } from './callout-icon.directive';
})
class WrapperComponent {}

describe('DaffCalloutIconDirective', () => {
describe('@daffodil/design/callout | DaffCalloutIconDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { DaffCalloutSubtitleDirective } from './callout-subtitle.directive';
})
class WrapperComponent {}

describe('DaffCalloutSubtitleDirective', () => {
describe('@daffodil/design/callout | DaffCalloutSubtitleDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { DaffCalloutTaglineDirective } from './callout-tagline.directive';
})
class WrapperComponent {}

describe('DaffCalloutTaglineDirective', () => {
describe('@daffodil/design/callout | DaffCalloutTaglineDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { DaffCalloutTitleDirective } from './callout-title.directive';
})
class WrapperComponent {}

describe('DaffCalloutTitleDirective', () => {
describe('@daffodil/design/callout | DaffCalloutTitleDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
2 changes: 1 addition & 1 deletion libs/design/callout/src/callout/callout.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class WrapperComponent {
compact = false;
}

describe('DaffCalloutComponent', () => {
describe('@daffodil/design/callout | DaffCalloutComponent', () => {
let wrapper: WrapperComponent;
let component: DaffCalloutComponent;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { DaffCardActionsDirective } from './card-actions.directive';

class WrapperComponent {}

describe('DaffCardActionsDirective', () => {
describe('@daffodil/design/card | DaffCardActionsDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { DaffCardContentDirective } from './card-content.directive';

class WrapperComponent {}

describe('DaffCardContentDirective', () => {
describe('@daffodil/design/card | DaffCardContentDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
2 changes: 1 addition & 1 deletion libs/design/card/src/card-icon/card-icon.directive.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { DaffCardIconDirective } from './card-icon.directive';

class WrapperComponent {}

describe('DaffCardIconDirective', () => {
describe('@daffodil/design/card | DaffCardIconDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { DaffCardImageDirective } from './card-image.directive';

class WrapperComponent {}

describe('DaffCardImageDirective', () => {
describe('@daffodil/design/card | DaffCardImageDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { DaffCardTaglineDirective } from './card-tagline.directive';

class WrapperComponent {}

describe('DaffCardTaglineDirective', () => {
describe('@daffodil/design/card | DaffCardTaglineDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { DaffCardTitleDirective } from './card-title.directive';

class WrapperComponent {}

describe('DaffCardTitleDirective', () => {
describe('@daffodil/design/card | DaffCardTitleDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
71 changes: 19 additions & 52 deletions libs/design/card/src/card/card.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class WrapperComponent {
orientation: DaffCardOrientation;
}

describe('DaffCardComponent | Usage', () => {
describe('@daffodil/design/card | DaffCardComponent', () => {
let fixture: ComponentFixture<WrapperComponent>;
let de: DebugElement;
let wrapper: WrapperComponent;
Expand Down Expand Up @@ -53,7 +53,19 @@ describe('DaffCardComponent | Usage', () => {
expect(wrapper).toBeTruthy();
});

describe('setting the color', () => {
describe('<daff-card>', () => {
it('should add a class of "daff-card" to the host element', () => {
expect(de.classes).toEqual(jasmine.objectContaining({
'daff-card': true,
}));
});
});

describe('using the color property of a card', () => {
it('should not set a default color', () => {
expect(component.color).toBeFalsy();
});

it('should add the class of the defined color to the host element', () => {
wrapper.color = 'primary';
fixture.detectChanges();
Expand All @@ -69,7 +81,11 @@ describe('DaffCardComponent | Usage', () => {
expect(component.orientation).toEqual('vertical');
});

describe('setting the orientation', () => {
describe('using the orientation property of a card', () => {
it('should set the default orientation to vertical', () => {
expect(component.orientation).toEqual('vertical');
});

it('should add the class of the defined orientation to the host element', () => {
wrapper.orientation = 'vertical';
fixture.detectChanges();
Expand All @@ -96,52 +112,3 @@ describe('DaffCardComponent | Usage', () => {
});
});
});

describe('DaffCardComponent | Defaults', () => {
let fixture: ComponentFixture<WrapperComponent>;
let de: DebugElement;
let wrapper: WrapperComponent;
let component: DaffCardComponent;

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [
DaffCardComponent,
WrapperComponent,
],
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(WrapperComponent);
wrapper = fixture.componentInstance;
de = fixture.debugElement.query(By.css('daff-card'));
component = de.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(wrapper).toBeTruthy();
});

describe('<daff-card>', () => {
it('should add a class of "daff-card" to the host element', () => {
expect(de.classes).toEqual(jasmine.objectContaining({
'daff-card': true,
}));
});
});

describe('using the orientation property of a card', () => {
it('should set the default orientation to vertical', () => {
expect(component.orientation).toEqual('vertical');
});
});

describe('using the color property of a card', () => {
it('should not set a default color', () => {
expect(component.color).toBeFalsy();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class WrapperComponent {
size: DaffSizeAllType;
}

describe('DaffContainerComponent', () => {
describe('@daffodil/design/container | DaffContainerComponent', () => {
let wrapper: WrapperComponent;
let component: DaffContainerComponent;
let de: DebugElement;
Expand Down
2 changes: 1 addition & 1 deletion libs/design/hero/src/hero-body/hero-body.directive.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { DaffHeroBodyDirective } from './hero-body.directive';
})
class WrapperComponent {}

describe('DaffHeroBodyDirective', () => {
describe('@daffodil/design/hero | DaffHeroBodyDirective', () => {
let wrapper: WrapperComponent;
let heroBody: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
2 changes: 1 addition & 1 deletion libs/design/hero/src/hero-icon/hero-icon.directive.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { DaffHeroIconDirective } from './hero-icon.directive';
})
class WrapperComponent {}

describe('DaffHeroIconDirective', () => {
describe('@daffodil/design/hero | DaffHeroIconDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { DaffHeroSubtitleDirective } from './hero-subtitle.directive';
})
class WrapperComponent {}

describe('DaffHeroSubtitleDirective', () => {
describe('@daffodil/design/hero | DaffHeroSubtitleDirective', () => {
let wrapper: WrapperComponent;
let heroSubtitle: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { DaffHeroTaglineDirective } from './hero-tagline.directive';
})
class WrapperComponent {}

describe('DaffHeroTaglineDirective', () => {
describe('@daffodil/design/hero | DaffHeroTaglineDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { DaffHeroTitleDirective } from './hero-title.directive';
})
class WrapperComponent {}

describe('DaffHeroTitleDirective', () => {
describe('@daffodil/design/hero | DaffHeroTitleDirective', () => {
let wrapper: WrapperComponent;
let heroTitle: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
2 changes: 1 addition & 1 deletion libs/design/hero/src/hero/hero.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class WrapperComponent {
compact = false;
}

describe('DaffHeroComponent', () => {
describe('@daffodil/design/hero | DaffHeroComponent', () => {
let wrapper: WrapperComponent;
let component: DaffHeroComponent;
let de: DebugElement;
Expand Down
2 changes: 1 addition & 1 deletion libs/design/image/src/image/image.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class WrapperComponent {
skeleton = false;
}

describe('DaffImageComponent', () => {
describe('@daffodil/design/image | DaffImageComponent', () => {
let wrapper: WrapperComponent;
let component: DaffImageComponent;
let de: DebugElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { DaffLinkSetHeadingDirective } from './link-set-heading.directive';

class WrapperComponent {}

describe('DaffLinkSetHeadingDirective', () => {
describe('@daffodil/design/link-set | DaffLinkSetHeadingDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { DaffLinkSetItemComponent } from './link-set-item.component';

class WrapperComponent {}

describe('DaffLinkSetItemComponent', () => {
describe('@daffodil/design/link-set | DaffLinkSetItemComponent', () => {
let fixture: ComponentFixture<WrapperComponent>;
let de: DebugElement;
let wrapper: WrapperComponent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { DaffLinkSetSubheadingDirective } from './link-set-subheading.directive'

class WrapperComponent {}

describe('DaffLinkSetSubheadingDirective', () => {
describe('@daffodil/design/link-set | DaffLinkSetSubheadingDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { DaffLinkSetComponent } from './link-set.component';

class WrapperComponent {}

describe('DaffLinkSetComponent', () => {
describe('@daffodil/design/link-set | DaffLinkSetComponent', () => {
let fixture: ComponentFixture<WrapperComponent>;
let de: DebugElement;
let wrapper: WrapperComponent;
Expand Down
2 changes: 1 addition & 1 deletion libs/design/list/src/list-item/list-item.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { DaffListItemComponent } from './list-item.component';
})
class WrapperComponent {}

describe('DaffListItemComponent', () => {
describe('@daffodil/design/list | DaffListItemComponent', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { DaffListSubheaderDirective } from './list-subheader.directive';
})
class WrapperComponent {}

describe('DaffListSubheaderDirective', () => {
describe('@daffodil/design/list | DaffListSubheaderDirective', () => {
let wrapper: WrapperComponent;
let de: DebugElement;
let fixture: ComponentFixture<WrapperComponent>;
Expand Down
Loading

0 comments on commit ee631b0

Please sign in to comment.