Logo: Relish

  1. Sign in

Project: My-project

Accepts Invitation

As an Invited User
I want to accept the invitation sent to my email
So that I can be a user of the Agency

Background
Given
that a realm has been provisioned
And
the user has received an invitation via an email and sms
Scenarios
User clicks on the invitation's URL and invitation has not yet expired

By clicking the invitation URL, the user will be taken to the user setup page given
that the invitation has not yet expired

And
a "Validate Invitation" job version "1" is invoked with the following uic:
targets attributes
<ns>;InvitationToken;<existing_invitation_token_id>;1
And
the InvitationToken with id "<existing_invitation_token_id>" is a :non_expired_invitation
When
the request to "Validate Invitation" is received
Then
the "InvitationToken" will be updated with:
attribute value
domain_obj_state accepting
User clicks on the invitation's URL and invitation has expired

A user clicking on an expired invitation URL will take them to an error page.

And
a "Validate Invitation" job version "1" is invoked with the following uic:
targets attributes
<ns>;InvitationToken;<existing_invitation_token_id>;1
And
the InvitationToken with id "<existing_invitation_token_id>" is an :expired_invitation
When
the request to "Validate Invitation" is received
Then
a Context::User::ExpiredInvitationException is raised with the message "Invitation has expired" via the response object
User clicks on the invitation's URL, which has been clicked before

A user clicking on a URL that they have visited before but not yet saved their details,
will let them re-enter their details even if the invitation has expired.

And
a "Validate Invitation" job version "1" is invoked with the following uic:
targets attributes
<ns>;InvitationToken;<existing_invitation_token_id>;1
And
the InvitationToken with id "<existing_invitation_token_id>" is a :visited_invitation
When
the request to "Validate Invitation" is received
Then
no Exception will be raised
And
'the user should be able to continue to enter their details'
User clicks on the invitation's URL, which has been accepted before

A user clicking on an invitation URL that they have previously accepted will take
them to an error page

And
a "Validate Invitation" job version "1" is invoked with the following uic:
targets attributes
<ns>;InvitationToken;<existing_invitation_token_id>;1
And
the InvitationToken with id "<existing_invitation_token_id>" is an :accepted_invitation
When
the request to "Validate Invitation" is received
Then
a Context::User::AlreadyAcceptedInvitationException is raised with the message "Invitation has already been accepted" via the response object
User clicks on the invitation's URL, where the invite is already cancelled

A user clicking on a URL to a cancelled invitation will take them to an error page

And
a "Validate Invitation" job version "1" is invoked with the following uic:
targets attributes
<ns>;InvitationToken;<existing_invitation_token_id>;1
And
the InvitationToken with id "<existing_invitation_token_id>" is a :cancelled_invitation
When
the request to "Validate Invitation" is received
Then
an Context::User::CancelledInvitationException is raised with the message "Invitation has already been cancelled" via the response object
User without a base profile has visited the invitation before and now submits their details.

This is a valid scenario where the user does not have a base profile and has received an invitation to join a realm.
The user (with Property Manager role) has entered his/her secret key they received via sms/email and now wishes
to submit this detail. This scenario assumes that there is already a realm admin in the system and that the realm
is in an active state.

Given
an "Accept Invitation" job version "1" is invoked with the following uic:
targets attributes
<ns>;Platform;<platform_id>;1
<ns>;BaseUserProfile;<base_profile_id>;0 <base_profile_id>;linkedin_url;linkedin.com/bopeep
<base_profile_id>;facebook_url;facebook.com/bopeep
<base_profile_id>;email;[email protected]
<base_profile_id>;tracking_id;some_tracking_id
<ns>;InvitationToken;<existing_invitation_token_id>;1
And
the InvitationToken with id "<existing_invitation_token_id>" is an :invitation_in_accepting_state
When
the request to "Accept Invitation" is received
Then
the "BaseUserProfile" will be created with:
attribute value
email [email protected]
linkedin_url linkedin.com/bopeep
facebook_url facebook.com/bopeep
tracking_id some_tracking_id
domain_obj_state active
And
the "InvitationToken" will be updated with:
attribute value
domain_obj_state accepted
And
a :successful_creation_of_user_account_email will be created
And
a :activate_notification_preferences_followon_command will be created
And
the "UserProfile" associated to the Invitation will be active
And
'users who are interested in the user_invited event will be notified via commands'

Last published over 4 years ago by nbeagley.