File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import type {
99 StarRating ,
1010} from '../types/content' ;
1111import type { FooterType } from '../types/footer' ;
12- import type { EditorialTest } from '../types/front' ;
12+ import type { FrontEditorialTest } from '../types/front' ;
1313import type { FENavType } from '../types/frontend' ;
1414import type { FETagType } from '../types/tag' ;
1515import type { Territory } from '../types/territory' ;
@@ -206,7 +206,7 @@ export type FEFrontCard = {
206206 href ?: string ;
207207 embedUri ?: string ;
208208 newsletterData ?: Newsletter ;
209- tests ?: EditorialTest [ ] ;
209+ tests ?: FrontEditorialTest [ ] ;
210210 } ;
211211 header : {
212212 isVideo : boolean ;
@@ -434,7 +434,7 @@ export type FESupportingContent = {
434434 properties : {
435435 href ?: string ;
436436 webUrl ?: string ;
437- tests ?: EditorialTest [ ] ;
437+ tests ?: FrontEditorialTest [ ] ;
438438 } ;
439439 header : {
440440 kicker ?: {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import type {
55 FESupportingContent ,
66} from '../frontend/feFront' ;
77import { ArticleDesign , ArticleDisplay , Pillar } from '../lib/articleFormat' ;
8- import type { EditorialTest , VariantMeta } from '../types/front' ;
8+ import type { FrontEditorialTest , VariantMeta } from '../types/front' ;
99import type { MainMedia } from '../types/mainMedia' ;
1010import {
1111 decideArticleMedia ,
@@ -626,7 +626,7 @@ describe('Enhance Cards', () => {
626626 } ,
627627 } as VariantMeta ,
628628 ] ,
629- } as EditorialTest ,
629+ } as FrontEditorialTest ,
630630 ] ,
631631 } ,
632632 } ;
@@ -639,7 +639,7 @@ describe('Enhance Cards', () => {
639639 {
640640 ...cardWithEditorialTest . properties . tests [ 0 ] ,
641641 expiryDate : Date . now ( ) - oneHourInMilliseconds ,
642- } as EditorialTest ,
642+ } as FrontEditorialTest ,
643643 ] ,
644644 } ,
645645 } ;
@@ -652,7 +652,7 @@ describe('Enhance Cards', () => {
652652 {
653653 ...cardWithEditorialTest . properties . tests [ 0 ] ,
654654 hasManuallyEndedOnThisTrail : true ,
655- } as EditorialTest ,
655+ } as FrontEditorialTest ,
656656 ] ,
657657 } ,
658658 } ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import type {
2626 DCRFrontCard ,
2727 DCRSlideshowImage ,
2828 DCRSupportingContent ,
29- EditorialTest ,
29+ FrontEditorialTest ,
3030} from '../types/front' ;
3131import type { ArticleMedia , MainMedia } from '../types/mainMedia' ;
3232import type { PodcastSeriesImage , TagType } from '../types/tag' ;
@@ -203,7 +203,7 @@ const decideVideoAtomImage = (
203203 * Checks if an editorial test is active by making sure it has not been manually ended,
204204 * that it has a valid expiry date, and that the expiry date is in the future
205205 */
206- const isActiveEditorialTest = ( test : EditorialTest ) =>
206+ const isActiveEditorialTest = ( test : FrontEditorialTest ) =>
207207 ! test . hasManuallyEndedOnThisTrail &&
208208 ! ! test . expiryDate &&
209209 test . expiryDate > Date . now ( ) ;
@@ -213,8 +213,8 @@ const isActiveEditorialTest = (test: EditorialTest) =>
213213 * test is found, return undefined
214214 */
215215const findActiveEditorialTest = (
216- tests : EditorialTest [ ] | undefined ,
217- ) : EditorialTest | undefined => {
216+ tests : FrontEditorialTest [ ] | undefined ,
217+ ) : FrontEditorialTest | undefined => {
218218 return tests ?. find ( ( test ) => isActiveEditorialTest ( test ) ) ;
219219} ;
220220
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ export type VariantMeta = {
182182 } ;
183183} ;
184184
185- export type EditorialTest = {
185+ export type FrontEditorialTest = {
186186 testUuid : string ;
187187 variantMeta : VariantMeta [ ] ;
188188 startDate ?: number ;
You can’t perform that action at this time.
0 commit comments