mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
rephrase logged out user invite accept message to clarify that the
invite was accepted
This commit is contained in:
@@ -51,10 +51,10 @@ class OrganizationInvitationController extends Controller
|
||||
// Logged out — banner on /login.
|
||||
if (! Auth::check()) {
|
||||
return redirect(route('login'))
|
||||
->with('bannerText', __('Please log in to finish joining the :organization organization.', [
|
||||
->with('bannerText', __('Great! You have accepted the invitation to join the :organization organization. Please log in to access it.', [
|
||||
'organization' => $organization->name,
|
||||
]))
|
||||
->with('bannerStyle', 'info');
|
||||
->with('bannerStyle', 'success');
|
||||
}
|
||||
|
||||
// Logged in — banner on /dashboard.
|
||||
|
||||
@@ -83,7 +83,9 @@ test.describe('invitation accept banners', () => {
|
||||
|
||||
const banner = inviteePage.getByTestId('banner');
|
||||
await expect(banner).toBeVisible();
|
||||
await expect(banner).toContainText(/Please log in to finish joining the .* organization\./);
|
||||
await expect(banner).toContainText(
|
||||
/Great! You have accepted the invitation to join the .* organization\. Please log in to access it\./
|
||||
);
|
||||
|
||||
// Logging in lands the invitee on the dashboard — they were already added silently
|
||||
// by the accept controller, so the inviter's members list shows them.
|
||||
|
||||
@@ -131,8 +131,8 @@ class OrganizationInvitationEndpointTest extends EndpointTestAbstract
|
||||
// Assert
|
||||
$response->assertValid();
|
||||
$response->assertRedirect(route('login'));
|
||||
$response->assertSessionHas('bannerText', 'Please log in to finish joining the '.$user->organization->name.' organization.');
|
||||
$response->assertSessionHas('bannerStyle', 'info');
|
||||
$response->assertSessionHas('bannerText', 'Great! You have accepted the invitation to join the '.$user->organization->name.' organization. Please log in to access it.');
|
||||
$response->assertSessionHas('bannerStyle', 'success');
|
||||
// Member was added silently — invitation is consumed.
|
||||
$this->assertDatabaseHas(Member::class, [
|
||||
'user_id' => $invitee->getKey(),
|
||||
|
||||
Reference in New Issue
Block a user