Skip to content

Commit

Permalink
TE: Refactoring code + Add missing semicolon
Browse files Browse the repository at this point in the history
  • Loading branch information
hadrich-hatem committed Mar 29, 2018
1 parent 8037259 commit d71a97f
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 240 deletions.
6 changes: 3 additions & 3 deletions tests/E2E/test/campaigns/common_scenarios/discount.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module.exports = {
test('should search for the created cart rule', () => {
return promise
.then(() => client.isVisible(DiscountSubMenu.cartRules.filter_name_input))
.then(() => client.searchByName(DiscountSubMenu.cartRules.filter_name_input, DiscountSubMenu.cartRules.filter_search_button, cartRuleData.name))
.then(() => client.searchByName(DiscountSubMenu.cartRules.filter_name_input, DiscountSubMenu.cartRules.filter_search_button, cartRuleData.name));
});
test('should click on "Edit" button', () => client.waitForExistAndClick(DiscountSubMenu.cartRules.edit_button));
test('should check the cart rule\'s "Name"', () => client.checkAttributeValue(DiscountSubMenu.cartRules.name_input, 'value', cartRuleData.name));
Expand All @@ -90,7 +90,7 @@ module.exports = {
return promise
.then(() => client.isVisible(DiscountSubMenu.cartRules.filter_name_input))
.then(() => client.searchByName(DiscountSubMenu.cartRules.filter_name_input, DiscountSubMenu.cartRules.filter_search_button, cartRuleData.name))
.then(() => client.editObjectData(cartRuleData))
.then(() => client.editObjectData(cartRuleData));
});
test('should click on "Edit" button', () => client.waitForExistAndClick(DiscountSubMenu.cartRules.edit_button));
test('should set the "Name" input', () => client.waitAndSetValue(DiscountSubMenu.cartRules.name_input, cartRuleData.name));
Expand All @@ -108,7 +108,7 @@ module.exports = {
test('should search for the created cart rule', () => {
return promise
.then(() => client.isVisible(DiscountSubMenu.cartRules.filter_name_input))
.then(() => client.searchByName(DiscountSubMenu.cartRules.filter_name_input, DiscountSubMenu.cartRules.filter_search_button, name))
.then(() => client.searchByName(DiscountSubMenu.cartRules.filter_name_input, DiscountSubMenu.cartRules.filter_search_button, name));
});
test('should click on "Dropdown toggle" button', () => client.waitForExistAndClick(DiscountSubMenu.cartRules.dropdown_button));
test('should click on "Delete" button', () => client.waitForExistAndClick(DiscountSubMenu.cartRules.delete_button));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const {Taxes} = require('../../../../selectors/BO/international/taxes');
const {InternationalPage} = require('../../../../selectors/BO/international/index');
const {Menu} = require('../../../../selectors/BO/menu.js');
const {Taxes} = require('../../selectors/BO/international/taxes');
const {InternationalPage} = require('../../selectors/BO/international/index');
const {Menu} = require('../../selectors/BO/menu.js');
let promise = Promise.resolve();

module.exports = {
/**
* Exemple of tax rule data
* Example of tax rule data
* var taxData = {
* name: 'name_tax_rule',
* tax_value: 'tax_value',
Expand Down Expand Up @@ -54,7 +54,7 @@ module.exports = {
return promise
.then(() => client.waitForExistAndClick(Taxes.taxRules.dropdown_button))
.then(() => client.waitForExistAndClick(Taxes.taxRules.delete_button))
.then(() => client.alertAccept())
.then(() => client.alertAccept());
});
test('should verify the appearance of the green validation', () => client.checkTextValue(InternationalPage.success_panel, '×\nSuccessful deletion.'));
}, 'common_client');
Expand All @@ -70,7 +70,7 @@ module.exports = {
test('should click on "Delete" action', () => {
return promise
.then(() => client.waitForExistAndClick(Taxes.taxRules.action_group_button.replace('%ID', 5)))
.then(() => client.alertAccept())
.then(() => client.alertAccept());
});
test('should verify the appearance of the green validation', () => client.checkTextValue(InternationalPage.success_panel, '×\nThe selection has been successfully deleted.'));
}, 'common_client');
Expand Down
73 changes: 0 additions & 73 deletions tests/E2E/test/campaigns/full/04_attribute/1_create_attribute.js

This file was deleted.

48 changes: 0 additions & 48 deletions tests/E2E/test/campaigns/full/04_attribute/2_update_attribute.js

This file was deleted.

This file was deleted.

38 changes: 0 additions & 38 deletions tests/E2E/test/campaigns/full/04_attribute/4_delete_attribute.js

This file was deleted.

Loading

0 comments on commit d71a97f

Please sign in to comment.