-
Notifications
You must be signed in to change notification settings - Fork 0
feat: verification email style update #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
romanetar
wants to merge
1
commit into
main
Choose a base branch
from
feature/verification-email-update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+96
−26
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 27 additions & 26 deletions
53
resources/views/emails/auth/email_verification_request_fn.blade.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,34 @@ | ||
| @extends('emails.email_layout') | ||
|
|
||
| @section('content') | ||
| <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:middle;" width="100%"> | ||
| <table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%"> | ||
| <tbody> | ||
| <tr> | ||
| <td align="center" style="font-size:0px;padding:10px 25px;padding-right:25px;padding-left:25px;word-break:break-word;"> | ||
| <div style="font-family:open Sans Helvetica, Arial, sans-serif;font-size:16px;line-height:1;text-align:center;color:#000000;">Dear <a href="#" style="text-decoration:none !important;color:black !important; cursor:default !important">{!!$user_email!!}</a>,</div> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"> | ||
| <div style="font-family:open Sans Helvetica, Arial, sans-serif;font-size:16px;line-height:1;text-align:center;color:#000000;">Please click the link below to verify your email address.</div> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td align="center" style="font-size:0px;padding:10px 25px;padding-right:16px;padding-left:25px;word-break:break-word;"> | ||
| <div style="font-family:open Sans Helvetica, Arial, sans-serif;font-size:16px;line-height:1;text-align:center;color:#000000;"><a href="{!! $verification_link !!}" target="_blank">Verify Email Address.</a></div> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"> | ||
| <div style="font-family:open Sans Helvetica, Arial, sans-serif;font-size:16px;line-height:1;text-align:center;color:#000000;">If you did not create an {!! Config::get('app.app_name') !!} account, no further action is required.</div> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td align="center" style="font-size:0px;padding:10px 25px;padding-right:25px;padding-left:25px;word-break:break-word;"> | ||
| <div style="font-family:open Sans Helvetica, Arial, sans-serif;font-size:16px;line-height:1;text-align:center;color:#000000;">Thanks! <br/><br/>{{Config::get('app.tenant_name')}} Support Team</div> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td style="padding: 24px 40px 8px;"> | ||
| <h1 style="font-family: 'Open Sans', Helvetica, Arial, sans-serif; font-size: 22px; font-weight: 500; margin: 0 0 8px; color: #0A0A0A; letter-spacing: -0.01em;">Confirm your email.</h1> | ||
| <p style="font-family: 'Open Sans', Helvetica, Arial, sans-serif; font-size: 15px; color: #5F5E5A; margin: 0 0 28px; line-height: 1.6;">Verify <span style="font-family: 'Courier New', monospace; font-size: 14px; color: #0A0A0A;">{{ $user_email }}</span> to finish setting up your FNid.</p> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td style="padding: 0 40px 28px;"> | ||
| <a href="{{ $verification_link }}" target="_blank" style="display: inline-block; background: #0A0A0A; color: #FFFFFF; text-decoration: none; font-family: 'Open Sans', Helvetica, Arial, sans-serif; font-size: 15px; font-weight: 500; padding: 11px 22px; border-radius: 6px;">Verify email →</a> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td style="padding: 0 40px 28px;"> | ||
| <p style="font-family: 'Open Sans', Helvetica, Arial, sans-serif; font-size: 13px; color: #888780; margin: 0; line-height: 1.6;">Or paste this link into your browser:<br><span style="font-family: 'Courier New', monospace; font-size: 12px; color: #5F5E5A; word-break: break-all;">{{ $verification_link }}</span></p> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td style="padding: 0 40px 24px; border-top: 1px solid #E5E4DE;"> | ||
| <p style="font-family: 'Open Sans', Helvetica, Arial, sans-serif; font-size: 13px; color: #5F5E5A; margin: 20px 0 0; line-height: 1.6;">Didn't sign up for an {!! Config::get('app.app_name') !!} account? You can ignore this email — your account will be inactive without verification.</p> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td style="background: #F5F4EF; padding: 20px 40px; font-family: 'Open Sans', Helvetica, Arial, sans-serif; font-size: 13px; color: #5F5E5A; text-align: center;"> | ||
| Questions? <a href="mailto:{!! Config::get('app.help_email') !!}" style="color: #0C64C8; text-decoration: none;">{!! Config::get('app.help_email') !!}</a> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| @stop | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| <?php namespace Tests\unit; | ||
|
|
||
| /** | ||
| * Copyright 2026 OpenStack Foundation | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| **/ | ||
|
|
||
| use App\Mail\UserEmailVerificationRequest; | ||
| use Auth\User; | ||
| use Illuminate\Support\Facades\Config; | ||
| use Illuminate\Support\Facades\Mail; | ||
| use Illuminate\Support\Facades\Queue; | ||
| use Tests\BrowserKitTestCase; | ||
|
|
||
| class EmailVerificationViewTest extends BrowserKitTestCase | ||
| { | ||
| protected function prepareForTests(): void | ||
| { | ||
| $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.1'; | ||
| Queue::fake(); | ||
| Mail::fake(); | ||
| } | ||
|
|
||
| private function makeUser(string $email): User | ||
| { | ||
| $user = $this->createMock(User::class); | ||
| $user->method('getEmail')->willReturn($email); | ||
| $user->method('getFullName')->willReturn('Preview User'); | ||
| return $user; | ||
| } | ||
|
|
||
| public function testFnVerificationEmailRendersAndSends(): void | ||
| { | ||
| Config::set('app.tenant_name', 'FNTECH'); | ||
|
|
||
| $email = 'preview+fntech@example.com'; | ||
| $verificationLink = 'https://id.fntech.com/verify/abc123deadbeef'; | ||
|
|
||
| $mailable = new UserEmailVerificationRequest($this->makeUser($email), $verificationLink); | ||
|
|
||
| $mailable->assertHasSubject( | ||
| sprintf('[%s] Email verification required', Config::get('app.app_name')) | ||
| ); | ||
| $mailable->assertTo($email); | ||
|
|
||
| $html = $mailable->render(); | ||
|
|
||
| $this->assertStringContainsString('Confirm your email.', $html); | ||
| $this->assertStringContainsString($email, $html); | ||
| $this->assertStringContainsString($verificationLink, $html); | ||
| $this->assertStringContainsString('Verify email', $html); | ||
| $this->assertStringContainsString('paste this link', $html); | ||
| $this->assertStringContainsString('Questions?', $html); | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| $this->assertStringContainsString(Config::get('app.help_email'), $html); | ||
| $this->assertStringNotContainsString('edit your profile', $html); | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.