Skip to content

Commit

Permalink
ci: skip flaky preview (#3598)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Feb 6, 2023
1 parent 6cda304 commit 98ab2c0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {DomSanitizer, SafeHtml} from '@angular/platform-browser';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TUI_EDITOR_EXTENSIONS, TuiEditorTool} from '@taiga-ui/addon-editor';
import {tuiPure} from '@taiga-ui/cdk';
import {TUI_IS_CYPRESS, tuiPure} from '@taiga-ui/cdk';

@Component({
selector: 'tui-editor-embed-example-2',
Expand Down Expand Up @@ -35,7 +35,9 @@ export class TuiEditorEmbedExample2 {
`
<p>Here is an online IDE:</p>
<iframe
src="https://codepen.io/mehdinajafi/embed/preview/LYyqNqR?default-tab=html%2Cresult&editable=true"
src="https://codepen.io/mehdinajafi/embed/LYyqNqR?default-tab=html${
this.isCypress ? '' : '%2Cresult'
}&editable=true"
height="375"
width="100%"
scrolling="no"
Expand All @@ -58,7 +60,10 @@ export class TuiEditorEmbedExample2 {
Validators.required,
);

constructor(@Inject(DomSanitizer) private readonly sanitizer: DomSanitizer) {}
constructor(
@Inject(DomSanitizer) private readonly sanitizer: DomSanitizer,
@Inject(TUI_IS_CYPRESS) private readonly isCypress: boolean,
) {}

@tuiPure
safe(content: string): SafeHtml {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
TuiEditorComponent,
TuiEditorTool,
} from '@taiga-ui/addon-editor';
import {tuiPure, tuiTypedFromEvent} from '@taiga-ui/cdk';
import {TUI_IS_CYPRESS, tuiPure, tuiTypedFromEvent} from '@taiga-ui/cdk';
import {Observable} from 'rxjs';
import {map} from 'rxjs/operators';

Expand Down Expand Up @@ -102,12 +102,16 @@ export class TuiEditorEmbedExample3 {
`
<p>Here is video: </p>
<video controls="controls" width="100%">
<video controls="controls" width="100%" preload="${
this.isCypress ? 'none' : 'auto'
}">
<source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
</video>
<p>Here is audio: </p>
<audio controls style="width: 100%">
<audio controls style="width: 100%" preload="${
this.isCypress ? 'none' : 'auto'
}">
<source src="https://www.w3docs.com/build/audios/audio.mp3" type="audio/mp3">
</audio>
Expand All @@ -116,7 +120,10 @@ export class TuiEditorEmbedExample3 {
Validators.required,
);

constructor(@Inject(DomSanitizer) private readonly sanitizer: DomSanitizer) {}
constructor(
@Inject(DomSanitizer) private readonly sanitizer: DomSanitizer,
@Inject(TUI_IS_CYPRESS) private readonly isCypress: boolean,
) {}

@tuiPure
safe(content: string): SafeHtml {
Expand Down

0 comments on commit 98ab2c0

Please sign in to comment.