@@ -4,28 +4,28 @@ import App from "./App";
4
4
import userEvent from "@testing-library/user-event" ;
5
5
6
6
describe ( "Some HTML Elements are added." , ( ) => {
7
- test ( "There is a header" , ( ) => {
7
+ test ( "(2 pts) There is a header" , ( ) => {
8
8
render ( < App /> ) ;
9
9
const header = screen . getByRole ( "heading" ) ;
10
10
expect ( header ) . toBeInTheDocument ( ) ;
11
11
} ) ;
12
12
13
- test ( "There is an image with alt text" , ( ) => {
13
+ test ( "(2 pts) There is an image with alt text" , ( ) => {
14
14
render ( < App /> ) ;
15
15
const image = screen . getByRole ( "img" ) ;
16
16
expect ( image ) . toBeInTheDocument ( ) ;
17
17
expect ( image ) . toHaveAttribute ( "alt" ) ;
18
18
} ) ;
19
19
20
- test ( "There is a list with at least three elements" , ( ) => {
20
+ test ( "(2 pts) There is a list with at least three elements" , ( ) => {
21
21
render ( < App /> ) ;
22
22
const list = screen . getByRole ( "list" ) ;
23
23
expect ( list ) . toBeInTheDocument ( ) ;
24
24
expect ( list . children . length ) . toBeGreaterThanOrEqual ( 3 ) ;
25
25
} ) ;
26
26
} ) ;
27
27
28
- describe ( "Some basic CSS is added." , ( ) => {
28
+ describe ( "(2 pts) Some basic CSS is added." , ( ) => {
29
29
test ( "The background color of the header area is different" , ( ) => {
30
30
render ( < App /> ) ;
31
31
const banner = screen . getByRole ( "banner" ) ;
@@ -35,7 +35,7 @@ describe("Some basic CSS is added.", () => {
35
35
} ) ;
36
36
} ) ;
37
37
38
- describe ( "Some Bootstrap Elements are added" , ( ) => {
38
+ describe ( "(2 pts) Some Bootstrap Elements are added" , ( ) => {
39
39
test ( "There is one bootstrap button with the text 'Log Hello World'" , ( ) => {
40
40
render ( < App /> ) ;
41
41
const button = screen . getByRole ( "button" , { name : / L o g H e l l o W o r l d / i } ) ;
@@ -44,13 +44,13 @@ describe("Some Bootstrap Elements are added", () => {
44
44
expect ( button ) . toHaveClass ( "btn-primary" ) ;
45
45
} ) ;
46
46
47
- test ( "Not clicking the bootstrap button does not logs 'Hello World!'" , ( ) => {
47
+ test ( "(2 pts) Not clicking the bootstrap button does not logs 'Hello World!'" , ( ) => {
48
48
const consoleSpy = jest . spyOn ( console , "log" ) ;
49
49
render ( < App /> ) ;
50
50
expect ( consoleSpy ) . not . toHaveBeenCalledWith ( "Hello World!" ) ;
51
51
} ) ;
52
52
53
- test ( "Clicking the bootstrap button logs 'Hello World!'" , ( ) => {
53
+ test ( "(2 pts) Clicking the bootstrap button logs 'Hello World!'" , ( ) => {
54
54
const consoleSpy = jest . spyOn ( console , "log" ) ;
55
55
render ( < App /> ) ;
56
56
const button = screen . getByRole ( "button" , { name : / L o g H e l l o W o r l d / i } ) ;
@@ -60,7 +60,7 @@ describe("Some Bootstrap Elements are added", () => {
60
60
} ) ;
61
61
62
62
describe ( "Some additional CSS was added" , ( ) => {
63
- test ( "checks if any element has a background color of red" , ( ) => {
63
+ test ( "(2 pts) checks if any element has a background color of red" , ( ) => {
64
64
const { container } = render ( < App /> ) ;
65
65
// Get all elements in the rendered container
66
66
const elements = container . querySelectorAll ( "*" ) ;
0 commit comments