coolify/tests/Feature
Andras Bacsai 06ee7d0132 fix: GitHub source creation and configuration issues
Fixed multiple issues with GitHub App source creation and management:

1. **Fixed null property assignment error on component mount**
   - Changed property types to nullable in Change component (appId, installationId, clientId, etc.)
   - Updated validation rules to allow nullable values
   - Allows mounting component with newly created GitHub Apps that don't have these fields set yet

2. **Fixed Livewire morphing error on manual creation**
   - Modified createGithubAppManually() to redirect after saving
   - Prevents "Cannot read properties of null" error when view structure changes
   - Fields now properly populated after manual creation without requiring page refresh

3. **Fixed is_system_wide not being saved on creation**
   - Removed backwards logic that only saved is_system_wide on cloud instances
   - Added is_system_wide to GithubApp model casts for proper boolean handling
   - System-wide checkbox now works correctly on self-hosted instances

4. **Fixed misleading preview deployment checkbox**
   - Removed instantSave attribute from permission checkboxes in unconfigured state
   - These are configuration options for GitHub App creation, not database fields
   - Prevents "GitHub App updated" success message when nothing was actually saved

5. **Added validation for Refetch Permissions button**
   - Validates App ID and Private Key are set before attempting to fetch
   - Shows clear error messages: "Cannot fetch permissions. Please set the following required fields first: App ID, Private Key"
   - Prevents crash when private key is null or invalid

6. **Better error handling for unsupported private key formats**
   - Detects OpenSSH format keys vs RSA PEM format
   - Shows helpful message: "Please use an RSA private key in PEM format (BEGIN RSA PRIVATE KEY). OpenSSH format keys are not supported."
   - GitHub Apps require RSA PEM format, not OpenSSH format

7. **Made GitHub App view mobile responsive**
   - Updated all flex layouts to stack vertically on mobile (flex-col sm:flex-row)
   - Form fields, buttons, and sections now properly responsive
   - No more cut-off fields on small screens

Added comprehensive test coverage:
- GithubSourceChangeTest.php with 7 tests
- GithubSourceCreateTest.php with 6 tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 10:49:09 +02:00
..
CloudInitScriptTest.php feat: add cloud-init script support for Hetzner server creation 2025-10-10 19:37:16 +02:00
ConvertArraysTest.php fix: check if array is associative or not 2024-09-03 17:04:56 +02:00
ConvertContainerEnvsToArray.php chore(tests): update test environment database name and add new feature test for converting container environment variables to array 2025-05-22 14:30:16 +02:00
ConvertingGitUrlsTest.php fix: add tests for git url converts 2024-11-12 11:32:18 +01:00
DatabaseBackupCreationApiTest.php Changes auto-committed by Conductor 2025-10-16 11:01:58 +02:00
DatabaseBackupJobTest.php feat(backup): enhance backup job with S3 upload handling and notifications 2025-10-07 15:02:23 +02:00
DeletesUserSessionsTest.php Changes auto-committed by Conductor 2025-10-16 09:51:37 +02:00
DeploymentCancellationApiTest.php Changes auto-committed by Conductor 2025-10-16 11:01:58 +02:00
DockerCustomCommandsTest.php refactor 2025-04-23 13:22:01 +02:00
ExecuteContainerCommandTest.php test: setup database for upcoming tests 2024-12-04 12:43:52 +01:00
GithubAppsListApiTest.php Changes auto-committed by Conductor 2025-10-16 13:19:05 +02:00
GithubSourceChangeTest.php fix: GitHub source creation and configuration issues 2025-10-25 10:49:09 +02:00
GithubSourceCreateTest.php fix: GitHub source creation and configuration issues 2025-10-25 10:49:09 +02:00
HetznerServerCreationTest.php feat: add IPv4/IPv6 network configuration for Hetzner server creation 2025-10-10 18:22:25 +02:00
InstanceSettingsHelperVersionTest.php Changes auto-committed by Conductor 2025-10-16 09:51:37 +02:00
IpAllowlistTest.php refactor(dns-validation): rename DNS validation functions for consistency and clarity, and remove unused code 2025-09-09 09:00:35 +02:00
MultilineEnvironmentVariableTest.php feat(deployments): enhance Docker build argument handling for multiline variables 2025-10-02 13:54:36 +02:00
ServerSettingSentinelRestartTest.php Changes auto-committed by Conductor 2025-10-16 09:51:37 +02:00
ServerSettingWasChangedTest.php Changes auto-committed by Conductor 2025-10-16 09:51:37 +02:00
TeamInvitationEmailNormalizationTest.php refactor(ui): improve styling and consistency in environment variable warning and docker cleanup components 2025-09-25 11:45:07 +02:00
TeamInvitationPrivilegeEscalationTest.php fix: critical privilege escalation in team invitation system 2025-10-15 11:42:25 +02:00
TeamPolicyTest.php fix: add authentication context to TeamPolicyTest 2025-10-15 15:08:35 +02:00
TrustHostsMiddlewareTest.php Changes auto-committed by Conductor 2025-10-20 09:48:37 +02:00
Utf8HandlingTest.php feat(utf8-handling): implement UTF-8 sanitization for command outputs and enhance error handling in logs processing 2025-06-05 14:27:39 +02:00