email setup test

This commit is contained in:
Čarodej
2022-02-10 08:57:47 +01:00
parent 9f5172da85
commit b5c00e98df
2 changed files with 14 additions and 5 deletions
@@ -147,6 +147,10 @@
</div>
</div>
<InfoBox v-if="isError" type="error" class="!mb-5">
<p>Something went wrong, please try it again.</p>
</InfoBox>
<AuthButton class="w-full justify-center" icon="chevron-right" text="Save and Set General Settings" :loading="isLoading" :disabled="isLoading" />
</ValidationObserver>
</AuthContent>
@@ -211,6 +215,7 @@ export default {
},
data() {
return {
isError: false,
isLoading: false,
ossRegions: [
{
@@ -510,6 +515,7 @@ export default {
async EnvironmentSetupSubmit() {
if (this.$root.$data.config.isSetupWizardDemo) {
this.$router.push({name: 'AppSetup'})
return
}
// Validate fields
@@ -540,6 +546,10 @@ export default {
.catch((error) => {
// End loading
this.isLoading = false
if (error.response.status === 500) {
this.isError = true
}
})
},
},
@@ -14,8 +14,7 @@ class StoreEnvironmentSettingsController extends Controller
*/
public function __invoke(
StoreEnvironmentSetupRequest $request,
): Response
{
): Response {
if (!app()->runningUnitTests()) {
$drivers = [
'local' => [
@@ -71,9 +70,9 @@ class StoreEnvironmentSettingsController extends Controller
];
// Store credentials for mail
setEnvironmentValue([
$mail[$request->input('mail.driver')]
]);
setEnvironmentValue(
$mail[$request->input('mailDriver')]
);
Artisan::call('config:cache');
}