mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-05-03 16:24:55 +00:00
🔥 **Cleanup:** Removed BookCase and OrangePill models, factories, migrations, and related references. Added tests for new service and meetup creation flows. Updated PHPUnit settings and browser-specific configurations.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
it('renders the login page with QR code and language selector', function () {
|
||||
$page = visit('/login');
|
||||
|
||||
$page->assertSee('Login with lightning')
|
||||
->assertSee('Bitcoin, not blockchain')
|
||||
->assertNoJavaScriptErrors();
|
||||
});
|
||||
|
||||
it('renders the registration page', function () {
|
||||
$page = visit('/register');
|
||||
|
||||
$page->assertNoJavaScriptErrors();
|
||||
});
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use App\Models\City;
|
||||
use App\Models\Country;
|
||||
|
||||
it('lets an authenticated user open the meetup-create page', function () {
|
||||
actingAsUser();
|
||||
$country = Country::factory()->create(['code' => 'de']);
|
||||
City::factory()->create(['country_id' => $country->id]);
|
||||
|
||||
$page = visit('/de/meetup-create');
|
||||
|
||||
$page->assertSee('Meetup')
|
||||
->assertNoJavaScriptErrors();
|
||||
});
|
||||
|
||||
it('lets an authenticated user open the service-create page', function () {
|
||||
actingAsUser();
|
||||
|
||||
$page = visit('/de/service-create');
|
||||
|
||||
$page->assertSee('Service')
|
||||
->assertNoJavaScriptErrors();
|
||||
});
|
||||
|
||||
it('lets an authenticated user open the lecturer-create page', function () {
|
||||
actingAsUser();
|
||||
|
||||
$page = visit('/de/lecturer-create');
|
||||
|
||||
$page->assertSee('Lecturer')
|
||||
->assertNoJavaScriptErrors();
|
||||
});
|
||||
|
||||
it('opens settings/profile for an authenticated user', function () {
|
||||
actingAsUser(['name' => 'Browser Tester']);
|
||||
|
||||
$page = visit('/de/settings/profile');
|
||||
|
||||
$page->assertSee('Browser Tester')
|
||||
->assertNoJavaScriptErrors();
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use App\Models\City;
|
||||
use App\Models\Country;
|
||||
use App\Models\Lecturer;
|
||||
use App\Models\Meetup;
|
||||
use App\Models\SelfHostedService;
|
||||
use App\Models\Venue;
|
||||
|
||||
beforeEach(function () {
|
||||
$country = Country::factory()->create(['code' => 'de']);
|
||||
$city = City::factory()->create(['country_id' => $country->id]);
|
||||
Venue::factory()->create(['city_id' => $city->id]);
|
||||
Meetup::factory()->create(['city_id' => $city->id, 'visible_on_map' => true]);
|
||||
Lecturer::factory()->create();
|
||||
SelfHostedService::factory()->create();
|
||||
});
|
||||
|
||||
it('loads all listed public pages without console errors or JS errors', function () {
|
||||
$pages = visit([
|
||||
'/welcome',
|
||||
'/login',
|
||||
'/register',
|
||||
'/forgot-password',
|
||||
'/de/meetups',
|
||||
'/de/courses',
|
||||
'/de/lecturers',
|
||||
'/de/cities',
|
||||
'/de/venues',
|
||||
'/de/services',
|
||||
]);
|
||||
|
||||
$pages->assertNoSmoke();
|
||||
});
|
||||
Reference in New Issue
Block a user