-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9111 from hadrich-hatem/languages
Languages
- Loading branch information
Showing
28 changed files
with
356 additions
and
38 deletions.
There are no files selected for viewing
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
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
140 changes: 140 additions & 0 deletions
140
tests/E2E/test/campaigns/common_scenarios/localization.js
Large diffs are not rendered by default.
Oops, something went wrong.
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
109 changes: 109 additions & 0 deletions
109
...est/campaigns/full/11_international/1_localization/1_create_edit_delete_language_in_BO.js
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,109 @@ | ||
const {AccessPageBO} = require('../../../../selectors/BO/access_page'); | ||
const {AccessPageFO} = require('../../../../selectors/FO/access_page'); | ||
const common_scenarios = require('../../../common_scenarios/localization'); | ||
|
||
let languageData = [{ | ||
name: 'Spanish', | ||
iso_code: 'ES', | ||
language_code: 'ES', | ||
date_format: 'Y-m-d', | ||
date_format_full: 'Y-m-d H:i:s', | ||
flag_file: 'language_spanish_flag.png', | ||
no_picture_file: 'no_image_available.png', | ||
is_rtl: 'off', | ||
status: 'on' | ||
}, { | ||
name: 'Farsi', | ||
iso_code: 'FA', | ||
language_code: 'FA', | ||
date_format: 'Y-m-d', | ||
date_format_full: 'Y-m-d H:i:s', | ||
flag_file: 'language_farsi_flag.png', | ||
no_picture_file: 'no_image_available.png', | ||
is_rtl: 'on', | ||
status: 'on' | ||
}], languageEditedData = [{ | ||
name: 'Spanishh', | ||
iso_code: 'ES', | ||
language_code: 'ES', | ||
date_format: 'Y-m-d', | ||
date_format_full: 'Y-m-d H:i:s', | ||
flag_file: 'language_spanish_flag.png', | ||
no_picture_file: 'no_image_available.png', | ||
is_rtl: 'off', | ||
status: 'on' | ||
}, { | ||
name: 'Spanishh', | ||
iso_code: 'ES', | ||
language_code: 'ES', | ||
date_format: 'Y-m-d', | ||
date_format_full: 'Y-m-d H:i:s', | ||
flag_file: 'language_spanish_flag.png', | ||
no_picture_file: 'no_image_available.png', | ||
is_rtl: 'off', | ||
status: 'off' | ||
}]; | ||
|
||
scenario('Create, edit, delete and check "Languages" in the Back Office', () => { | ||
scenario('Open the browser and connect to the Back Office', client => { | ||
test('should open the browser', () => client.open()); | ||
test('should log in successfully in the Back Office', () => client.signInBO(AccessPageBO)); | ||
}, 'common_client'); | ||
|
||
scenario('Test 1: Create, check language in the Back Office and check it in the Front Office', () => { | ||
common_scenarios.createLanguage(languageData[0]); | ||
common_scenarios.checkLanguageBO(languageData[0]); | ||
scenario('Go to the Front Office', client => { | ||
test('should go to the Front Office', () => client.accessToFO(AccessPageFO)); | ||
}, 'common_client'); | ||
common_scenarios.checkLanguageFO(languageData[0]); | ||
}, 'common_client'); | ||
|
||
scenario('Test 2: Create, check language in the Back Office and check it in the Front Office', () => { | ||
scenario('Go back to the Back Office', client => { | ||
test('should go back to the Back Office', () => client.accessToBO(AccessPageBO)); | ||
}, 'common_client'); | ||
common_scenarios.createLanguage(languageData[1]); | ||
common_scenarios.checkLanguageBO(languageData[1]); | ||
common_scenarios.generateRtlStylesheet(); | ||
scenario('Go to the Front Office', client => { | ||
test('should go to the Front Office', () => client.accessToFO(AccessPageFO)); | ||
}, 'common_client'); | ||
common_scenarios.checkLanguageFO(languageData[1]); | ||
}, 'common_client'); | ||
|
||
scenario('Test 3: Edit the created language in the Back Office and check it in the Front Office', () => { | ||
scenario('Go back to the Back Office', client => { | ||
test('should go back to the Back Office', () => client.accessToBO(AccessPageBO)); | ||
}, 'common_client'); | ||
common_scenarios.editLanguage(languageData[0].name, languageEditedData[0]); | ||
scenario('Go to the Front Office', client => { | ||
test('should go to the Front Office', () => client.accessToFO(AccessPageFO)); | ||
}, 'common_client'); | ||
common_scenarios.checkLanguageFO(languageEditedData[0]); | ||
scenario('Go back to the Back Office', client => { | ||
test('should go back to the Back Office', () => client.accessToBO(AccessPageBO)); | ||
}, 'common_client'); | ||
common_scenarios.editLanguage(languageData[0].name, languageEditedData[1]); | ||
scenario('Go to the Front Office', client => { | ||
test('should go to the Front Office', () => client.accessToFO(AccessPageFO)); | ||
}, 'common_client'); | ||
common_scenarios.checkLanguageFO(languageEditedData[1]); | ||
}, 'common_client'); | ||
|
||
scenario('Test 4: Delete the created languages in the Back Office and check it in the Front Office', () => { | ||
scenario('Go back to the Back Office', client => { | ||
test('should go back to the Back Office', () => client.accessToBO(AccessPageBO)); | ||
}, 'common_client'); | ||
common_scenarios.deleteLanguage(languageData[1].name); | ||
common_scenarios.deleteLanguage(languageEditedData[1].name); | ||
scenario('Go to the Front Office', client => { | ||
test('should go to the Front Office', () => client.accessToFO(AccessPageFO)); | ||
}, 'common_client'); | ||
common_scenarios.checkLanguageFO(languageData[1], true); | ||
}, 'common_client'); | ||
scenario('Logout from the Back Office', client => { | ||
test('should go back to the Back Office', () => client.accessToBO(AccessPageBO)); | ||
test('should logout successfully from the Back Office', () => client.signOutBO()); | ||
}, 'common_client'); | ||
}, 'common_client', true); |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.