Skip to content

Commit 2179eee

Browse files
committed
Rename EditorialTest to FrontEditorialTest
1 parent c10b55b commit 2179eee

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

dotcom-rendering/src/frontend/feFront.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type {
99
StarRating,
1010
} from '../types/content';
1111
import type { FooterType } from '../types/footer';
12-
import type { EditorialTest } from '../types/front';
12+
import type { FrontEditorialTest } from '../types/front';
1313
import type { FENavType } from '../types/frontend';
1414
import type { FETagType } from '../types/tag';
1515
import 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?: {

dotcom-rendering/src/model/enhanceCards.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type {
55
FESupportingContent,
66
} from '../frontend/feFront';
77
import { ArticleDesign, ArticleDisplay, Pillar } from '../lib/articleFormat';
8-
import type { EditorialTest, VariantMeta } from '../types/front';
8+
import type { FrontEditorialTest, VariantMeta } from '../types/front';
99
import type { MainMedia } from '../types/mainMedia';
1010
import {
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
};

dotcom-rendering/src/model/enhanceCards.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import type {
2626
DCRFrontCard,
2727
DCRSlideshowImage,
2828
DCRSupportingContent,
29-
EditorialTest,
29+
FrontEditorialTest,
3030
} from '../types/front';
3131
import type { ArticleMedia, MainMedia } from '../types/mainMedia';
3232
import 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
*/
215215
const findActiveEditorialTest = (
216-
tests: EditorialTest[] | undefined,
217-
): EditorialTest | undefined => {
216+
tests: FrontEditorialTest[] | undefined,
217+
): FrontEditorialTest | undefined => {
218218
return tests?.find((test) => isActiveEditorialTest(test));
219219
};
220220

dotcom-rendering/src/types/front.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)