Skip to content

Commit

Permalink
Merge branch 'feat/408-add-regional-selector' of github.com:geeksfors…
Browse files Browse the repository at this point in the history
…ocialchange/the-trans-dimension into feat/408-add-regional-selector
  • Loading branch information
katjam committed Nov 2, 2024
2 parents 79fee7c + 4fe99ef commit d9e1428
Show file tree
Hide file tree
Showing 15 changed files with 91 additions and 857 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- run:
curl -X POST "https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/1aaca29c-199a-4a3b-b9e9-06c497746397"
curl -X POST "https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/fe5b4ebb-7029-4c5a-8cd7-4b933dd7bdc0"
4 changes: 2 additions & 2 deletions elm-tooling.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"tools": {
"elm": "0.19.1",
"elm-format": "0.8.5",
"elm-test-rs": "2.0.0"
"elm-format": "0.8.7",
"elm-test-rs": "3.0.0"
}
}
3 changes: 2 additions & 1 deletion src/Theme/PageFooter.elm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ viewPageFooter time =
]
, div [ css [ footerBottomSectionStyle ] ]
[ viewPageFooterInfo (t FooterInfoTitle) [ t FooterInfoCharity, t FooterInfoCompany, t FooterInfoOffice ]
, viewPageFooterCredit time (t FooterCreditTitle)
, viewPageFooterCredit time
(t FooterCreditTitle)
[ { name = t FooterCredit1Name
, link = t FooterCredit1Link
, text = t FooterCredit1Text
Expand Down
85 changes: 46 additions & 39 deletions tests/Page/AboutTests.elm
Original file line number Diff line number Diff line change
@@ -1,53 +1,60 @@
module Page.AboutTests exposing (..)

import Expect
import Html
import Page.About exposing (view)
import Path
import Test exposing (Test, describe, test)
import Test.Html.Query as Query
import Test.Html.Selector as Selector
import TestFixtures exposing (sharedModelInit)
import TestUtils exposing (queryFromStyledList)


viewParamsWithAbout =
{ data =
{ main =
{ title = "About Page Test Title"
, subtitle = "Test subtitle here."
, body = []
}
, accessibility =
{ title = "Accessibility"
, subtitle = "Accessibility is good for everyone"
, body = []
}
, makers =
[ { name = "Makername", url = "google.com", logo = "logo.png", body = [] } ]
, placecal =
{ title = "PlaceCal lives here"
, subtitleimg = "img.jpeg"
, subtitleimgalt = "PlaceCal logo"
, body = []
}
}
, path = Path.fromString "about"
, routeParams = {}
, sharedData = ()
}
import TestUtils exposing (queryFromStyled)
import Theme.Page.About
import Theme.TransMarkdown


introMarkdown =
"# About us"
|> Theme.TransMarkdown.markdownToBlocks
|> fromResult

viewBodyHtml viewParams =
queryFromStyledList
(view Nothing sharedModelInit viewParams).body

fromResult markdownResult =
case markdownResult of
Ok markdownBlocks ->
markdownBlocks

Err _ ->
[]


sectionData =
{ accessibilityData =
{ title = "Accessibility"
, subtitle = "Accessibility is good for everyone"
, body = []
}
, makersData =
[ { name = "Makername", url = "google.com", logo = "logo.png", body = [] } ]
, aboutPlaceCalData =
{ title = "PlaceCal lives here"
, subtitleimg = "img.jpeg"
, subtitleimgalt = "PlaceCal logo"
, body = []
}
}


suite : Test
suite =
describe "About page body"
[ test "Has expected h2 heading" <|
describe "About page"
[ test "Has an intro" <|
\_ ->
Theme.Page.About.viewIntro introMarkdown
|> queryFromStyled
|> Query.find [ Selector.tag "h1" ]
|> Query.contains [ Html.text "About us" ]
, test "Has sections" <|
\_ ->
viewBodyHtml viewParamsWithAbout
|> Query.find [ Selector.tag "h2" ]
|> Query.contains [ Html.text "About Page Test Title" ]
Theme.Page.About.viewSections sectionData
|> queryFromStyled
|> Query.findAll [ Selector.tag "h3" ]
|> Query.count (Expect.equal 3)
]
110 changes: 0 additions & 110 deletions tests/Page/EventTests.elm

This file was deleted.

106 changes: 0 additions & 106 deletions tests/Page/EventsTests.elm

This file was deleted.

Loading

0 comments on commit d9e1428

Please sign in to comment.