Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BAP-17336: Emails in Recipient Language (#19852)
* Merge with feature/BAP-17336_2.6 - fix unit tests to use new fqcn for phpunit classes - Behat tests for RFQ (#19805) - fix guest customer user case - added steps related to sales representatives - pass subject for MassNotification
- Loading branch information
1 parent
076b304
commit 4ad7dfe
Showing
2 changed files
with
157 additions
and
1 deletion.
There are no files selected for viewing
156 changes: 156 additions & 0 deletions
156
...dle/Tests/Behat/Features/localized_email_notification_after_contact_import_export.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
@regression | ||
@ticket-BAP-17336 | ||
@fixture-OroUserBundle:UserLocalizations.yml | ||
|
||
Feature: Localized email notification after contact import export | ||
In order to import and export contact | ||
As an admin | ||
I should receive import/export emails in predefined language | ||
|
||
Scenario: Prepare configuration with different languages on each level | ||
Given I login as administrator | ||
And I go to System / Configuration | ||
And I follow "System Configuration/General Setup/Language Settings" on configuration sidebar | ||
And I fill form with: | ||
| Supported Languages | [English, German, French] | | ||
| Use Default | false | | ||
| Default Language | French | | ||
And I submit form | ||
Then I should see "Configuration saved" flash message | ||
When I go to System / User Management / Organizations | ||
And click Configuration "Oro" in grid | ||
And I follow "System Configuration/General Setup/Language Settings" on configuration sidebar | ||
And I fill form with: | ||
| Use System | false | | ||
| Default Language | German | | ||
And I submit form | ||
Then I should see "Configuration saved" flash message | ||
When I click My Configuration in user menu | ||
And I follow "System Configuration/General Setup/Language Settings" on configuration sidebar | ||
And I fill form with: | ||
| Use Organization | false | | ||
| Default Language | English | | ||
And I submit form | ||
Then I should see "Configuration saved" flash message | ||
|
||
Scenario: A user should get an email in a language of its configuration after import of correct CSV file | ||
Given I go to System / Emails / Templates | ||
When I filter Template Name as is equal to "import_result" | ||
And I click "edit" on first row in grid | ||
And fill "Email Template Form" with: | ||
| Subject | English Import Result Subject | | ||
| Content | English Import Result Body | | ||
And I click "French" | ||
And fill "Email Template Form" with: | ||
| Subject | French Import Result Subject | | ||
| Content | French Import Result Body | | ||
And I click "German" | ||
And fill "Email Template Form" with: | ||
| Subject | German Import Result Subject | | ||
| Content | German Import Result Body | | ||
And I submit form | ||
Then I should see "Template saved" flash message | ||
|
||
When go to Customers / Contacts | ||
And I download "Contacts" Data Template file | ||
And I fill template with data: | ||
| First Name | Last Name | Owner Id | | ||
| Some | New | 1 | | ||
And I import file | ||
Then Email should contains the following: | ||
| To | admin@example.com | | ||
| Subject | English Import Result Subject | | ||
| Body | English Import Result Body | | ||
|
||
Scenario: A user should get an email in a language of its configuration after validation of CSV file | ||
Given I go to System / Emails / Templates | ||
When I filter Template Name as is equal to "import_validation_result" | ||
And I click "edit" on first row in grid | ||
And fill "Email Template Form" with: | ||
| Subject | English Import Validation Result Subject | | ||
| Content | English Import Validation Result Body | | ||
And I click "French" | ||
And fill "Email Template Form" with: | ||
| Subject | French Import Validation Result Subject | | ||
| Content | French Import Validation Result Body | | ||
And I click "German" | ||
And fill "Email Template Form" with: | ||
| Subject | German Import Validation Result Subject | | ||
| Content | German Import Validation Result Body | | ||
And I submit form | ||
Then I should see "Template saved" flash message | ||
|
||
When go to Customers / Contacts | ||
And I download "Contacts" Data Template file | ||
And I fill template with data: | ||
| First Name | Last Name | Owner Id | | ||
| Some Some | New New | 1 | | ||
And I validate file | ||
Then Email should contains the following: | ||
| To | admin@example.com | | ||
| Subject | English Import Validation Result Subject | | ||
| Body | English Import Validation Result Body | | ||
|
||
Scenario: Prepare export and datagrid export templates | ||
Given I go to System / Emails / Templates | ||
When I filter Template Name as is equal to "export_result" | ||
And I click "edit" on first row in grid | ||
And fill "Email Template Form" with: | ||
| Subject | English Export Result Subject | | ||
| Content | English Export Result Body | | ||
And I click "French" | ||
And fill "Email Template Form" with: | ||
| Subject | French Export Result Subject | | ||
| Content | French Export Result Body | | ||
And I click "German" | ||
And fill "Email Template Form" with: | ||
| Subject | German Export Result Subject | | ||
| Content | German Export Result Body | | ||
And I submit form | ||
Then I should see "Template saved" flash message | ||
When I go to System / Emails / Templates | ||
And I filter Template Name as is equal to "datagrid_export_result" | ||
And I click "edit" on first row in grid | ||
And fill "Email Template Form" with: | ||
| Subject | English Grid Export Result Subject | | ||
| Content | English Grid Export Result Body | | ||
And I click "French" | ||
And fill "Email Template Form" with: | ||
| Subject | French Grid Export Result Subject | | ||
| Content | French Grid Export Result Body | | ||
And I click "German" | ||
And fill "Email Template Form" with: | ||
| Subject | German Grid Export Result Subject | | ||
| Content | German Grid Export Result Body | | ||
And I submit form | ||
Then I should see "Template saved" flash message | ||
|
||
Scenario: A user should get an export result email in a language of its configuration | ||
Given I click My Configuration in user menu | ||
When I follow "System Configuration/General Setup/Language Settings" on configuration sidebar | ||
And I fill form with: | ||
| Use Organization | true | | ||
And I submit form | ||
Then I should see "Configuration saved" flash message | ||
When go to Customers / Contacts | ||
And I click "Export" | ||
Then Email should contains the following: | ||
| To | admin@example.com | | ||
| Subject | German Export Result Subject | | ||
| Body | German Export Result Body | | ||
|
||
Scenario: A user should get grid export result email in a language of its configuration | ||
Given I go to System / User Management / Organizations | ||
When click Configuration "Oro" in grid | ||
And I follow "System Configuration/General Setup/Language Settings" on configuration sidebar | ||
And I fill form with: | ||
| Use System | true | | ||
And I submit form | ||
Then I should see "Configuration saved" flash message | ||
When go to Customers / Contacts | ||
And I click "Export Grid" | ||
And I click "CSV" | ||
Then Email should contains the following: | ||
| To | admin@example.com | | ||
| Subject | French Grid Export Result Subject | | ||
| Body | French Grid Export Result Body | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters