diff --git a/resources/views/livewire/project/database/import-form.blade.php b/resources/views/livewire/project/database/import-form.blade.php index 4dd771ac7e..03cc780e52 100644 --- a/resources/views/livewire/project/database/import-form.blade.php +++ b/resources/views/livewire/project/database/import-form.blade.php @@ -191,7 +191,7 @@
  • Copy backup file to database container
  • Execute restore command
  • -

    All existing data will be replaced.

    +

    Existing objects can cause the import to fail unless replacement is enabled.

    @@ -251,7 +251,7 @@
  • Copy file into database container
  • Execute restore command
  • -

    All existing data will be replaced.

    +

    Existing objects can cause the import to fail unless replacement is enabled.

    diff --git a/tests/Feature/DatabaseRestoreDialogTest.php b/tests/Feature/DatabaseRestoreDialogTest.php index 5989543cf1..f373afe6e2 100644 --- a/tests/Feature/DatabaseRestoreDialogTest.php +++ b/tests/Feature/DatabaseRestoreDialogTest.php @@ -27,3 +27,13 @@ test('postgresql single database restore offers explicit object replacement', fu ->toContain('wire:model="postgresqlRestoreCommand"') ->toContain('label="Import command" readonly'); }); + +test('restore confirmation dialogs warn that existing objects can block the import', function () { + $view = file_get_contents(resource_path('views/livewire/project/database/import-form.blade.php')); + + expect($view) + ->toContain('submitAction="runImport"') + ->toContain('submitAction="restoreFromS3"') + ->toContain('Existing objects can cause the import to fail unless replacement is enabled.') + ->not->toContain('All existing data will be replaced.'); +});