-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: fix input * test: vendor * fix: test * chore: readme
- Loading branch information
Showing
47 changed files
with
228 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
src/storeonwheels.client/src/app/libs/map-feature/components/map/map.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { ComponentFixture, TestBed } from "@angular/core/testing"; | ||
|
||
import { MapComponent } from "./map.component"; | ||
|
||
describe("MapComponent", () => { | ||
let component: MapComponent; | ||
let fixture: ComponentFixture<MapComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [MapComponent], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(MapComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it("mapbox should render", () => { | ||
expect(component).toBeTruthy(); | ||
const root: HTMLElement = fixture.nativeElement; | ||
expect(root.innerText).toContain("© Mapbox"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
47 changes: 47 additions & 0 deletions
47
...ls.client/src/app/libs/map-feature/components/vendor-table/vendor-table.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { ComponentFixture, TestBed } from "@angular/core/testing"; | ||
import { VendorTableComponent } from "./vendor-table.component"; | ||
import { Vendor } from "~/app/libs/shared/models"; | ||
import { Observable, from } from "rxjs"; | ||
|
||
describe("VendorTableComponent", () => { | ||
let component: VendorTableComponent; | ||
let fixture: ComponentFixture<VendorTableComponent>; | ||
let vendors: Vendor[]; | ||
|
||
beforeEach(async () => { | ||
const vendor1: Vendor = { | ||
id: "1", | ||
displayName: "Vendor_1", | ||
description: "Vendor One", | ||
}; | ||
const vendor2: Vendor = { | ||
id: "2", | ||
displayName: "Vendor_2", | ||
description: "Vendor Two", | ||
}; | ||
vendors = [vendor1, vendor2]; | ||
const vendors$: Observable<Vendor> = from(vendors); | ||
|
||
await TestBed.configureTestingModule({ | ||
imports: [VendorTableComponent], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(VendorTableComponent); | ||
component = fixture.componentInstance; | ||
fixture.componentRef.setInput("vendor$", vendors$); | ||
fixture.autoDetectChanges(); | ||
}); | ||
|
||
it("table rows should be rendered", () => { | ||
expect(component).toBeTruthy(); | ||
|
||
const root: HTMLElement = fixture.nativeElement; | ||
expect(root.querySelectorAll("tr").length).toBe(vendors.length + 1); | ||
|
||
const table = root.querySelector("table") as HTMLElement; | ||
expect(table).not.toBeNull(); | ||
|
||
expect(table.innerText).toContain("Vendor_1"); | ||
expect(table.innerText).toContain("Vendor_2"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 0 additions & 22 deletions
22
...reonwheels.client/src/app/libs/map/components/vendor-table/vendor-table.component.spec.ts
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
src/storeonwheels.client/src/app/libs/map/services/message-hub/message-hub.service.spec.ts
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/storeonwheels.client/src/app/pages/broadcast-page/broadcast-page.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/storeonwheels.client/src/app/pages/healthcheck-page/healthcheck-page.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/storeonwheels.client/src/app/pages/map-page/map-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div class="bg-slate-800"> | ||
<app-map [geoInfo$]="geoInfo$"></app-map> | ||
<app-vendor-table [geoInfo$]="geoInfo$"></app-vendor-table> | ||
<app-vendor-table [vendor$]="vendor$"></app-vendor-table> | ||
</div> |
Oops, something went wrong.