Added data automation id for search component

This commit is contained in:
Vito Albano
2016-06-17 10:55:07 +01:00
parent 969bc50b00
commit 4e5bb9b4b1
3 changed files with 9 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
<p data-automation-id="search_result_found" *ngIf="results && results.length">{{ 'SEARCH.RESULTS.SUMMARY' | translate:{numResults: results.length, searchTerm: searchTerm} }}</p>
<p data-automation-id="search_result_found" *ngIf="results&& results.length == 0">{{ 'SEARCH.RESULTS.NONE' | translate:{searchTerm: searchTerm} }}</p>
<table *ngIf="results && results.length && searchTerm" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp full-width">
<table data-automation-id="search_result_table" *ngIf="results && results.length && searchTerm" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp full-width">
<thead>
<tr>
<th>
@@ -19,12 +19,13 @@
</thead>
<tbody>
<tr *ngFor="let result of results; let idx = index">
<tr *ngFor="let result of results; let idx = index">PIPPO
<td><img src="{{getDocumentThumbnailUrl(result)}}" /></td>
<td>{{result.entry.name}}</td>
<td>{{result.entry.modifiedByUser.displayName}}</td>
<td data-automation-id="file_{{result.entry.name}}">{{result.entry.name}}</td>
<td data-automation-id="file_{{result.entry.name}}_{{result.entry.modifiedByUser.displayName}}">{{result.entry.modifiedByUser.displayName}}</td>
<td>{{result.entry.modifiedAt}}</td>
</tr>
</tr>SUCA
</tbody>
</table>
<p *ngIf="errorMessage">{{ 'SEARCH.RESULTS.ERROR' | translate:{errorMessage: errorMessage} }}</p>
<p data-automation-id="search_error_message" *ngIf="errorMessage">{{ 'SEARCH.RESULTS.ERROR' | translate:{errorMessage: errorMessage} }}</p>