90978: Fix e2e tests failing due to interactions before page fully loaded

Now that we use initialNavigation: 'enabledBlocking', pages can appear to be loaded before some functionality is fully active.
In some cases this trips up Cypress, and it tries to interact with the app too soon.

We address this by introducing a new dsBrowserOnly pipe in order to defer the data-test attributes Cypress relies on to CSR.
This commit is contained in:
Yura Bondarenko
2022-04-27 09:06:55 +02:00
parent 22d5643d8b
commit d69a02e6cc
32 changed files with 123 additions and 43 deletions

View File

@@ -17,7 +17,7 @@
(next)="goNext()"
>
<ul *ngIf="objects?.hasSucceeded" class="list-unstyled" [ngClass]="{'ml-4': selectable}">
<li *ngFor="let object of objects?.payload?.page; let i = index; let last = last" class="mt-4 mb-4 d-flex" [class.border-bottom]="hasBorder && !last" data-test="list-object">
<li *ngFor="let object of objects?.payload?.page; let i = index; let last = last" class="mt-4 mb-4 d-flex" [class.border-bottom]="hasBorder && !last" [attr.data-test]="'list-object' | dsBrowserOnly">
<ds-selectable-list-item-control *ngIf="selectable" [index]="i"
[object]="object"
[selectionConfig]="selectionConfig"