mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-990] add tests for Recent Files, Shared Files and location redirect (#105)
* add tests for Recent Files and Shared Files list views add tests for location redirect * small fix
This commit is contained in:
committed by
Cilibiu Bogdan
parent
39458aa97a
commit
43b020ca51
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ElementFinder, ElementArrayFinder, by } from 'protractor';
|
||||
import { ElementFinder, ElementArrayFinder, by, promise } from 'protractor';
|
||||
import { Menu } from '../menu/menu';
|
||||
import { Component } from '../component';
|
||||
|
||||
@@ -34,4 +34,22 @@ export class ToolbarBreadcrumb extends Component {
|
||||
getNthItem(nth: number): ElementFinder {
|
||||
return this.items.get(nth - 1);
|
||||
}
|
||||
|
||||
getItemsCount(): promise.Promise<number> {
|
||||
return this.items.count();
|
||||
}
|
||||
|
||||
getFirstItemName(): promise.Promise<string> {
|
||||
return this.items.get(0).getAttribute('title');
|
||||
}
|
||||
|
||||
getCurrentItem(): promise.Promise<ElementFinder> {
|
||||
return this.getItemsCount()
|
||||
.then(count => this.getNthItem(count));
|
||||
}
|
||||
|
||||
getCurrentItemName(): promise.Promise<string> {
|
||||
return this.getCurrentItem()
|
||||
.then(node => node.getAttribute('title'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user