Skip to content

Commit

Permalink
Replace generic nav links with editionalised links
Browse files Browse the repository at this point in the history
  • Loading branch information
arelra committed May 22, 2024
1 parent e1900f1 commit 72bf707
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 30 deletions.
21 changes: 9 additions & 12 deletions common/app/navigation/NavLinks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ object NavLinks {

/* NEWS */
val science = NavLink("Science", "/science")
val tech = NavLink("Tech", "/technology")
val ukTech = NavLink("Tech", "/uk/technology")
val usTech = NavLink("Tech", "/us/technology")
val auTech = NavLink("Tech", "/au/technology")
val politics = NavLink("UK politics", "/politics")
val media = NavLink("Media", "/media")
val ukMedia = NavLink("Media", "/uk/media")
val auMedia = NavLink("Media", "/au/media")
val globalDevelopment = NavLink("Global development", "/global-development")
val australiaNews = NavLink("Australia", "/australia-news", longTitle = Some("Australia news"))
Expand Down Expand Up @@ -71,7 +70,7 @@ object NavLinks {
"UK",
"/uk-news",
longTitle = Some("UK news"),
children = List(politics, education, media, society, law, scotland, wales, northernIreland),
children = List(politics, education, ukMedia, society, law, scotland, wales, northernIreland),
)
val world = NavLink(
"World",
Expand All @@ -90,21 +89,21 @@ object NavLinks {
val usEnvironment =
NavLink("Environment", "/us/environment", children = List(climateCrisis, wildlife, energy, pollution, greenLight))

val money = NavLink("Money", "/money", children = List(property, pensions, savings, borrowing, careers))
val ukMoney = NavLink("Money", "/uk/money", children = List(property, pensions, savings, borrowing, careers))
val usMoney = NavLink("Money", "/us/money", children = List(property, pensions, savings, borrowing, careers))
val auMoney = NavLink("Money", "/au/money", children = List(property, pensions, savings, borrowing, careers))

val ukBusiness = NavLink(
"Business",
"/uk/business",
children = List(economics, banking, money, markets, projectSyndicate, businessToBusiness, retail),
children = List(economics, banking, ukMoney, markets, projectSyndicate, businessToBusiness, retail),
)
val usBusiness = NavLink(
"Business",
"/us/business",
children = List(economics, diversityEquality, smallBusiness, retail),
)
val auBusiness = NavLink("Business", "au/business", children = List(markets, money, projectSyndicate, retail))
val auBusiness = NavLink("Business", "au/business", children = List(markets, auMoney, projectSyndicate, retail))

/* OPINION */
val columnists = NavLink("Columnists", "/index/contributors")
Expand Down Expand Up @@ -169,11 +168,9 @@ object NavLinks {
val NHL = NavLink("NHL", "/sport/nhl")

/* CULTURE */
val film = NavLink("Film", "/film")
val ukFilm = NavLink("Film", "/uk/film")
val usFilm = NavLink("Film", "/us/film")
val auFilm = NavLink("Film", "/au/film")
val tvAndRadio = NavLink("TV & radio", "/tv-and-radio")
val ukTvAndRadio = NavLink("TV & radio", "/uk/tv-and-radio")
val usTvAndRadio = NavLink("TV & radio", "/us/tv-and-radio")
val auTvAndRadio = NavLink("TV & radio", "/au/tv-and-radio")
Expand Down Expand Up @@ -348,7 +345,7 @@ object NavLinks {
science,
globalDevelopment,
football,
tech,
ukTech,
ukBusiness,
obituaries,
),
Expand Down Expand Up @@ -500,9 +497,9 @@ object NavLinks {
children = List(
books,
music,
tvAndRadio,
ukTvAndRadio,
artAndDesign,
film,
ukFilm,
games,
classical,
stage,
Expand Down Expand Up @@ -568,7 +565,7 @@ object NavLinks {
men,
family,
ukTravel,
money,
ukMoney,
),
)

Expand Down
6 changes: 3 additions & 3 deletions common/test/CommonTestSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import renderers.DotcomRenderingServiceTest

class CommonTestSuite
extends Suites(
new CachedHealthCheckTest,
// new CachedHealthCheckTest,
new NavigationTest,
new FlagshipFrontContainerSpec,
new DotcomRenderingServiceTest,
// new FlagshipFrontContainerSpec,
// new DotcomRenderingServiceTest,
)
with SingleServerSuite {}
30 changes: 15 additions & 15 deletions common/test/resources/reference-navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
{
"title": "Media",
"url": "/media",
"url": "/uk/media",
"children": [],
"classList": []
},
Expand Down Expand Up @@ -236,7 +236,7 @@
},
{
"title": "Money",
"url": "/money",
"url": "/uk/money",
"children": [
{
"title": "Property",
Expand Down Expand Up @@ -1873,7 +1873,7 @@
},
{
"title": "Money",
"url": "/money",
"url": "/au/money",
"children": [
{
"title": "Property",
Expand Down Expand Up @@ -2517,7 +2517,7 @@
},
{
"title": "Media",
"url": "/media",
"url": "/uk/media",
"children": [],
"classList": []
},
Expand Down Expand Up @@ -2660,7 +2660,7 @@
},
{
"title": "Tech",
"url": "/technology",
"url": "/uk/technology",
"children": [],
"classList": []
},
Expand All @@ -2682,7 +2682,7 @@
},
{
"title": "Money",
"url": "/money",
"url": "/uk/money",
"children": [
{
"title": "Property",
Expand Down Expand Up @@ -2912,7 +2912,7 @@
},
{
"title": "TV & radio",
"url": "/tv-and-radio",
"url": "/uk/tv-and-radio",
"children": [],
"classList": []
},
Expand All @@ -2924,7 +2924,7 @@
},
{
"title": "Film",
"url": "/film",
"url": "/uk/film",
"children": [],
"classList": []
},
Expand Down Expand Up @@ -3036,7 +3036,7 @@
},
{
"title": "Money",
"url": "/money",
"url": "/uk/money",
"children": [
{
"title": "Property",
Expand Down Expand Up @@ -3509,7 +3509,7 @@
},
{
"title": "Media",
"url": "/media",
"url": "/uk/media",
"children": [],
"classList": []
},
Expand Down Expand Up @@ -3652,7 +3652,7 @@
},
{
"title": "Tech",
"url": "/technology",
"url": "/uk/technology",
"children": [],
"classList": []
},
Expand All @@ -3674,7 +3674,7 @@
},
{
"title": "Money",
"url": "/money",
"url": "/uk/money",
"children": [
{
"title": "Property",
Expand Down Expand Up @@ -3904,7 +3904,7 @@
},
{
"title": "TV & radio",
"url": "/tv-and-radio",
"url": "/uk/tv-and-radio",
"children": [],
"classList": []
},
Expand All @@ -3916,7 +3916,7 @@
},
{
"title": "Film",
"url": "/film",
"url": "/uk/film",
"children": [],
"classList": []
},
Expand Down Expand Up @@ -4028,7 +4028,7 @@
},
{
"title": "Money",
"url": "/money",
"url": "/uk/money",
"children": [
{
"title": "Property",
Expand Down

0 comments on commit 72bf707

Please sign in to comment.