fix(realtime): force-WS option and polish connection popup UI

Add PUSHER_FORCE_WS so Echo/Pusher can prefer plain WebSocket
transports, redesign the real-time connection warning popup, and
give copy-button inputs durable right padding in settings forms.
This commit is contained in:
Andras Bacsai committed 2026-08-04 19:36:36 +02:00
1 parent 07933640f2
commit dbc6f5e08c
12 files changed
+188 -52

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
<?php
/**
* Layout popups (realtime warning, sponsorship, notifications) use the redesigned UI shell.
*/
test('realtime connection warning uses the redesigned popup shell', function () {
$view = file_get_contents(resource_path('views/livewire/layout-popups.blade.php'));
expect($view)
->toContain('Cannot connect to real-time service')
->toContain('Acknowledge &amp; disable')
->toContain('customActions')
->toContain('rounded-2xl border border-red-200')
->toContain('name="alert-triangle"')
->not->toContain('WARNING: </span> Cannot connect to real-time service')
->not->toContain('Acknowledge & Disable This Popup');
});
test('notification reminder uses the redesigned popup shell', function () {
$view = file_get_contents(resource_path('views/livewire/layout-popups.blade.php'));
expect($view)
->toContain('No notifications enabled')
->toContain('Accept and close')
->toContain('Open notifications')
->not->toContain('Accept and Close');
});
@@ -107,6 +107,30 @@ it('registers the eye-off2 reicon used when password value is visible', function
->toContain('M2.53033 1.46967');
});
it('uses the same eye-off2 icon in configuration changes expand toggle', function () {
$html = view('components.deployment.configuration-diff', [
'diff' => [
'changes' => [
[
'key' => 'env.SECRET',
'section_label' => 'Environment',
'label' => 'SECRET',
'expandable' => true,
'old_display_value' => 'old-***',
'new_display_value' => 'new-***',
'old_full_value' => 'old-secret-value',
'new_full_value' => 'new-secret-value',
],
],
],
])->render();
// eye-off2 path (password inputs); not the older eye-off glyph.
expect($html)
->toContain('M2.53033 1.46967')
->not->toContain('M22.2954 6.31083');
});
it('renders env var password input before visibility toggle in tab order', function () {
$html = Blade::render('<x-forms.env-var-input type="password" id="secret" />');
@@ -38,9 +38,19 @@ it('renders copy fields as visible readonly controls with an accessible copy act
expect($html)
->toContain('label class="flex gap-1 items-center mb-1 text-sm font-medium text-black dark:text-white"')
->toContain('readonly')
->toContain('class="input pr-11 bg-white dark:bg-coolgray-100 dark:read-only:bg-coolgray-100 dark:read-only:text-white"')
->toContain('input-with-copy-button')
->toContain('copy-button')
->toContain('aria-label="Copy to clipboard"')
->toContain('title="Copy to clipboard"')
->toContain('rounded-sm p-1.5 text-neutral-500 transition-colors hover:text-neutral-700 focus-visible:ring-2 focus-visible:ring-coollabs focus-visible:ring-offset-2 dark:text-neutral-400 dark:hover:text-white dark:focus-visible:ring-warning dark:focus-visible:ring-offset-base')
->toContain('class="w-5 h-5 text-green-500"');
->toContain('class="size-[18px] text-green-500"');
});
it('keeps copy button padding above settings-workspace input overrides', function () {
$css = file_get_contents(resource_path('css/app.css'));
expect($css)
->toContain('.input.input-with-copy-button')
->toContain('.application-settings-workspace .input.input-with-copy-button')
->toContain('.application-settings-form .input.input-with-copy-button')
->toContain('padding-right: 2.5rem');
});