Skip to content

Commit

Permalink
ACS-6323 Fixed e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksanderSklorz committed Dec 9, 2023
1 parent 13c3fa2 commit b71b67d
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export class DataTable extends Component {
cell: '.adf-datatable-cell-container',
lockOwner: '.aca-locked-by',
searchResultsRow: 'aca-search-results-row',
searchResultsRowLine: 'span'
searchResultsRowLine: 'span',
dragIcon: '[data-automation-id="adf-datatable-cell-header-drag-icon-name"]'
};

head = this.byCss('.adf-datatable-header');
Expand Down Expand Up @@ -92,11 +93,17 @@ export class DataTable extends Component {
const sortColumn = await this.getSortedColumnHeaderText();
let sortOrder = await this.getSortingOrder();
if (sortColumn !== label) {
await this.getColumnHeaderByLabel(label).click();
const columnHeader = this.getColumnHeaderByLabel(label);
browser.actions().mouseMove(columnHeader).perform();
await BrowserVisibility.waitUntilElementIsVisible(this.head.element(by.css(DataTable.selectors.dragIcon)));
await columnHeader.click();
sortOrder = await this.getSortingOrder();
}
if (sortOrder !== order) {
await this.getColumnHeaderByLabel(label).click();
const columnHeader = this.getColumnHeaderByLabel(label);
browser.actions().mouseMove(columnHeader).perform();
await BrowserVisibility.waitUntilElementIsVisible(this.head.element(by.css(DataTable.selectors.dragIcon)));
await columnHeader.click();
}
}

Expand Down

0 comments on commit b71b67d

Please sign in to comment.