Skip to content
Snippets Groups Projects
Commit fac6f82e authored by VBaldych's avatar VBaldych Committed by Taras Kruts
Browse files

Issue #3439386: Remove extra "to" in enrolees/members form confirmation messages


Issue #3439386: refactor event-bulk.feature regarding Behat Linter

Updates: (deps): Update drupal/profile requirement from 1.8.0 to 1.10.0

Updates the requirements on drupal/profile to permit the latest version.

---
updated-dependencies:
- dependency-name: drupal/profile
  dependency-type: direct:production
...

Signed-off-by: default avatardependabot[bot] <support@github.com>

Added the new patch for the new version from Profile

Issue #3439386: Refactor test & add translation
parent 33ec52b5
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ class SocialEventManagersViewsBulkOperationsConfirmAction extends ConfirmAction
$form['description'] = [
'#markup' => $this->formatPlural($form_data['selected_count'],
'Are you sure you want to "%action" the following enrollee?',
'Are you sure you want to "%action" the following %count enrollees?',
'Are you sure you want to "%action" the following %count enrollees? ',
[
'%action' => $form_data['action_label'],
'%count' => $form_data['selected_count'],
......@@ -34,7 +34,7 @@ class SocialEventManagersViewsBulkOperationsConfirmAction extends ConfirmAction
$form['description'] = [
'#markup' => $this->formatPlural($form_data['selected_count'],
'Are you sure you want to send your email to the following enrollee?',
'Are you sure you want to send your email to to the following %count enrollees?',
'Are you sure you want to send your email to the following %count enrollees?',
[
'%action' => $form_data['action_label'],
'%count' => $form_data['selected_count'],
......
......@@ -34,7 +34,7 @@ class SocialGroupViewsBulkOperationsConfirmAction extends ConfirmAction {
$form['description'] = [
'#markup' => $this->formatPlural($form_data['selected_count'],
'Are you sure you want to send your email to the following member?',
'Are you sure you want to send your email to to the following %count members?',
'Are you sure you want to send your email to the following %count members? ',
[
'%action' => $form_data['action_label'],
'%count' => $form_data['selected_count'],
......
@api @javascript @event @eventenrollment @stability @perfect @TB-5917 @profile @stability-3 @event-bulk
@api @javascript
Feature: Event bulk actions
Benefit: In order to attend an Event
Role: LU
Goal/desire: I want to be able to use bulk actions for events enrollees
@email-spool @event-bulk-emails
Scenario: Successfully send bulk emails to enrollees
Scenario: Send bulk emails to enrollees by event author
Given I enable the module "social_event_an_enroll"
Given I enable the module "social_event_an_enroll_enrolments_export"
And I enable the module "social_event_an_enroll_enrolments_export"
Given users:
And users:
| name | mail | status |
| event_author | event_author@example.com | 1 |
| event_attendee_1 | event_attendee_1@example.com | 1 |
| event_attendee_2 | event_attendee_2@example.com | 1 |
| event_attendee_3 | event_attendee_3@example.com | 1 |
Given event content:
And event content:
| title | field_event_date | status | field_content_visibility | field_event_an_enroll | author |
| Bulk email Event | +2 days | 1 | public | 1 | event_author |
# Add enrollees to the event directly by sitemanager.
Given I am logged in as an "sitemanager"
When I open the "event" node with title "Bulk email Event"
And I should see "Bulk email Event" in the "Hero block"
And I should see "Manage enrollments"
And I click "Manage enrollments"
Then I should see "Add enrollees"
When I click the xth "1" element with the css ".btn.dropdown-toggle"
Then I should see "Add directly"
When I click "Add directly"
Then I should see "Find people by name or email address"
And I fill in select2 input ".form-type-select" with "event_attendee_1@example.com" and select "event_attendee_1@example.com"
And I press "Save"
Then I should see "Add enrollees"
When I click the xth "1" element with the css ".btn.dropdown-toggle"
Then I should see "Add directly"
When I click "Add directly"
Then I should see "Find people by name or email address"
And I fill in select2 input ".form-type-select" with "event_attendee_2@example.com" and select "event_attendee_2@example.com"
And I press "Save"
Then I should see "Add enrollees"
When I click the xth "1" element with the css ".btn.dropdown-toggle"
Then I should see "Add directly"
When I click "Add directly"
Then I should see "Find people by name or email address"
And I fill in select2 input ".form-type-select" with "event_attendee_3@example.com" and select "event_attendee_3@example.com"
And I press "Save"
# Add enrollments to event
When I am logged in as an "sitemanager"
# Send bulk emails.
Given I am logged in as "event_author"
When I open the "event" node with title "Bulk email Event"
Then I should see "Bulk email Event" in the "Hero block"
And I should see "Manage enrollments"
When I click "Manage enrollments"
And I check the box "edit-select-all"
Then I should see the button "Actions"
When I click the xth "0" element with the css "#vbo-action-form-wrapper .dropdown .dropdown-toggle"
Then I should see the link "Email selected enrollees"
When I click "Email selected enrollees"
Then I should see "Configure the email you want to send to the 3 enrollees you have selected."
When I fill in the following:
And I open the "event" node with title "Bulk email Event"
And I should see "Bulk email Event" in the "Hero block"
And I should see "Manage enrollments"
And I click "Manage enrollments"
And I should see "Add enrollees"
And I click the xth "1" element with the css ".btn.dropdown-toggle"
And I should see "Add directly"
And I click "Add directly"
And I should see "Find people by name or email address"
And I fill in select2 input ".form-type-select" with "event_attendee_1@example.com" and select "event_attendee_1@example.com"
And I press "Save"
And I should see "Add enrollees"
And I click the xth "1" element with the css ".btn.dropdown-toggle"
And I should see "Add directly"
And I click "Add directly"
And I should see "Find people by name or email address"
And I fill in select2 input ".form-type-select" with "event_attendee_2@example.com" and select "event_attendee_2@example.com"
And I press "Save"
And I should see "Add enrollees"
And I click the xth "1" element with the css ".btn.dropdown-toggle"
And I should see "Add directly"
And I click "Add directly"
And I should see "Find people by name or email address"
And I fill in select2 input ".form-type-select" with "event_attendee_3@example.com" and select "event_attendee_3@example.com"
And I press "Save"
# Test bulk email sending
Then I am logged in as "event_author"
And I open the "event" node with title "Bulk email Event"
And I should see "Bulk email Event" in the "Hero block"
And I should see "Manage enrollments"
And I click "Manage enrollments"
And I check the box "edit-select-all"
And I should see the button "Actions"
And I click the xth "0" element with the css "#vbo-action-form-wrapper .dropdown .dropdown-toggle"
And I should see the link "Email selected enrollees"
And I click "Email selected enrollees"
And I should see "Configure the email you want to send to the 3 enrollees you have selected."
And I fill in the following:
| Subject | Test subject |
And I fill in the "edit-message-value" WYSIWYG editor with "Test message"
And I press "Send email"
Then I should see "Are you sure you want to send your email to to the following 3 enrollees?"
And I press "Execute action"
And I wait for AJAX to finish
# And I wait for the queue to be empty
And I run cron
# Check if emails have been sent.
And I fill in the "edit-message-value" WYSIWYG editor with "Test message"
And I press "Send email"
And I should see "Are you sure you want to send your email to the following 3 enrollees?"
And I press "Execute action"
And I wait for AJAX to finish
# And I wait for the queue to be empty
And I run cron
# Check if emails have been sent.
And I should have an email with subject "Test subject" and in the content:
| content |
| Hi event_attendee_1 |
| Test message |
And I should have an email with subject "Test subject" and in the content:
| content |
| Hi event_attendee_2 |
| Test message |
And I should have an email with subject "Test subject" and in the content:
| content |
| Hi event_attendee_3 |
......
......@@ -179,3 +179,5 @@ new PluralTranslatableMarkup(0, '1 attachment.', '@count attachments.');
// String added because original one was changed due to #3420469 issue.
new TranslatableMarkup('Resend invites for group members');
// String added because original one was changed due to #3439386 issue.
new TranslatableMarkup('Are you sure you want to send your email to to the following %count enrollees?');
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment