mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
[ADF-4121] Fix tasks-custom-filters test (#4329)
* Fix tasks-custom-filters test * Changed the locators for edit task cloud component to be unique.
This commit is contained in:
parent
b967b77946
commit
bf4d1a2806
@ -51,7 +51,7 @@ export class EditTaskFilterCloudComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getStateFilterDropDownValue() {
|
getStateFilterDropDownValue() {
|
||||||
return element(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-state'] span")).getText();
|
return element.all(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-state'] span")).first().getText();
|
||||||
}
|
}
|
||||||
|
|
||||||
setSortFilterDropDown(option) {
|
setSortFilterDropDown(option) {
|
||||||
@ -65,7 +65,7 @@ export class EditTaskFilterCloudComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getSortFilterDropDownValue() {
|
getSortFilterDropDownValue() {
|
||||||
let elementSort = element(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-sort'] span"));
|
let elementSort = element.all(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-sort'] span")).first();
|
||||||
Util.waitUntilElementIsVisible(elementSort);
|
Util.waitUntilElementIsVisible(elementSort);
|
||||||
return elementSort.getText();
|
return elementSort.getText();
|
||||||
}
|
}
|
||||||
@ -81,11 +81,11 @@ export class EditTaskFilterCloudComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getOrderFilterDropDownValue() {
|
getOrderFilterDropDownValue() {
|
||||||
return element(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-order'] span")).getText();
|
return element.all(by.css("mat-select[data-automation-id='adf-cloud-edit-task-property-order'] span")).first().getText();
|
||||||
}
|
}
|
||||||
|
|
||||||
clickOnDropDownArrow(option) {
|
clickOnDropDownArrow(option) {
|
||||||
let dropDownArrow = element(by.css("mat-form-field[data-automation-id='" + option + "'] div[class*='arrow']"));
|
let dropDownArrow = element.all(by.css("mat-form-field[data-automation-id='" + option + "'] div[class*='arrow']")).first();
|
||||||
Util.waitUntilElementIsVisible(dropDownArrow);
|
Util.waitUntilElementIsVisible(dropDownArrow);
|
||||||
dropDownArrow.click();
|
dropDownArrow.click();
|
||||||
Util.waitUntilElementIsVisible(this.selectedOption);
|
Util.waitUntilElementIsVisible(this.selectedOption);
|
||||||
|
@ -149,7 +149,6 @@ describe('Edit task filters cloud', () => {
|
|||||||
expect(tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('PRIORITY');
|
expect(tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('PRIORITY');
|
||||||
tasksCloudDemoPage.editTaskFilterCloudComponent().clickDeleteButton();
|
tasksCloudDemoPage.editTaskFilterCloudComponent().clickDeleteButton();
|
||||||
tasksCloudDemoPage.customTaskFilter('custom-new').clickTaskFilter();
|
tasksCloudDemoPage.customTaskFilter('custom-new').clickTaskFilter();
|
||||||
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkSpinnerIsDisplayed();
|
|
||||||
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkSpinnerIsNotDisplayed();
|
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkSpinnerIsNotDisplayed();
|
||||||
tasksCloudDemoPage.editTaskFilterCloudComponent().clickCustomiseFilterHeader();
|
tasksCloudDemoPage.editTaskFilterCloudComponent().clickCustomiseFilterHeader();
|
||||||
expect(tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('ID');
|
expect(tasksCloudDemoPage.editTaskFilterCloudComponent().getSortFilterDropDownValue()).toEqual('ID');
|
||||||
|
@ -113,7 +113,7 @@ describe('Task filters cloud', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C290139] Should display only tasks with all states when All is selected from state dropdown', () => {
|
it('[C290139] Should display only tasks with all states when All is selected from state dropdown', () => {
|
||||||
tasksCloudDemoPage.editTaskFilterCloudComponent().clickCustomiseFilterHeader().setAssignment(' ')
|
tasksCloudDemoPage.editTaskFilterCloudComponent().clickCustomiseFilterHeader().clearAssignment()
|
||||||
.setStateFilterDropDown('ALL');
|
.setStateFilterDropDown('ALL');
|
||||||
|
|
||||||
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkContentIsDisplayed(deletedTaskName);
|
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkContentIsDisplayed(deletedTaskName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user