@@ -10,7 +10,29 @@ jest.mock("./ImageColorSchemeSwitch");
10
10
// @ts -expect-error: doesn't find mockImplementation outside of testing.
11
11
ImageColorSchemeSwitch . mockImplementation ( ( ) => < img src = "src" alt = "alt" /> ) ;
12
12
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" , ( ) => {
14
36
test ( "Should render logo only" , ( ) => {
15
37
renderWithProviders ( < Footer logo = { { src : dlsLogo , alt : "t" } } /> ) ;
16
38
@@ -56,7 +78,9 @@ describe("Footer", () => {
56
78
) ;
57
79
} ) ;
58
80
} ) ;
81
+ } ) ;
59
82
83
+ describe ( "Footer Links" , ( ) => {
60
84
test ( "Should render with one link" , async ( ) => {
61
85
const lineOneText = "Link one" ;
62
86
const linkOneName = "link-one-href" ;
0 commit comments