mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-23 22:26:24 +00:00
fix(gitlab): reload application secret after save
The secret was always stored encrypted, but the setup form wiped the input on every load. Load it back for admins (GitHub App parity) so a reload no longer looks like a failed save.
This commit is contained in:
@@ -56,4 +56,21 @@ describe('GitLab source setup view', function () {
|
||||
->set('htmlUrl', 'https://gitlab.example.com')
|
||||
->assertSet('apiUrl', 'https://gitlab.example.com/api/v4');
|
||||
});
|
||||
|
||||
test('saves and reloads the application secret after refresh', function () {
|
||||
Livewire::withQueryParams(['gitlab_app_uuid' => $this->gitlabApp->uuid])
|
||||
->test(Change::class)
|
||||
->set('clientId', 'gitlab-app-id')
|
||||
->set('clientSecretInput', 'super-secret-value')
|
||||
->call('submit')
|
||||
->assertDispatched('success');
|
||||
|
||||
$this->gitlabApp->refresh()->makeVisible(['client_secret']);
|
||||
expect($this->gitlabApp->client_secret)->toBe('super-secret-value');
|
||||
|
||||
Livewire::withQueryParams(['gitlab_app_uuid' => $this->gitlabApp->uuid])
|
||||
->test(Change::class)
|
||||
->assertSet('clientId', 'gitlab-app-id')
|
||||
->assertSet('clientSecretInput', 'super-secret-value');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user