Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use index if available for promo id #9718

Merged
merged 7 commits into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -696,12 +696,12 @@ exports[`CpsRelatedContent should render Story Feature components when given app
class="emotion-37 emotion-38"
>
<a
aria-labelledby="promo-link-unlabelledafirika23252735"
aria-labelledby="promo-igboafirika23252735-1"
class="emotion-39 emotion-40"
href="/igbo/afirika-23252735"
>
<span
id="promo-link-unlabelledafirika23252735"
id="promo-igboafirika23252735-1"
>
STY - Ọrụ bekee na ịrụrụ onwe gị ọrụ, kedụ nk?
</span>
Expand Down Expand Up @@ -756,12 +756,12 @@ exports[`CpsRelatedContent should render Story Feature components when given app
class="emotion-37 emotion-38"
>
<a
aria-labelledby="promo-link-unlabelledafirika49666505"
aria-labelledby="promo-igboafirika49666505-2"
class="emotion-39 emotion-40"
href="/igbo/afirika-49666505"
>
<span
id="promo-link-unlabelledafirika49666505"
id="promo-igboafirika49666505-2"
>
Robert Mugabe: Zimbabwe eferela nwa amadi a aka
</span>
Expand Down Expand Up @@ -1480,12 +1480,12 @@ exports[`CpsRelatedContent should render Story Promo components without <ul> whe
class="emotion-35 emotion-36"
>
<a
aria-labelledby="promo-link-unlabelledafirika23252735"
aria-labelledby="promo-igboafirika23252735-1"
class="emotion-37 emotion-38"
href="/igbo/afirika-23252735"
>
<span
id="promo-link-unlabelledafirika23252735"
id="promo-igboafirika23252735-1"
>
STY - Ọrụ bekee na ịrụrụ onwe gị ọrụ, kedụ nk?
</span>
Expand Down
3 changes: 2 additions & 1 deletion src/app/containers/CpsFeaturesAnalysis/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ const PromoListComponent = ({ promoItems, dir }) => {

return (
<StoryPromoUl>
{promoItems.map(item => (
{promoItems.map((item, index) => (
<StoryPromoLi key={item.id || item.uri} ref={viewRef}>
<StoryPromo
item={item}
index={index}
dir={dir}
displayImage
displaySummary={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,12 @@ exports[`RelatedContentPromo it renders a Story Promo wrapped in a Grid componen
class="emotion-14 emotion-15"
>
<a
aria-labelledby="promo-link-unlabelled44508901"
aria-labelledby="promo-pidgin44508901-1"
class="emotion-16 emotion-17"
href="/pidgin/44508901"
>
<span
id="promo-link-unlabelled44508901"
id="promo-pidgin44508901-1"
role="text"
>
<span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,12 @@ exports[`RelatedContentPromoList it renders a list of Story Promos for MAP pages
class="emotion-19 emotion-20"
>
<a
aria-labelledby="promo-link-rel-content44508901"
aria-labelledby="promo-rel-content-pidgin44508901-1"
class="emotion-21 emotion-22"
href="/pidgin/44508901"
>
<span
id="promo-link-rel-content44508901"
id="promo-rel-content-pidgin44508901-1"
role="text"
>
<span>
Expand Down Expand Up @@ -491,12 +491,12 @@ exports[`RelatedContentPromoList it renders a list of Story Promos for MAP pages
class="emotion-19 emotion-20"
>
<a
aria-labelledby="promo-link-rel-contenttori46975713"
aria-labelledby="promo-rel-content-pidgintori46975713-2"
class="emotion-21 emotion-22"
href="/pidgin/tori-46975713"
>
<span
id="promo-link-rel-contenttori46975713"
id="promo-rel-content-pidgintori46975713-2"
>
How light companies dey use estimated billing show Nigerians pepper
</span>
Expand Down Expand Up @@ -552,12 +552,12 @@ exports[`RelatedContentPromoList it renders a list of Story Promos for MAP pages
class="emotion-19 emotion-20"
>
<a
aria-labelledby="promo-link-rel-contenttori42494678"
aria-labelledby="promo-rel-content-pidgintori42494678-3"
class="emotion-21 emotion-22"
href="/pidgin/tori-42494678"
>
<span
id="promo-link-rel-contenttori42494678"
id="promo-rel-content-pidgintori42494678-3"
>
Nigeria: Wetin 5,222 megawatts electric fit do?
</span>
Expand Down Expand Up @@ -989,12 +989,12 @@ exports[`RelatedContentPromoList it renders a list of Story Promos for STY pages
class="emotion-18 emotion-19"
>
<a
aria-labelledby="promo-link-rel-content44508901"
aria-labelledby="promo-rel-content-pidgin44508901-1"
class="emotion-20 emotion-21"
href="/pidgin/44508901"
>
<span
id="promo-link-rel-content44508901"
id="promo-rel-content-pidgin44508901-1"
role="text"
>
<span>
Expand Down Expand Up @@ -1053,12 +1053,12 @@ exports[`RelatedContentPromoList it renders a list of Story Promos for STY pages
class="emotion-18 emotion-19"
>
<a
aria-labelledby="promo-link-rel-contenttori46975713"
aria-labelledby="promo-rel-content-pidgintori46975713-2"
class="emotion-20 emotion-21"
href="/pidgin/tori-46975713"
>
<span
id="promo-link-rel-contenttori46975713"
id="promo-rel-content-pidgintori46975713-2"
>
How light companies dey use estimated billing show Nigerians pepper
</span>
Expand Down Expand Up @@ -1114,12 +1114,12 @@ exports[`RelatedContentPromoList it renders a list of Story Promos for STY pages
class="emotion-18 emotion-19"
>
<a
aria-labelledby="promo-link-rel-contenttori42494678"
aria-labelledby="promo-rel-content-pidgintori42494678-3"
class="emotion-20 emotion-21"
href="/pidgin/tori-42494678"
>
<span
id="promo-link-rel-contenttori42494678"
id="promo-rel-content-pidgintori42494678-3"
>
Nigeria: Wetin 5,222 megawatts electric fit do?
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const RelatedContentPromoList = ({
as={isMediaContent ? MostWatchedOl : StoryPromoUl}
enableGelGutters
>
{promoItems.map(item => (
{promoItems.map((item, index) => (
<Grid
item
columns={{
Expand All @@ -68,6 +68,7 @@ const RelatedContentPromoList = ({
>
<StoryPromo
item={item}
index={index}
dir={dir}
displaySummary={false}
isSingleColumnLayout={isMediaContent}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -805,12 +805,12 @@ exports[`CpsRelatedContent should render Story Promo components when given appro
class="emotion-39 emotion-40"
>
<a
aria-labelledby="promo-link-rel-content44508901"
aria-labelledby="promo-rel-content-pidgin44508901-1"
class="emotion-41 emotion-42"
href="/pidgin/44508901"
>
<span
id="promo-link-rel-content44508901"
id="promo-rel-content-pidgin44508901-1"
role="text"
>
<span>
Expand Down Expand Up @@ -869,12 +869,12 @@ exports[`CpsRelatedContent should render Story Promo components when given appro
class="emotion-39 emotion-40"
>
<a
aria-labelledby="promo-link-rel-contenttori46975713"
aria-labelledby="promo-rel-content-pidgintori46975713-2"
class="emotion-41 emotion-42"
href="/pidgin/tori-46975713"
>
<span
id="promo-link-rel-contenttori46975713"
id="promo-rel-content-pidgintori46975713-2"
>
How light companies dey use estimated billing show Nigerians pepper
</span>
Expand Down Expand Up @@ -930,12 +930,12 @@ exports[`CpsRelatedContent should render Story Promo components when given appro
class="emotion-39 emotion-40"
>
<a
aria-labelledby="promo-link-rel-contenttori42494678"
aria-labelledby="promo-rel-content-pidgintori42494678-3"
class="emotion-41 emotion-42"
href="/pidgin/tori-42494678"
>
<span
id="promo-link-rel-contenttori42494678"
id="promo-rel-content-pidgintori42494678-3"
>
Nigeria: Wetin 5,222 megawatts electric fit do?
</span>
Expand Down Expand Up @@ -1714,12 +1714,12 @@ exports[`CpsRelatedContent should render Story Promo components without <ul> whe
class="emotion-37 emotion-38"
>
<a
aria-labelledby="promo-link-unlabelled44508901"
aria-labelledby="promo-pidgin44508901-1"
class="emotion-39 emotion-40"
href="/pidgin/44508901"
>
<span
id="promo-link-unlabelled44508901"
id="promo-pidgin44508901-1"
role="text"
>
<span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -615,12 +615,12 @@ exports[`CpsRelatedContent should render Top Stories components when given appro
class="emotion-29 emotion-30"
>
<a
aria-labelledby="promo-link-unlabellednoticiasinternacional51939501"
aria-labelledby="promo-mundonoticiasinternacional51939501-1"
class="emotion-31 emotion-32"
href="/mundo/noticias-internacional-51939501"
>
<span
id="promo-link-unlabellednoticiasinternacional51939501"
id="promo-mundonoticiasinternacional51939501-1"
>
China dice tener una vacuna contra el nuevo coronavirus lista para pruebas en humanos
</span>
Expand Down Expand Up @@ -650,12 +650,12 @@ exports[`CpsRelatedContent should render Top Stories components when given appro
class="emotion-29 emotion-30"
>
<a
aria-labelledby="promo-link-unlabelledtori51945757"
aria-labelledby="promo-pidgintori51945757-1"
class="emotion-31 emotion-32"
href="/pidgin/tori-51945757"
>
<span
id="promo-link-unlabelledtori51945757"
id="promo-pidgintori51945757-1"
>
Nigeria don get five new cases of Coronavirus - See how e happun
</span>
Expand Down Expand Up @@ -1254,12 +1254,12 @@ exports[`CpsRelatedContent should render Top Stories components when without <ul
class="emotion-27 emotion-28"
>
<a
aria-labelledby="promo-link-unlabellednoticiasinternacional51939501"
aria-labelledby="promo-mundonoticiasinternacional51939501-1"
class="emotion-29 emotion-30"
href="/mundo/noticias-internacional-51939501"
>
<span
id="promo-link-unlabellednoticiasinternacional51939501"
id="promo-mundonoticiasinternacional51939501-1"
>
China dice tener una vacuna contra el nuevo coronavirus lista para pruebas en humanos
</span>
Expand Down
Loading