diff --git a/resources/views/components/black-friday-banner.blade.php b/resources/views/components/black-friday-banner.blade.php index 7f41cb1a..d0908e7f 100644 --- a/resources/views/components/black-friday-banner.blade.php +++ b/resources/views/components/black-friday-banner.blade.php @@ -1,19 +1,23 @@ - {{-- Label Section --}} + {{-- Label --}}
{{-- Icon --}} \ No newline at end of file + diff --git a/resources/views/components/layout.blade.php b/resources/views/components/layout.blade.php index 42dab2a6..ee8e92f9 100644 --- a/resources/views/components/layout.blade.php +++ b/resources/views/components/layout.blade.php @@ -121,7 +121,9 @@ " class="min-h-screen overflow-x-clip bg-white font-poppins antialiased selection:bg-black selection:text-[#b4a9ff] dark:bg-[#050714] dark:text-white" > - @if (now()->isBefore('2027-01-01T00:00:00Z')) + @if (now()->isBefore('2026-12-01T08:00:00Z')) + + @elseif (now()->isBefore('2027-01-01T00:00:00Z')) @else diff --git a/tests/Feature/BifrostBlackFridayBannerTest.php b/tests/Feature/BifrostBlackFridayBannerTest.php new file mode 100644 index 00000000..e187ff35 --- /dev/null +++ b/tests/Feature/BifrostBlackFridayBannerTest.php @@ -0,0 +1,55 @@ +blade('') + ->assertSee('Black Friday:') + ->assertSee('50% off') + ->assertSee('href="https://bifrost.nativephp.com/newsletter"', escape: false) + ->assertSee('target="_blank"', escape: false) + ->assertSee('rel="noopener"', escape: false) + ->assertSee('bifrost_black_friday_banner_click', escape: false); + } + + #[Test] + public function the_banner_never_shows_a_discount_code(): void + { + $this->blade('') + ->assertDontSee('BLACKFRIDAY') + ->assertDontSee('HAPPYBIRTHDAY'); + } + + #[Test] + public function the_homepage_carries_the_black_friday_banner_until_the_sale_ends(): void + { + $this->travelTo(Carbon::parse('2026-12-01T07:59:59Z')); + + $this->get('/') + ->assertOk() + ->assertSee('bifrost_black_friday_banner_click', escape: false) + ->assertDontSee('bifrost_birthday_banner_click', escape: false); + } + + #[Test] + public function the_birthday_banner_comes_back_once_the_sale_ends(): void + { + $this->travelTo(Carbon::parse('2026-12-01T08:00:00Z')); + + $this->get('/') + ->assertOk() + ->assertDontSee('bifrost_black_friday_banner_click', escape: false) + ->assertSee('bifrost_birthday_banner_click', escape: false); + } +}