mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 10:34:15 +00:00

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.
14 lines
270 B
TypeScript
14 lines
270 B
TypeScript
import { Pipe, PipeTransform } from '@angular/core';
|
|
|
|
/**
|
|
* Support dsBrowserOnly in unit tests.
|
|
*/
|
|
@Pipe({
|
|
name: 'dsBrowserOnly'
|
|
})
|
|
export class BrowserOnlyMockPipe implements PipeTransform {
|
|
transform(value: string): string | undefined {
|
|
return value;
|
|
}
|
|
}
|