diff --git a/src/app/movie-detail/movie-detail.component.scss b/src/app/movie-detail/movie-detail.component.scss
index ec04799..a43954b 100644
--- a/src/app/movie-detail/movie-detail.component.scss
+++ b/src/app/movie-detail/movie-detail.component.scss
@@ -1,10 +1,10 @@
@import "variables";
-.ngmp-movie-details-container {
+.ngma-movie-details-container {
width: 100%;
}
-.ngmp-movie-cover {
+.ngma-movie-cover {
position: relative;
max-height: 25em;
overflow: hidden;
@@ -42,7 +42,7 @@
}
}
-.ngmp-movie-details {
+.ngma-movie-details {
position: relative;
display: flex;
flex-direction: row;
@@ -51,7 +51,7 @@
transform: translateY(-4em);
}
-.ngmp-movie-contents {
+.ngma-movie-contents {
padding: 0 1em;
color: darken($light, 35);
@@ -61,7 +61,7 @@
font-size: 44px;
}
- .ngmp-movie-info {
+ .ngma-movie-info {
display: flex;
justify-content: flex-start;
flex-direction: row;
@@ -102,7 +102,7 @@
}
}
- .ngmp-movie-rating-container {
+ .ngma-movie-rating-container {
a {
margin-left: 0.5em;
background-color: $secondary-color;
@@ -113,26 +113,26 @@
}
}
- .ngmp-movie-plot {
+ .ngma-movie-plot {
max-width: 70%;
line-height: 1.8;
}
- .ngmp-plot-img {
+ .ngma-plot-img {
top: 10px;
position: relative;
height: 25px;
width: 25px;
}
- .ngmp-star-img {
+ .ngma-star-img {
top: 5px;
position: relative;
height: 25px;
width: 25px;
}
- .ngmp-duration-img {
+ .ngma-duration-img {
top: 10px;
position: relative;
height: 20px;
@@ -140,15 +140,15 @@
}
@media only screen and (max-width: 48em) {
- .ngmp-movie-details {
+ .ngma-movie-details {
flex-direction: column-reverse;
transform: translateY(0);
padding: 0 0.5em;
- .ngmp-movie-poster {
+ .ngma-movie-poster {
padding: 0 1em;
}
- .ngmp-movie-info {
+ .ngma-movie-info {
display: block;
div {
flex-direction: column;
@@ -160,14 +160,14 @@
margin-bottom: 1em;
}
}
- .ngmp-movie-rating-container {
+ .ngma-movie-rating-container {
flex-direction: column;
span {
display: block;
margin-bottom: 1em;
}
}
- .ngmp-movie-plot {
+ .ngma-movie-plot {
max-width: 100%;
}
}
diff --git a/src/app/movie-detail/movie-detail.component.spec.ts b/src/app/movie-detail/movie-detail.component.spec.ts
index f78c44b..48c5430 100644
--- a/src/app/movie-detail/movie-detail.component.spec.ts
+++ b/src/app/movie-detail/movie-detail.component.spec.ts
@@ -1,17 +1,26 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { async, ComponentFixture, TestBed } from "@angular/core/testing";
+import { HttpClientTestingModule } from "@angular/common/http/testing";
+import { ActivatedRoute } from "@angular/router";
-import { MovieDetailComponent } from './movie-detail.component';
+import { MovieDetailComponent } from "./movie-detail.component";
+import { MovieService } from "../movie/services/movie.services";
-describe('MovieDetailComponent', () => {
+describe("MovieDetailComponent", () => {
let component: MovieDetailComponent;
let fixture: ComponentFixture
;
-
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ MovieDetailComponent ]
- })
- .compileComponents();
+ imports: [HttpClientTestingModule],
+ declarations: [MovieDetailComponent],
+ providers: [
+ {
+ provide: ActivatedRoute,
+ useValue: { snapshot: { params: { id: 1 } } },
+ },
+ MovieService,
+ ],
+ }).compileComponents();
}));
beforeEach(() => {
@@ -20,7 +29,7 @@ describe('MovieDetailComponent', () => {
fixture.detectChanges();
});
- it('should create', () => {
+ it("should create", () => {
expect(component).toBeTruthy();
});
});
diff --git a/src/app/movie/movie.component.html b/src/app/movie/movie.component.html
index e3788b1..9b2bc6f 100644
--- a/src/app/movie/movie.component.html
+++ b/src/app/movie/movie.component.html
@@ -2,13 +2,13 @@
-