Skip to content

Commit

Permalink
Merge pull request #19899 from boubkerbribri/selectors-bulk-action-se…
Browse files Browse the repository at this point in the history
…lect-all

Functional tests - Add class to clickable element 'i' in grid header select all
  • Loading branch information
SimonGrn committed Jun 23, 2020
2 parents b4e0211 + 5b41341 commit 09d85c2
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 17 deletions.
Expand Up @@ -29,6 +29,6 @@
class="js-bulk-action-select-all"
id="{{ grid.id }}_grid_bulk_action_select_all"
>
<i class="md-checkbox-control"></i>
<i class="md-checkbox-control grid_bulk_action_select_all"></i>
</label>
</div>
Expand Up @@ -31,7 +31,7 @@ module.exports = class DbBackup extends BOBasePage {
this.dropdownToggleMenu = row => `${this.actionsColumn(row)} div.dropdown-menu`;
this.deleteRowLink = row => `${this.dropdownToggleMenu(row)} a.grid-delete-row-link`;
// Bulk Actions
this.selectAllRowsLabel = `${this.gridPanel} tr.column-filters .md-checkbox i`;
this.selectAllRowsLabel = `${this.gridPanel} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = `${this.gridPanel} button.js-bulk-actions-btn`;
this.bulkActionsDeleteButton = `${this.gridPanel} #backup_grid_bulk_action_delete_backups`;
this.confirmDeleteModal = '#backup-grid-confirm-modal';
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/BO/advancedParameters/email/index.js
Expand Up @@ -27,7 +27,7 @@ module.exports = class Email extends BOBasePage {
this.confirmDeleteModal = '#email_logs-grid-confirm-modal';
this.confirmDeleteButton = `${this.confirmDeleteModal} button.btn-confirm-submit`;
// Bulk Actions
this.selectAllRowsLabel = `${this.emailGridPanel} tr.column-filters .md-checkbox i`;
this.selectAllRowsLabel = `${this.emailGridPanel} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = `${this.emailGridPanel} button.js-bulk-actions-btn`;
this.bulkActionsDeleteButton = '#email_logs_grid_bulk_action_delete_email_logs';
// Email form
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/BO/advancedParameters/team/index.js
Expand Up @@ -32,7 +32,7 @@ module.exports = class Employees extends BOBasePage {
this.filterSearchButton = `${this.employeesListForm} .grid-search-button`;
this.filterResetButton = `${this.employeesListForm} .grid-reset-button`;
// Bulk Actions
this.selectAllRowsLabel = `${this.employeesListForm} tr.column-filters .md-checkbox i`;
this.selectAllRowsLabel = `${this.employeesListForm} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = `${this.employeesListForm} button.dropdown-toggle`;
this.bulkActionsEnableButton = `${this.employeesListForm} #employee_grid_bulk_action_enable_selection`;
this.bulkActionsDisableButton = `${this.employeesListForm} #employee_grid_bulk_action_disable_selection`;
Expand Down
Expand Up @@ -26,7 +26,7 @@ module.exports = class Profiles extends BOBasePage {
this.filterSearchButton = `${this.profilesListForm} .grid-search-button`;
this.filterResetButton = `${this.profilesListForm} .grid-reset-button`;
// Bulk Actions
this.selectAllRowsLabel = `${this.profilesListForm} tr.column-filters .md-checkbox i`;
this.selectAllRowsLabel = `${this.profilesListForm} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = `${this.profilesListForm} button.dropdown-toggle`;
this.bulkActionsDeleteButton = `${this.profilesListForm} #profile_grid_bulk_action_bulk_delete_profiles`;
// Delete modal
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/BO/catalog/brands/index.js
Expand Up @@ -18,7 +18,7 @@ module.exports = class Brands extends BOBasePage {
this.gridTable = table => `#${table}_grid_table`;
this.gridHeaderTitle = table => `${this.gridPanel(table)} h3.card-header-title`;
// Bulk Actions
this.selectAllRowsLabel = table => `${this.gridPanel(table)} tr.column-filters .md-checkbox i`;
this.selectAllRowsLabel = table => `${this.gridPanel(table)} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = table => `${this.gridPanel(table)} button.js-bulk-actions-btn`;
this.confirmDeleteModal = table => `#${table}_grid_confirm_modal`;
this.confirmDeleteButton = 'button.btn-confirm-submit';
Expand Down
6 changes: 3 additions & 3 deletions tests/UI/pages/BO/catalog/categories/index.js
Expand Up @@ -37,7 +37,7 @@ module.exports = class Categories extends BOBasePage {
this.filterSearchButton = `${this.categoriesListForm} .grid-search-button`;
this.filterResetButton = `${this.categoriesListForm} .grid-reset-button`;
// Bulk Actions
this.selectAllRowsDiv = `${this.categoriesListForm} tr.column-filters div.md-checkbox`;
this.selectAllRowsDiv = `${this.categoriesListForm} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = `${this.categoriesListForm} button.dropdown-toggle`;
this.bulkActionsEnableButton = `${this.categoriesListForm} #category_grid_bulk_action_enable_selection`;
this.bulkActionsDisableButton = `${this.categoriesListForm} #category_grid_bulk_action_disable_selection`;
Expand Down Expand Up @@ -267,7 +267,7 @@ module.exports = class Categories extends BOBasePage {
async changeCategoriesEnabledColumnBulkActions(enable = true) {
// Click on Select All
await Promise.all([
this.page.$eval(`${this.selectAllRowsDiv} i`, el => el.click()),
this.page.$eval(this.selectAllRowsDiv, el => el.click()),
this.waitForVisibleSelector(`${this.bulkActionsToggleButton}:not([disabled])`),
]);
// Click on Button Bulk actions
Expand All @@ -288,7 +288,7 @@ module.exports = class Categories extends BOBasePage {
async deleteCategoriesBulkActions(modeID = '0') {
// Click on Select All
await Promise.all([
this.page.$eval(`${this.selectAllRowsDiv} i`, el => el.click()),
this.page.$eval(this.selectAllRowsDiv, el => el.click()),
this.waitForVisibleSelector(`${this.bulkActionsToggleButton}:not([disabled])`),
]);
// Click on Button Bulk actions
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/BO/catalog/files/index.js
Expand Up @@ -31,7 +31,7 @@ module.exports = class Files extends BOBasePage {
this.viewRowLink = row => `${this.dropdownToggleMenu(row)} a.grid-view-row-link`;
this.deleteRowLink = row => `${this.dropdownToggleMenu(row)} a.grid-delete-row-link`;
// Bulk Actions
this.selectAllRowsLabel = `${this.gridPanel} tr.column-filters .md-checkbox i`;
this.selectAllRowsLabel = `${this.gridPanel} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = `${this.gridPanel} button.js-bulk-actions-btn`;
this.bulkActionsDeleteButton = '#attachment_grid_bulk_action_delete_selection';
this.confirmDeleteModal = '#attachment-grid-confirm-modal';
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/BO/catalog/suppliers/index.js
Expand Up @@ -17,7 +17,7 @@ module.exports = class Suppliers extends BOBasePage {
this.gridTable = '#supplier_grid_table';
this.gridHeaderTitle = `${this.gridPanel} h3.card-header-title`;
// Bulk Actions
this.selectAllRowsLabel = `${this.gridPanel} tr.column-filters .md-checkbox i`;
this.selectAllRowsLabel = `${this.gridPanel} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = `${this.gridPanel} button.js-bulk-actions-btn`;
this.bulkActionsEnableButton = `${this.gridPanel} #supplier_grid_bulk_action_suppliers_enable_selection`;
this.bulkActionsDisableButton = `${this.gridPanel} #supplier_grid_bulk_action_suppliers_disable_selection`;
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/BO/customerService/orderMessages/index.js
Expand Up @@ -30,7 +30,7 @@ module.exports = class OrderMessages extends BOBasePage {
this.dropdownToggleMenu = row => `${this.actionsColumn(row)} div.dropdown-menu`;
this.deleteRowLink = row => `${this.dropdownToggleMenu(row)} a.grid-delete-row-link`;
// Bulk Actions
this.selectAllRowsLabel = `${this.gridPanel} tr.column-filters .md-checkbox i`;
this.selectAllRowsLabel = `${this.gridPanel} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = `${this.gridPanel} button.js-bulk-actions-btn`;
this.bulkActionsDeleteButton = '#order_message_grid_bulk_action_delete_selection';
// Delete modal
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/BO/customers/addresses/index.js
Expand Up @@ -27,7 +27,7 @@ module.exports = class Addresses extends BOBasePage {
this.filterSearchButton = `${this.addressesListForm} .grid-search-button`;
this.filterResetButton = `${this.addressesListForm} .grid-reset-button`;
// Bulk Actions
this.selectAllRowsLabel = `${this.addressesListForm} tr.column-filters .md-checkbox i`;
this.selectAllRowsLabel = `${this.addressesListForm} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = `${this.addressesListForm} button.dropdown-toggle`;
this.bulkActionsDeleteButton = '#address_grid_bulk_action_delete_selection';
// Modal Dialog
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/BO/customers/index.js
Expand Up @@ -32,7 +32,7 @@ module.exports = class Customers extends BOBasePage {
this.filterSearchButton = `${this.customersListForm} .grid-search-button`;
this.filterResetButton = `${this.customersListForm} .grid-reset-button`;
// Bulk Actions
this.selectAllRowsLabel = `${this.customersListForm} tr.column-filters .md-checkbox i`;
this.selectAllRowsLabel = `${this.customersListForm} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = `${this.customersListForm} button.dropdown-toggle`;
this.bulkActionsEnableButton = `${this.customersListForm} #customer_grid_bulk_action_enable_selection`;
this.bulkActionsDisableButton = `${this.customersListForm} #customer_grid_bulk_action_disable_selection`;
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/BO/design/pages/index.js
Expand Up @@ -30,7 +30,7 @@ module.exports = class Pages extends BOBasePage {
this.columnNotValidIcon = (table, row) => `${this.listTableColumn(table, row, 'active')}`
+ ' i.grid-toggler-icon-not-valid';
// Bulk Actions
this.selectAllRowsLabel = table => `${this.listForm(table)} tr.column-filters .md-checkbox i`;
this.selectAllRowsLabel = table => `${this.listForm(table)} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = table => `${this.listForm(table)} button.js-bulk-actions-btn`;
this.bulkActionsDeleteButton = table => `#${table}_grid_bulk_action_delete_selection`;
this.bulkActionsEnableButton = table => `#${table}_grid_bulk_action_enable_selection`;
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/BO/orders/index.js
Expand Up @@ -35,7 +35,7 @@ module.exports = class Order extends BOBasePage {
this.gridActionDropDownMenu = '#order-grid-actions-dropdown-menu';
this.gridActionExportLink = '#order-grid-action-export';
// Bulk actions
this.selectAllRowsLabel = `${this.gridPanel} tr.column-filters .md-checkbox i`;
this.selectAllRowsLabel = `${this.gridPanel} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = `${this.gridPanel} button.js-bulk-actions-btn`;
this.bulkUpdateOrdersStatusButton = '#order_grid_bulk_action_change_order_status';
this.tableColumnOrderBulk = row => `${this.tableRow(row)} td.column-orders_bulk`;
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/BO/shopParameters/contact/index.js
Expand Up @@ -26,7 +26,7 @@ module.exports = class Contacts extends BOBasePage {
this.listTableEditLink = row => `${this.contactsListTableActionsColumn(row)} a.grid-edit-row-link`;
this.deleteRowLink = row => `${this.contactsListTableActionsColumn(row)} a.grid-delete-row-link`;
// Bulk Actions
this.selectAllRowsLabel = `${this.contactsGridPanel} tr.column-filters .md-checkbox i`;
this.selectAllRowsLabel = `${this.contactsGridPanel} tr.column-filters .grid_bulk_action_select_all`;
this.bulkActionsToggleButton = `${this.contactsGridPanel} button.js-bulk-actions-btn`;
this.bulkActionsDeleteButton = '#contact_grid_bulk_action_delete_all';
// Sort Selectors
Expand Down

0 comments on commit 09d85c2

Please sign in to comment.