mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-04 10:42:23 +00:00
Use the Coolify confirmation modal instead of wire:confirm for server management, server transfer and import, resource migration, and S3 backup disabling. Show a toast instead of alert() for a missing GitHub App webhook endpoint. Add a test that blocks native dialogs in views. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
680 B
PHP
22 lines
680 B
PHP
<?php
|
|
|
|
use Symfony\Component\Finder\Finder;
|
|
|
|
it('does not use native browser dialogs in views or scripts', function () {
|
|
$files = Finder::create()
|
|
->files()
|
|
->in([__DIR__.'/../../resources/views', __DIR__.'/../../resources/js'])
|
|
->name(['*.blade.php', '*.js']);
|
|
|
|
$offenders = [];
|
|
foreach ($files as $file) {
|
|
foreach (explode("\n", $file->getContents()) as $number => $line) {
|
|
if (preg_match('/wire:confirm|(?<![\w.$])(?:window\.)?(?:alert|confirm|prompt)\s*\(/', $line)) {
|
|
$offenders[] = $file->getRelativePathname().':'.($number + 1);
|
|
}
|
|
}
|
|
}
|
|
|
|
expect($offenders)->toBeEmpty();
|
|
});
|