feat: Inertia profile settings page, Studio edit redesign, EGS, Nova UI components\n\n- Redesign /dashboard/profile as Inertia React page (Settings/ProfileEdit)\n with SettingsLayout sidebar, Nova UI components (TextInput, Textarea,\n Toggle, Select, RadioGroup, Modal, Button), avatar drag-and-drop,\n password change, and account deletion sections\n- Redesign Studio artwork edit page with two-column layout, Nova components,\n integrated TagPicker, and version history modal\n- Add shared MarkdownEditor component\n- Add Early-Stage Growth System (EGS): SpotlightEngine, FeedBlender,\n GridFiller, AdaptiveTimeWindow, ActivityLayer, admin panel\n- Fix upload category/tag persistence (V1+V2 paths)\n- Fix tag source enum, category tree display, binding resolution\n- Add settings.jsx Vite entry, settings.blade.php wrapper\n- Update ProfileController with JSON response support for API calls\n- Various route fixes (profile.edit, toolbar settings link)"
This commit is contained in:
116
tests/Feature/FooterPagesTest.php
Normal file
116
tests/Feature/FooterPagesTest.php
Normal file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
uses(RefreshDatabase::class);
|
||||
|
||||
describe('Footer pages', function () {
|
||||
|
||||
it('shows the FAQ page', function () {
|
||||
$this->get('/faq')
|
||||
->assertOk()
|
||||
->assertSee('Frequently Asked Questions');
|
||||
});
|
||||
|
||||
it('shows the Rules & Guidelines page', function () {
|
||||
$this->get('/rules-and-guidelines')
|
||||
->assertOk()
|
||||
->assertSee('Rules & Guidelines');
|
||||
});
|
||||
|
||||
it('shows the Privacy Policy page', function () {
|
||||
$this->get('/privacy-policy')
|
||||
->assertOk()
|
||||
->assertSee('Privacy Policy');
|
||||
});
|
||||
|
||||
it('shows the Terms of Service page', function () {
|
||||
$this->get('/terms-of-service')
|
||||
->assertOk()
|
||||
->assertSee('Terms of Service');
|
||||
});
|
||||
|
||||
it('shows the bug report page to guests with login prompt', function () {
|
||||
$this->get('/bug-report')
|
||||
->assertOk()
|
||||
->assertSee('Bug Report');
|
||||
});
|
||||
|
||||
it('shows the bug report form to authenticated users', function () {
|
||||
$user = \App\Models\User::factory()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->get('/bug-report')
|
||||
->assertOk()
|
||||
->assertSee('Subject');
|
||||
});
|
||||
|
||||
it('submits a bug report as authenticated user', function () {
|
||||
$user = \App\Models\User::factory()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->post('/bug-report', [
|
||||
'subject' => 'Test subject',
|
||||
'description' => 'This is a test bug report description.',
|
||||
])
|
||||
->assertRedirect('/bug-report');
|
||||
|
||||
$this->assertDatabaseHas('bug_reports', [
|
||||
'user_id' => $user->id,
|
||||
'subject' => 'Test subject',
|
||||
]);
|
||||
});
|
||||
|
||||
it('rejects bug report submission from guests', function () {
|
||||
$this->post('/bug-report', [
|
||||
'subject' => 'Test',
|
||||
'description' => 'Test description',
|
||||
])->assertRedirect('/login');
|
||||
});
|
||||
|
||||
it('shows the staff page', function () {
|
||||
$this->get('/staff')
|
||||
->assertOk()
|
||||
->assertSee('Meet the Staff');
|
||||
});
|
||||
|
||||
it('shows the RSS feeds info page', function () {
|
||||
$this->get('/rss-feeds')
|
||||
->assertOk()
|
||||
->assertSee('RSS')
|
||||
->assertSee('Latest Uploads');
|
||||
});
|
||||
|
||||
it('returns XML for latest uploads feed', function () {
|
||||
$this->get('/rss/latest-uploads.xml')
|
||||
->assertOk()
|
||||
->assertHeader('Content-Type', 'application/rss+xml; charset=utf-8');
|
||||
});
|
||||
|
||||
it('returns XML for latest skins feed', function () {
|
||||
$this->get('/rss/latest-skins.xml')
|
||||
->assertOk()
|
||||
->assertHeader('Content-Type', 'application/rss+xml; charset=utf-8');
|
||||
});
|
||||
|
||||
it('returns XML for latest wallpapers feed', function () {
|
||||
$this->get('/rss/latest-wallpapers.xml')
|
||||
->assertOk()
|
||||
->assertHeader('Content-Type', 'application/rss+xml; charset=utf-8');
|
||||
});
|
||||
|
||||
it('returns XML for latest photos feed', function () {
|
||||
$this->get('/rss/latest-photos.xml')
|
||||
->assertOk()
|
||||
->assertHeader('Content-Type', 'application/rss+xml; charset=utf-8');
|
||||
});
|
||||
|
||||
it('RSS feed contains valid XML', function () {
|
||||
$response = $this->get('/rss/latest-uploads.xml');
|
||||
$response->assertOk();
|
||||
$xml = simplexml_load_string($response->getContent());
|
||||
expect($xml)->not->toBeFalse();
|
||||
expect((string) $xml->channel->title)->toContain('Skinbase');
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user