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:
committed by
Constantin Graf
parent
f9be92894e
commit
12d58ee42c
@@ -51,10 +51,10 @@ class OrganizationInvitationController extends Controller
|
|||||||
// Logged out — banner on /login.
|
// Logged out — banner on /login.
|
||||||
if (! Auth::check()) {
|
if (! Auth::check()) {
|
||||||
return redirect(route('login'))
|
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,
|
'organization' => $organization->name,
|
||||||
]))
|
]))
|
||||||
->with('bannerStyle', 'info');
|
->with('bannerStyle', 'success');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logged in — banner on /dashboard.
|
// Logged in — banner on /dashboard.
|
||||||
|
|||||||
@@ -83,7 +83,9 @@ test.describe('invitation accept banners', () => {
|
|||||||
|
|
||||||
const banner = inviteePage.getByTestId('banner');
|
const banner = inviteePage.getByTestId('banner');
|
||||||
await expect(banner).toBeVisible();
|
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
|
// 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.
|
// by the accept controller, so the inviter's members list shows them.
|
||||||
|
|||||||
@@ -131,8 +131,8 @@ class OrganizationInvitationEndpointTest extends EndpointTestAbstract
|
|||||||
// Assert
|
// Assert
|
||||||
$response->assertValid();
|
$response->assertValid();
|
||||||
$response->assertRedirect(route('login'));
|
$response->assertRedirect(route('login'));
|
||||||
$response->assertSessionHas('bannerText', 'Please log in to finish joining the '.$user->organization->name.' organization.');
|
$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', 'info');
|
$response->assertSessionHas('bannerStyle', 'success');
|
||||||
// Member was added silently — invitation is consumed.
|
// Member was added silently — invitation is consumed.
|
||||||
$this->assertDatabaseHas(Member::class, [
|
$this->assertDatabaseHas(Member::class, [
|
||||||
'user_id' => $invitee->getKey(),
|
'user_id' => $invitee->getKey(),
|
||||||
|
|||||||
Reference in New Issue
Block a user