Skip to content
Snippets Groups Projects
Commit a28ffb00 authored by Claudiu Cristea's avatar Claudiu Cristea
Browse files

Merge branch 'ISAICP-9624' into 'develop'

ISAICP-9624: Subscription to solutions is not valid unless users checks the notification box.

See merge request digit/digit-joinup-dev!2029
parents 41700427 0a030ca0
No related branches found
No related tags found
1 merge request!215Release 2.3.2
...@@ -205,3 +205,21 @@ Feature: Subscribing to a solution ...@@ -205,3 +205,21 @@ Feature: Subscribing to a solution
| | Unsubscribe | | | Unsubscribe |
| author | Leave this solution | | author | Leave this solution |
| facilitator | Leave this solution | | facilitator | Leave this solution |
@javascript
Scenario: Logged users can subscribe to a solution without receiving notifications
# Regression test for ISAICP-9624.
Given users:
| Username |
| Rita Lavish |
When I am logged in as "Rita Lavish"
And I go to the "Some solution to subscribe" solution
Then I should see the button "Subscribe to this solution"
When I press "Subscribe to this solution"
Then a modal should open
And I should see the text "You're now an active member of this space and ready to participate fully!" in the "Modal content"
And I should see the text "You can update your notification preferences from your profile page at any time." in the "Modal content"
And I wait for 1 second
And I press "Confirm" in the "Modal buttons" region
Then I should see the success message "You have subscribed to this solution and will receive notifications for it. To manage your subscriptions go to My subscriptions in your user menu."
...@@ -321,11 +321,11 @@ public function submitForm(array &$form, FormStateInterface $form_state): void { ...@@ -321,11 +321,11 @@ public function submitForm(array &$form, FormStateInterface $form_state): void {
return; return;
} }
if ($subscribe) {
$membership = $this->createSaveNewMembership(OgMembershipInterface::STATE_ACTIVE, $this->getUser(), $node); $membership = $this->createSaveNewMembership(OgMembershipInterface::STATE_ACTIVE, $this->getUser(), $node);
if ($subscribe) {
$membership = $this->subscribe($membership); $membership = $this->subscribe($membership);
$this->messenger->addStatus($node->getNewMembershipSuccessMessage($membership));
} }
$this->messenger->addStatus($node->getNewMembershipSuccessMessage($membership));
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment