mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
e2e test fix, so it waits for the loading element to disappear (tree is rendered)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { browser, by, element } from 'protractor';
|
||||
import { browser, by, element, protractor } from 'protractor';
|
||||
|
||||
export class CommunityListPageProtractor {
|
||||
HOMEPAGE = '/home';
|
||||
@@ -9,10 +9,15 @@ export class CommunityListPageProtractor {
|
||||
}
|
||||
|
||||
navigateToCommunityList() {
|
||||
return browser.get(this.COMMUNITY_LIST);
|
||||
browser.get(this.COMMUNITY_LIST);
|
||||
const loading = element(by.css('.ds-loading'));
|
||||
browser.wait(protractor.ExpectedConditions.invisibilityOf(loading), 10000);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
anExpandableCommunityIsPresent() {
|
||||
console.log(element(by.css('body')));
|
||||
return element(by.css('.expandable-node h5 a')).isPresent();
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<ds-loading *ngIf="(dataSource.loading$ | async) && loadingNode === undefined "></ds-loading>
|
||||
<ds-loading *ngIf="(dataSource.loading$ | async) && loadingNode === undefined " class="ds-loading"></ds-loading>
|
||||
|
||||
<cdk-tree [dataSource]="dataSource" [treeControl]="treeControl">
|
||||
<!-- This is the tree node template for show more node -->
|
||||
@@ -13,7 +13,7 @@
|
||||
class="btn btn-outline-secondary btn-sm">
|
||||
{{ 'communityList.showMore' | translate }}
|
||||
</a>
|
||||
<ds-loading *ngIf="node===loadingNode && dataSource.loading$ | async"></ds-loading>
|
||||
<ds-loading *ngIf="node===loadingNode && dataSource.loading$ | async" class="ds-loading"></ds-loading>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-muted" cdkTreeNodePadding>
|
||||
@@ -57,7 +57,7 @@
|
||||
<span class="{{node.isExpanded ? 'fa fa-chevron-down' : 'fa fa-chevron-right'}}"
|
||||
aria-hidden="true"></span>
|
||||
</button>
|
||||
<ds-loading></ds-loading>
|
||||
<ds-loading class="ds-loading"></ds-loading>
|
||||
</div>
|
||||
</cdk-tree-node>
|
||||
<!-- This is the tree node template for leaf nodes (collections and (sub)coms without children) -->
|
||||
|
Reference in New Issue
Block a user