Skip to content

Commit

Permalink
feat(all)!: prefix state testing modules with State (#2606)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: changes the name of many state testing modules
  • Loading branch information
griest024 committed Nov 18, 2023
1 parent 1eb1972 commit f755ab8
Show file tree
Hide file tree
Showing 35 changed files with 52 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
DaffCartItemUpdate,
} from '@daffodil/cart/state';
import {
DaffCartTestingModule,
DaffCartStateTestingModule,
MockDaffCartFacade,
} from '@daffodil/cart/state/testing';
import { DaffCartItemFactory } from '@daffodil/cart/testing';
Expand Down Expand Up @@ -47,7 +47,7 @@ describe('CartItemComponent', () => {
imports: [
RouterTestingModule,
DaffQtyDropdownModule,
DaffCartTestingModule,
DaffCartStateTestingModule,
],
declarations: [
CartItemComponent,
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/src/app/cart/components/cart/cart.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { BehaviorSubject } from 'rxjs';

import { DaffCart } from '@daffodil/cart';
import {
DaffCartTestingModule,
DaffCartStateTestingModule,
MockDaffCartFacade,
} from '@daffodil/cart/state/testing';
import { DaffCartFactory } from '@daffodil/cart/testing';
Expand Down Expand Up @@ -72,7 +72,7 @@ describe('Cart', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
DaffCartTestingModule,
DaffCartStateTestingModule,
],
declarations: [
WrapperComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { BehaviorSubject } from 'rxjs';

import { DaffCart } from '@daffodil/cart';
import {
DaffCartTestingModule,
DaffCartStateTestingModule,
MockDaffCartFacade,
} from '@daffodil/cart/state/testing';
import { DaffCartFactory } from '@daffodil/cart/testing';
Expand Down Expand Up @@ -48,7 +48,7 @@ describe('DemoCartViewComponent', () => {
imports: [
DaffContainerModule,
DaffLoadingIconModule,
DaffCartTestingModule,
DaffCartStateTestingModule,
],
})
.compileComponents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { of } from 'rxjs';

import { DaffCart } from '@daffodil/cart';
import {
DaffCartTestingModule,
DaffCartStateTestingModule,
MockDaffCartFacade,
} from '@daffodil/cart/state/testing';
import { DaffCartFactory } from '@daffodil/cart/testing';
Expand All @@ -40,7 +40,7 @@ describe('PlaceOrderComponent', () => {
provideMockStore({}),
],
imports: [
DaffCartTestingModule,
DaffCartStateTestingModule,
],
})
.compileComponents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {

import { DaffCart } from '@daffodil/cart';
import {
DaffCartTestingModule,
DaffCartStateTestingModule,
MockDaffCartFacade,
} from '@daffodil/cart/state/testing';
import {
Expand Down Expand Up @@ -139,7 +139,7 @@ describe('CheckoutViewComponent', () => {
NoopAnimationsModule,
DaffContainerModule,
DaffLoadingIconModule,
DaffCartTestingModule,
DaffCartStateTestingModule,
],
declarations: [
CheckoutViewComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
DaffNavigationLoad,
} from '@daffodil/navigation/state';
import {
DaffNavigationTestingModule,
DaffNavigationStateTestingModule,
MockDaffNavigationFacade,
} from '@daffodil/navigation/state/testing';
import { DaffNavigationTreeFactory } from '@daffodil/navigation/testing';
Expand Down Expand Up @@ -55,7 +55,7 @@ describe('SidebarContainer', () => {
FontAwesomeModule,
DaffLoadingIconModule,
DaffLinkSetModule,
DaffNavigationTestingModule,
DaffNavigationStateTestingModule,
],
declarations: [
WrapperComponent,
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/src/app/newsletter/newsletter.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { By } from '@angular/platform-browser';

import { DaffContainerModule } from '@daffodil/design';
import {
DaffNewsletterTestingModule,
DaffNewsletterStateTestingModule,
MockDaffNewsletterFacade,
} from '@daffodil/newsletter/state/testing';

Expand All @@ -28,7 +28,7 @@ describe('NewsletterComponent', () => {
imports: [
DaffContainerModule,
ReactiveFormsModule,
DaffNewsletterTestingModule,
DaffNewsletterStateTestingModule,
],
})
.compileComponents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { RouterTestingModule } from '@angular/router/testing';
import { DaffCartItemInputType } from '@daffodil/cart';
import { DaffCartItemAdd } from '@daffodil/cart/state';
import {
DaffCartTestingModule,
DaffCartStateTestingModule,
MockDaffCartFacade,
} from '@daffodil/cart/state/testing';
import { DaffLoadingIconModule } from '@daffodil/design';
Expand Down Expand Up @@ -70,7 +70,7 @@ describe('ProductViewComponent', () => {
imports: [
RouterTestingModule,
DaffLoadingIconModule,
DaffCartTestingModule,
DaffCartStateTestingModule,
DaffProductStateTestingModule,
],
declarations: [
Expand Down
4 changes: 2 additions & 2 deletions libs/auth/routing/src/guards/reset-password.guard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Observable } from 'rxjs';
import { DAFF_AUTH_ROUTING_CONFIG } from '@daffodil/auth/routing';
import { DaffResetPasswordLanding } from '@daffodil/auth/state';
import {
DaffAuthTestingModule,
DaffAuthStateTestingModule,
MockDaffAuthFacade,
} from '@daffodil/auth/state/testing';

Expand All @@ -38,7 +38,7 @@ describe('@daffodil/auth/routing | DaffAuthResetPasswordGuard', () => {

TestBed.configureTestingModule({
imports: [
DaffAuthTestingModule,
DaffAuthStateTestingModule,
RouterTestingModule.withRoutes([
{
path: 'reset',
Expand Down
2 changes: 1 addition & 1 deletion libs/auth/state/testing/src/auth-testing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ import { MockDaffAuthResetPasswordFacade } from './mock-reset-password-facade';
{ provide: DaffAuthResetPasswordFacade, useExisting: MockDaffAuthResetPasswordFacade },
],
})
export class DaffAuthTestingModule {}
export class DaffAuthStateTestingModule {}
2 changes: 1 addition & 1 deletion libs/auth/state/testing/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { DaffAuthTestingModule } from './auth-testing.module';
export { DaffAuthStateTestingModule } from './auth-testing.module';
export { MockDaffAuthFacade } from './mock-auth-facade';
export { MockDaffAuthLoginFacade } from './mock-login-facade';
export { MockDaffAuthRegisterFacade } from './mock-register-facade';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ import { MockDaffAuthorizeNetFacade } from './mock-authorize-net-facade';
{ provide: DaffAuthorizeNetFacade, useExisting: MockDaffAuthorizeNetFacade },
],
})
export class DaffAuthorizeNetTestingModule {}
export class DaffAuthorizeNetStateTestingModule {}
2 changes: 1 addition & 1 deletion libs/authorizenet/state/testing/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { MockDaffAuthorizeNetFacade } from './mock-authorize-net-facade';
export { DaffAuthorizeNetTestingModule } from './authorize-net-testing.module';
export { DaffAuthorizeNetStateTestingModule } from './authorize-net-testing.module';
4 changes: 2 additions & 2 deletions libs/cart/guides/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CartComponent implements OnInit {
import {
DaffCartFacade,
DaffCartCreate,
DaffCartTestingModule,
DaffCartStateTestingModule,
MockDaffCartFacade
} from '@daffodil/cart';

Expand All @@ -44,7 +44,7 @@ describe('CartComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
DaffCartTestingModule // this provides the MockDaffCartFacade
DaffCartStateTestingModule // this provides the MockDaffCartFacade
]
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {

import { DaffCartOrderResultGuardRedirectUrl } from '@daffodil/cart/routing';
import { DaffCartFacade } from '@daffodil/cart/state';
import { DaffCartTestingModule } from '@daffodil/cart/state/testing';
import { DaffCartStateTestingModule } from '@daffodil/cart/state/testing';

import { DaffOrderResultGuard } from './order-result.guard';

Expand All @@ -27,7 +27,7 @@ describe('Cart | State | Guards | DaffOrderResultGuard', () => {
],
imports: [
RouterTestingModule,
DaffCartTestingModule,
DaffCartStateTestingModule,
],
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
DaffCartResolveState,
DaffCartFacade,
} from '@daffodil/cart/state';
import { DaffCartTestingModule } from '@daffodil/cart/state/testing';
import { DaffCartStateTestingModule } from '@daffodil/cart/state/testing';
import { DaffCartFactory } from '@daffodil/cart/testing';

import { DaffResolveCartGuard } from './resolve-cart.guard';
Expand All @@ -41,7 +41,7 @@ describe('@daffodil/cart/routing | DaffResolveCartGuard', () => {

TestBed.configureTestingModule({
imports: [
DaffCartTestingModule,
DaffCartStateTestingModule,
RouterTestingModule,
],
providers: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { RouterTestingModule } from '@angular/router/testing';
import { DAFF_CART_ROUTING_CONFIG } from '@daffodil/cart/routing';
import { DaffCartResolveState } from '@daffodil/cart/state';
import {
DaffCartTestingModule,
DaffCartStateTestingModule,
MockDaffCartFacade,
} from '@daffodil/cart/state/testing';

Expand All @@ -29,7 +29,7 @@ describe('Cart | State | Guards | DaffResolvedCartGuard | Integration', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
DaffCartTestingModule,
DaffCartStateTestingModule,
RouterTestingModule.withRoutes([
{
path: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
DaffCartResolveState,
DaffCartFacade,
} from '@daffodil/cart/state';
import { DaffCartTestingModule } from '@daffodil/cart/state/testing';
import { DaffCartStateTestingModule } from '@daffodil/cart/state/testing';

import { DaffResolvedCartGuard } from './resolved-cart.guard';
import { daffCartRoutingConfigurationDefault } from '../../config/config';
Expand All @@ -20,7 +20,7 @@ describe('Cart | State | Guards | DaffResolvedCartGuard', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [DaffCartTestingModule, RouterTestingModule],
imports: [DaffCartStateTestingModule, RouterTestingModule],
});

facade = TestBed.inject(DaffCartFacade);
Expand Down
2 changes: 1 addition & 1 deletion libs/cart/state/testing/src/cart-testing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ import { MockDaffCartFacade } from './mock-cart-facade';
{ provide: DaffCartFacade, useExisting: MockDaffCartFacade },
],
})
export class DaffCartTestingModule { }
export class DaffCartStateTestingModule { }
2 changes: 1 addition & 1 deletion libs/cart/state/testing/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { DaffCartTestingModule } from './cart-testing.module';
export { DaffCartStateTestingModule } from './cart-testing.module';
export { MockDaffCartFacade } from './mock-cart-facade';
export * from './factories/stateful-cart-item.factory';
export * from './factories/stateful-composite-cart-item.factory';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
DaffCategoryPageRemoveFilters,
} from '@daffodil/category/state';
import {
DaffCategoryTestingModule,
DaffCategoryStateTestingModule,
MockDaffCategoryFacade,
} from '@daffodil/category/state/testing';
import {
Expand Down Expand Up @@ -226,7 +226,7 @@ describe('DaffCategoryPageFilterEffects', () => {
TestBed.configureTestingModule({
imports: [
DaffCategoryTestingDriverModule.forRoot(),
DaffCategoryTestingModule,
DaffCategoryStateTestingModule,
],
providers: [
DaffCategoryPageFilterEffects,
Expand Down
2 changes: 1 addition & 1 deletion libs/category/state/testing/src/category-testing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ import { MockDaffCategoryFacade } from './mock-category-facade';
{ provide: DaffCategoryProductCollectionFacade, useExisting: MockDaffCollectionFacade },
],
})
export class DaffCategoryTestingModule { }
export class DaffCategoryStateTestingModule { }
2 changes: 1 addition & 1 deletion libs/category/state/testing/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { DaffCategoryTestingModule } from './category-testing.module';
export { DaffCategoryStateTestingModule } from './category-testing.module';
export { MockDaffCategoryFacade } from './mock-category-facade';
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ import { MockDaffGeographyFacade } from './mock-geography-facade';
{ provide: DaffGeographyFacade, useExisting: MockDaffGeographyFacade },
],
})
export class DaffGeographyTestingModule {}
export class DaffGeographyStateTestingModule {}
2 changes: 1 addition & 1 deletion libs/geography/state/testing/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { DaffGeographyTestingModule } from './geography-testing.module';
export { DaffGeographyStateTestingModule } from './geography-testing.module';
export { MockDaffGeographyFacade } from './mock-geography-facade';
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { DaffNavigationFacadeInterface } from '@daffodil/navigation/state';

/**
* A mock of the DaffNavigationFacade used to remove any interaction with the ngrx store.
* This mock should be imported into tests using the DaffNavigationTestingModule.
* This mock should be imported into tests using the DaffNavigationStateTestingModule.
*
* @inheritdoc
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DaffNavigationFacade } from '@daffodil/navigation/state';
import { MockDaffNavigationFacade } from './mock-navigation.facade';

/**
* The DaffNavigationTestingModule provides a mock for the DaffNavigationFacade. This makes testing much simpler
* The DaffNavigationStateTestingModule provides a mock for the DaffNavigationFacade. This makes testing much simpler
* by removing any interaction with the ngrx store.
*/
@NgModule({
Expand All @@ -17,4 +17,4 @@ import { MockDaffNavigationFacade } from './mock-navigation.facade';
{ provide: DaffNavigationFacade, useExisting: MockDaffNavigationFacade },
],
})
export class DaffNavigationTestingModule {}
export class DaffNavigationStateTestingModule {}
2 changes: 1 addition & 1 deletion libs/navigation/state/testing/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { DaffNavigationTestingModule } from './navigation-testing.module';
export { DaffNavigationStateTestingModule } from './navigation-testing.module';
export { MockDaffNavigationFacade } from './mock-navigation.facade';
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ import { MockDaffNewsletterFacade } from './mock-newsletter-facade';
{ provide: DaffNewsletterFacade, useExisting: MockDaffNewsletterFacade },
],
})
export class DaffNewsletterTestingModule { }
export class DaffNewsletterStateTestingModule { }
2 changes: 1 addition & 1 deletion libs/newsletter/state/testing/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { MockDaffNewsletterFacade } from './mock-newsletter-facade';
export { DaffNewsletterTestingModule } from './newsletter-testing.module';
export { DaffNewsletterStateTestingModule } from './newsletter-testing.module';
4 changes: 2 additions & 2 deletions libs/order/state/src/effects/order-collection.effects.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
DaffOrderListFailure,
DaffOrderListSuccess,
} from '@daffodil/order/state';
import { DaffOrderTestingModule } from '@daffodil/order/state/testing';
import { DaffOrderStateTestingModule } from '@daffodil/order/state/testing';
import { DaffOrderCollectionFactory } from '@daffodil/order/testing';

import { DaffOrderCollectionEffects } from './order-collection.effects';
Expand Down Expand Up @@ -145,7 +145,7 @@ describe('@daffodil/order/state | DaffOrderCollectionEffects', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
DaffOrderTestingModule,
DaffOrderStateTestingModule,
DaffOrderTestingDriverModule.forRoot(),
],
providers: [
Expand Down
2 changes: 1 addition & 1 deletion libs/order/state/testing/src/order-testing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ import { MockDaffOrderFacade } from './mock-order-facade';
{ provide: DaffOrderCollectionFacade, useExisting: MockDaffCollectionFacade },
],
})
export class DaffOrderTestingModule {}
export class DaffOrderStateTestingModule {}
2 changes: 1 addition & 1 deletion libs/order/state/testing/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { MockDaffOrderFacade } from './mock-order-facade';
export { DaffOrderTestingModule } from './order-testing.module';
export { DaffOrderStateTestingModule } from './order-testing.module';
2 changes: 1 addition & 1 deletion libs/paypal/state/testing/src/paypal-testing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ import { MockDaffPaypalFacade } from './mock-paypal-facade';
{ provide: DaffPaypalFacade, useExisting: MockDaffPaypalFacade },
],
})
export class DaffPaypalTestingModule { }
export class DaffPaypalStateTestingModule { }
2 changes: 1 addition & 1 deletion libs/paypal/state/testing/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { DaffPaypalTestingModule } from './paypal-testing.module';
export { DaffPaypalStateTestingModule } from './paypal-testing.module';
export { MockDaffPaypalFacade } from './mock-paypal-facade';

0 comments on commit f755ab8

Please sign in to comment.