diff --git a/README.md b/README.md index 246f55d..4407e0c 100644 --- a/README.md +++ b/README.md @@ -73,10 +73,11 @@ This is an implementation of a Filmpire App using [The TMDB API](https://developer.themoviedb.org/docs) using: - Nx Workspace -- Angular v15 +- Angular v16 - Angular Material - NgRx - Tailwind CSS +- Storybook
diff --git a/apps/filmpire/src/app/app.routes.ts b/apps/filmpire/src/app/app.routes.ts index 293bc92..0d5df86 100644 --- a/apps/filmpire/src/app/app.routes.ts +++ b/apps/filmpire/src/app/app.routes.ts @@ -3,6 +3,7 @@ import { AccountComponent } from './account/account.component'; import { MediaInfoComponent } from './media-info/media-info.component'; import { MediaListComponent } from './media-list/media-list.component'; import { PersonInfoComponent } from './person-info/person-info.component'; +import { PageNotFoundComponent } from 'libs/ui/src/lib/page-not-found/page-not-found.component'; export const appRoutes: Route[] = [ { @@ -30,5 +31,5 @@ export const appRoutes: Route[] = [ component: AccountComponent, }, { path: '', redirectTo: 'category/movie/popular', pathMatch: 'full' }, - // { path: '**', component: PageNotFoundComponent }, // Wildcard route for a 404 page + { path: '**', component: PageNotFoundComponent }, // Wildcard route for a 404 page ]; diff --git a/libs/ui/.storybook/main.js b/libs/ui/.storybook/main.js index d883f9f..24da9b1 100644 --- a/libs/ui/.storybook/main.js +++ b/libs/ui/.storybook/main.js @@ -1,6 +1,6 @@ module.exports = { stories: ['../**/*.stories.mdx', '../**/*.stories.@(js|jsx|ts|tsx)'], - addons: ['@storybook/addon-essentials'], + addons: ['@storybook/addon-interactions', '@storybook/addon-essentials'], staticDirs: [{ from: '../src/assets', to: '/assets' }], framework: { diff --git a/libs/ui/.storybook/preview.js b/libs/ui/.storybook/preview.js index bf7cc79..a8418b9 100644 --- a/libs/ui/.storybook/preview.js +++ b/libs/ui/.storybook/preview.js @@ -1,4 +1,4 @@ -import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { provideHttpClient } from '@angular/common/http'; import { ReactiveFormsModule } from '@angular/forms'; import { provideAnimations } from '@angular/platform-browser/animations'; import { RouterModule } from '@angular/router'; @@ -6,7 +6,7 @@ import { applicationConfig } from '@storybook/angular'; export const decorators = [ applicationConfig({ - imports: [ReactiveFormsModule, RouterModule, HttpClientTestingModule], - providers: [provideAnimations()], + imports: [ReactiveFormsModule, RouterModule], + providers: [provideAnimations(), provideHttpClient()], }), ]; diff --git a/libs/ui/src/lib/autocomplete-results/autocomplete-results.component.spec.ts b/libs/ui/src/lib/autocomplete-results/autocomplete-results.component.spec.ts index d58fec9..c4d082c 100644 --- a/libs/ui/src/lib/autocomplete-results/autocomplete-results.component.spec.ts +++ b/libs/ui/src/lib/autocomplete-results/autocomplete-results.component.spec.ts @@ -1,6 +1,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { AutocompleteResultsComponent } from './autocomplete-results.component'; +import { MaterialModule } from '@ng-filmpire/material'; describe('AutocompleteResultsComponent', () => { let component: AutocompleteResultsComponent; @@ -8,6 +9,7 @@ describe('AutocompleteResultsComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ + imports: [MaterialModule], declarations: [AutocompleteResultsComponent], }).compileComponents(); diff --git a/libs/ui/src/lib/autocomplete-results/autocomplete-results.component.stories.ts b/libs/ui/src/lib/autocomplete-results/autocomplete-results.component.stories.ts new file mode 100644 index 0000000..ddfe363 --- /dev/null +++ b/libs/ui/src/lib/autocomplete-results/autocomplete-results.component.stories.ts @@ -0,0 +1,127 @@ +import type { Meta, StoryObj } from '@storybook/angular'; +import { AutocompleteResultsComponent } from './autocomplete-results.component'; + +const meta: Meta+
+ The page you are looking for might be in another scene. +
+ Go back to Homepage +