diff --git a/docs/process-services-cloud/claim-task.directive.md b/docs/process-services-cloud/claim-task.directive.md
new file mode 100644
index 0000000000..97ccdd8e80
--- /dev/null
+++ b/docs/process-services-cloud/claim-task.directive.md
@@ -0,0 +1,26 @@
+---
+Title: Claim Task Directive
+Added: v3.1.0
+Status: Experimental
+Last reviewed: 2019-03-05
+---
+
+# [Claim task directive](../../lib/process-services-cloud/src/lib/task/directives/claim-task.directive.ts "Defined in claim-task.directive.ts")
+
+Claim a task
+
+## Basic Usage
+
+```html
+
+```
+## Class members
+
+### Properties
+
+| Name | Type | Default value | Description |
+| ---- | ---- | ------------- | ----------- |
+| taskId | `string` | empty |(Required) The id of the task. |
+| appName | `string` | empty | (Required) The name of the application. |
+| success | `EventEmitter` | empty | Emitted when the task is completed. |
+| error | `EventEmitter` | empty | Emitted when the task cannot be completed. |
\ No newline at end of file
diff --git a/docs/process-services-cloud/unclaim-tas.directie.md b/docs/process-services-cloud/unclaim-tas.directie.md
new file mode 100644
index 0000000000..1bdebdf9b0
--- /dev/null
+++ b/docs/process-services-cloud/unclaim-tas.directie.md
@@ -0,0 +1,26 @@
+---
+Title: Unclaim Task Directive
+Added: v3.1.0
+Status: Experimental
+Last reviewed: 2019-03-05
+---
+
+# [Unclaim task directive](../../lib/process-services-cloud/src/lib/task/directives/unclaim-task.directive.ts "Defined in unclaim-task.directive.ts")
+
+Unclaim a task
+
+## Basic Usage
+
+```html
+
+```
+## Class members
+
+### Properties
+
+| Name | Type | Default value | Description |
+| ---- | ---- | ------------- | ----------- |
+| taskId | `string` | empty |(Required) The id of the task. |
+| appName | `string` | empty | (Required) The name of the application. |
+| success | `EventEmitter` | empty | Emitted when the task is completed. |
+| error | `EventEmitter` | empty | Emitted when the task cannot be completed. |
\ No newline at end of file
diff --git a/e2e/pages/adf/contentServicesPage.ts b/e2e/pages/adf/contentServicesPage.ts
index ccf4e9291c..8c5f4cdcf0 100644
--- a/e2e/pages/adf/contentServicesPage.ts
+++ b/e2e/pages/adf/contentServicesPage.ts
@@ -544,7 +544,7 @@ export class ContentServicesPage {
}
checkLockIsDisplayedForElement(name) {
- const lockButton = element(by.css(`div.adf-datatable-cell[filename="${name}"] button`));
+ const lockButton = element(by.css(`div.adf-datatable-cell[data-automation-id="${name}"] button`));
Util.waitUntilElementIsVisible(lockButton);
}
@@ -553,7 +553,7 @@ export class ContentServicesPage {
}
async getStyleValueForRowText(rowName, styleName) {
- const row = element(by.css(`div.adf-datatable-cell[filename="${rowName}"] span.adf-datatable-cell-value[title="${rowName}"]`));
+ const row = element(by.css(`div.adf-datatable-cell[data-automation-id="${rowName}"] span.adf-datatable-cell-value[title="${rowName}"]`));
Util.waitUntilElementIsVisible(row);
return row.getCssValue(styleName);
}
@@ -577,7 +577,7 @@ export class ContentServicesPage {
}
checkIconForRowIsDisplayed(fileName) {
- const iconRow = element(by.css(`.adf-document-list-container div.adf-datatable-cell[filename="${fileName}"] img`));
+ const iconRow = element(by.css(`.adf-document-list-container div.adf-datatable-cell[data-automation-id="${fileName}"] img`));
Util.waitUntilElementIsVisible(iconRow);
return iconRow;
}
@@ -607,17 +607,17 @@ export class ContentServicesPage {
}
getDocumentCardIconForElement(elementName) {
- const elementIcon = element(by.css(`.adf-document-list-container div.adf-datatable-cell[filename="${elementName}"] img`));
+ const elementIcon = element(by.css(`.adf-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"] img`));
return elementIcon.getAttribute('src');
}
checkDocumentCardPropertyIsShowed(elementName, propertyName) {
- const elementProperty = element(by.css(`.adf-document-list-container div.adf-datatable-cell[filename="${elementName}"][title="${propertyName}"]`));
+ const elementProperty = element(by.css(`.adf-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"]`));
Util.waitUntilElementIsVisible(elementProperty);
}
getAttributeValueForElement(elementName, propertyName) {
- const elementSize = element(by.css(`.adf-document-list-container div.adf-datatable-cell[filename="${elementName}"][title="${propertyName}"] span`));
+ const elementSize = element(by.css(`.adf-document-list-container div.adf-datatable-cell[data-automation-id="${elementName}"][title="${propertyName}"] span`));
return elementSize.getText();
}
@@ -627,9 +627,9 @@ export class ContentServicesPage {
}
navigateToCardFolder(folderName) {
- const folderCard = element(by.css(`.adf-document-list-container div.adf-image-table-cell.adf-datatable-cell[filename="${folderName}"]`));
+ let folderCard = element(by.css(`.adf-document-list-container div.adf-image-table-cell.adf-datatable-cell[data-automation-id="${folderName}"]`));
folderCard.click();
- const folderSelected = element(by.css(`.adf-datatable-row.adf-is-selected div[filename="${folderName}"].adf-datatable-cell--image`));
+ let folderSelected = element(by.css(`.adf-datatable-row.adf-is-selected div[data-automation-id="${folderName}"].adf-datatable-cell--image`));
Util.waitUntilElementIsVisible(folderSelected);
browser.actions().sendKeys(protractor.Key.ENTER).perform();
}
@@ -659,7 +659,7 @@ export class ContentServicesPage {
}
clickContentNodeSelectorResult(name) {
- const resultElement = element.all(by.css(`div[data-automation-id="content-node-selector-content-list"] div[filename="${name}"`)).first();
+ const resultElement = element.all(by.css(`div[data-automation-id="content-node-selector-content-list"] div[data-automation-id="${name}"`)).first();
Util.waitUntilElementIsVisible(resultElement);
resultElement.click();
}
diff --git a/e2e/pages/adf/process-services/attachmentListPage.ts b/e2e/pages/adf/process-services/attachmentListPage.ts
index fdc5004df2..6d27b548ff 100644
--- a/e2e/pages/adf/process-services/attachmentListPage.ts
+++ b/e2e/pages/adf/process-services/attachmentListPage.ts
@@ -43,7 +43,7 @@ export class AttachmentListPage {
}
checkFileIsAttached(name) {
- const fileAttached = element.all(by.css('div[filename="' + name + '"]')).first();
+ const fileAttached = element.all(by.css('div[data-automation-id="' + name + '"]')).first();
Util.waitUntilElementIsVisible(fileAttached);
}
@@ -52,8 +52,8 @@ export class AttachmentListPage {
}
viewFile(name) {
- Util.waitUntilElementIsVisible(element.all(by.css('div[filename="' + name + '"]')).first());
- element.all(by.css('div[filename="' + name + '"]')).first().click();
+ Util.waitUntilElementIsVisible(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
+ element.all(by.css('div[data-automation-id="' + name + '"]')).first().click();
Util.waitUntilElementIsVisible(this.buttonMenu);
this.buttonMenu.click();
Util.waitUntilElementIsVisible(this.viewButton);
@@ -64,8 +64,8 @@ export class AttachmentListPage {
}
removeFile(name) {
- Util.waitUntilElementIsVisible(element.all(by.css('div[filename="' + name + '"]')).first());
- element.all(by.css('div[filename="' + name + '"]')).first().click();
+ Util.waitUntilElementIsVisible(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
+ element.all(by.css('div[data-automation-id="' + name + '"]')).first().click();
Util.waitUntilElementIsVisible(this.buttonMenu);
this.buttonMenu.click();
Util.waitUntilElementIsVisible(this.removeButton);
@@ -76,8 +76,8 @@ export class AttachmentListPage {
}
downloadFile(name) {
- Util.waitUntilElementIsVisible(element.all(by.css('div[filename="' + name + '"]')).first());
- element.all(by.css('div[filename="' + name + '"]')).first().click();
+ Util.waitUntilElementIsVisible(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
+ element.all(by.css('div[data-automation-id="' + name + '"]')).first().click();
Util.waitUntilElementIsVisible(this.buttonMenu);
this.buttonMenu.click();
Util.waitUntilElementIsVisible(this.downloadButton);
@@ -87,8 +87,8 @@ export class AttachmentListPage {
}
doubleClickFile(name) {
- Util.waitUntilElementIsVisible(element.all(by.css('div[filename="' + name + '"]')).first());
- const fileAttached = element.all(by.css('div[filename="' + name + '"]')).first();
+ Util.waitUntilElementIsVisible(element.all(by.css('div[data-automation-id="' + name + '"]')).first());
+ const fileAttached = element.all(by.css('div[data-automation-id="' + name + '"]')).first();
Util.waitUntilElementIsVisible(fileAttached);
Util.waitUntilElementIsClickable(fileAttached);
fileAttached.click();
@@ -96,7 +96,7 @@ export class AttachmentListPage {
}
checkFileIsRemoved(name) {
- const fileAttached = element.all(by.css('div[filename="' + name + '"]')).first();
+ const fileAttached = element.all(by.css('div[data-automation-id="' + name + '"]')).first();
Util.waitUntilElementIsNotVisible(fileAttached);
return this;
}
diff --git a/e2e/pages/adf/viewerPage.ts b/e2e/pages/adf/viewerPage.ts
index 51361a5bad..64ccb71bc5 100644
--- a/e2e/pages/adf/viewerPage.ts
+++ b/e2e/pages/adf/viewerPage.ts
@@ -103,7 +103,7 @@ export class ViewerPage {
}
viewFile(fileName) {
- const fileView = element.all(by.css(`#document-list-container div[filename="${fileName}"]`)).first();
+ const fileView = element.all(by.css(`#document-list-container div[data-automation-id="${fileName}"]`)).first();
Util.waitUntilElementIsVisible(fileView);
fileView.click();
browser.actions().sendKeys(protractor.Key.ENTER).perform();
diff --git a/lib/core/datatable/components/datatable/datatable.component.html b/lib/core/datatable/components/datatable/datatable.component.html
index 8b0a49affd..27cfd67003 100644
--- a/lib/core/datatable/components/datatable/datatable.component.html
+++ b/lib/core/datatable/components/datatable/datatable.component.html
@@ -90,7 +90,7 @@
role="gridcell"
class=" adf-datatable-cell adf-datatable-cell--{{col.type || 'text'}} {{col.cssClass}}"
[attr.title]="col.title | translate"
- [attr.filename]="getFilename(row)"
+ [attr.data-automation-id]="getAutomationValue(row, col)"
tabindex="0"
(click)="onRowClick(row, $event)"
(keydown.enter)="onEnterKeyPressed(row, $event)"
diff --git a/lib/core/datatable/components/datatable/datatable.component.ts b/lib/core/datatable/components/datatable/datatable.component.ts
index 5f4568eea6..524984017b 100644
--- a/lib/core/datatable/components/datatable/datatable.component.ts
+++ b/lib/core/datatable/components/datatable/datatable.component.ts
@@ -599,10 +599,6 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
return `${row.cssClass} ${this.rowStyleClass}`;
}
- getFilename(row: DataRow): string {
- return row.getValue('name');
- }
-
getSortingKey(): string {
if (this.data.getSorting()) {
return this.data.getSorting().key;
@@ -694,4 +690,15 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
this.fakeRows = [];
}
}
+
+ getNameColumnValue() {
+ return this.data.getColumns().find( (el: any) => {
+ return el.key.includes('name');
+ });
+ }
+
+ getAutomationValue(row: DataRow, col: DataColumn) {
+ const name = this.getNameColumnValue();
+ return name ? row.getValue(name.key) : '';
+ }
}
diff --git a/lib/process-services-cloud/src/lib/i18n/en.json b/lib/process-services-cloud/src/lib/i18n/en.json
index 671168543d..8080e779ee 100644
--- a/lib/process-services-cloud/src/lib/i18n/en.json
+++ b/lib/process-services-cloud/src/lib/i18n/en.json
@@ -174,7 +174,7 @@
"ADF_CLOUD_TASK_HEADER": {
"BUTTON": {
"CLAIM": "Claim",
- "UNCLAIM": "Requeue"
+ "UNCLAIM": "Release"
},
"PROPERTIES": {
"TASK_NAME": "Task",
diff --git a/lib/process-services/i18n/en.json b/lib/process-services/i18n/en.json
index 6d2c1283ac..199cd86c4d 100644
--- a/lib/process-services/i18n/en.json
+++ b/lib/process-services/i18n/en.json
@@ -73,7 +73,7 @@
"BUTTON": {
"COMPLETE": "Complete",
"CLAIM": "Claim",
- "UNCLAIM": "Requeue",
+ "UNCLAIM": "Release",
"DRAG-ATTACHMENT": "Drop files to upload",
"UPLOAD-ATTACHMENT": "Upload Attachment"
},