From e6dd1a69462ee53911f6302906ea54887d0b5870 Mon Sep 17 00:00:00 2001 From: Vijaivir Dhaliwal <91633223+vijaivir@users.noreply.github.com> Date: Thu, 21 Nov 2024 08:45:19 -0800 Subject: [PATCH] LCSD-7382: Adding the Unit Test and Styling for the Hours of Sale Reverted Changes (#4316) * added hours of sale * revert unit tests and styling --- .../application/application.component.scss | 20 ++++++++++++++++++ .../application/application.component.spec.ts | 21 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/cllc-public-app/ClientApp/src/app/components/applications/application/application.component.scss b/cllc-public-app/ClientApp/src/app/components/applications/application/application.component.scss index 6a687624a7..43fed45ba4 100644 --- a/cllc-public-app/ClientApp/src/app/components/applications/application/application.component.scss +++ b/cllc-public-app/ClientApp/src/app/components/applications/application/application.component.scss @@ -106,6 +106,26 @@ .normal-mode { display: none; } + + .store-hours { + width: 100%; + border-collapse: separate; + border-spacing: 2px; + + th { + text-align: center; + } + + td, + th { + padding: 5px; + background-color: #E1E8F2; + } + + th.lead { + background-color: transparent; + } + } td.primary { padding: 10px; diff --git a/cllc-public-app/ClientApp/src/app/components/applications/application/application.component.spec.ts b/cllc-public-app/ClientApp/src/app/components/applications/application/application.component.spec.ts index 3f92e79fc4..f355888af1 100644 --- a/cllc-public-app/ClientApp/src/app/components/applications/application/application.component.spec.ts +++ b/cllc-public-app/ClientApp/src/app/components/applications/application/application.component.spec.ts @@ -266,6 +266,27 @@ describe("ApplicationComponent", expect(elem).toBeFalsy(); }); + it("should show hours of sale if enabled", + () => { + applicationService.getApplicationById = () => of({ + applicationType: { + 'showHoursOfSale': true, + contentTypes: [] + } as any + } as Application); + fixture = TestBed.createComponent(ApplicationComponent); + component = fixture.debugElement.componentInstance; + fixture.detectChanges(); + const elem = fixture.debugElement.query(By.css(".ngtest-hours-of-sale")).nativeElement; + expect(elem).not.toBeFalsy(); + }); + + it("should hide hours of sale if disabled", + () => { + const elem = fixture.debugElement.query(By.css(".ngtest-hours-of-sale")); + expect(elem).toBeFalsy(); + }); + it("should be invalid if no supporting documents are uploaded", () => { applicationService.getApplicationById = () => of({