seed(PlanSeeder::class); $this->get('https://businessportal24.test/de') ->assertSuccessful() ->assertSeeText('Tarife & Pakete') ->assertSeeText('Starter') ->assertSeeText('Business') ->assertSeeText('Pro') ->assertSeeText('Agency') // Jahrespreis-Kommunikation und Live-Preis (Agency 199 €). ->assertSeeText('2 Monate gratis') ->assertSee('199') ->assertSeeText('Auswählen') ->assertSeeText('Beliebt'); }); test('the pricing teaser hides inactive plans', function () { /** @var TestCase $this */ Plan::factory()->create(['name' => 'Sichtbarer Tarif', 'is_active' => true]); Plan::factory()->inactive()->create(['name' => 'Versteckter Tarif']); $this->get('https://businessportal24.test/de') ->assertSuccessful() ->assertSeeText('Sichtbarer Tarif') ->assertDontSeeText('Versteckter Tarif'); }); test('the pricing teaser is omitted when no plans exist but the page still works', function () { /** @var TestCase $this */ expect(Plan::query()->count())->toBe(0); $this->get('https://businessportal24.test/de') ->assertSuccessful() ->assertDontSeeText('Auswählen'); }); test('the header links to the pricing page on every portal page', function () { /** @var TestCase $this */ $this->get('https://businessportal24.test/de') ->assertSuccessful() ->assertSee('/de/preise'); $this->get('https://presseecho.test/de') ->assertSuccessful() ->assertSee('/de/preise'); });