@@ -10,7 +10,29 @@ jest.mock("./ImageColorSchemeSwitch");
1010// @ts -expect-error: doesn't find mockImplementation outside of testing.
1111ImageColorSchemeSwitch . mockImplementation ( ( ) => < img src = "src" alt = "alt" /> ) ;
1212
13- describe ( "Footer" , ( ) => {
13+ describe ( "Footer logo and copyright" , ( ) => {
14+ test ( "Should render" , async ( ) => {
15+ renderWithProviders ( < Footer /> ) ;
16+ expect ( await screen . findByRole ( "contentinfo" ) ) . toBeInTheDocument ( ) ;
17+ } ) ;
18+
19+ test ( "Should renders correctly with styles" , async ( ) => {
20+ const borderStyle = "1px solid orange" ;
21+ renderWithProviders ( < Footer style = { { border : borderStyle } } /> ) ;
22+
23+ const footerComputedStyle = window . getComputedStyle (
24+ await screen . findByRole ( "contentinfo" ) ,
25+ ) ;
26+
27+ // check new style is set
28+ expect ( footerComputedStyle . border ) . toBe ( borderStyle ) ;
29+
30+ // Check default values are still set
31+ expect ( footerComputedStyle . minHeight ) . toBe ( "50px" ) ;
32+ } ) ;
33+ } ) ;
34+
35+ describe ( "Footer logo and copyright" , ( ) => {
1436 test ( "Should render logo only" , ( ) => {
1537 renderWithProviders ( < Footer logo = { { src : dlsLogo , alt : "t" } } /> ) ;
1638
@@ -56,7 +78,9 @@ describe("Footer", () => {
5678 ) ;
5779 } ) ;
5880 } ) ;
81+ } ) ;
5982
83+ describe ( "Footer Links" , ( ) => {
6084 test ( "Should render with one link" , async ( ) => {
6185 const lineOneText = "Link one" ;
6286 const linkOneName = "link-one-href" ;
0 commit comments