Skip to content

Commit 4d43d7a

Browse files
committed
Add in points
1 parent 0a24364 commit 4d43d7a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/HtmlCss.test.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@ import App from "./App";
44
import userEvent from "@testing-library/user-event";
55

66
describe("Some HTML Elements are added.", () => {
7-
test("There is a header", () => {
7+
test("(2 pts) There is a header", () => {
88
render(<App />);
99
const header = screen.getByRole("heading");
1010
expect(header).toBeInTheDocument();
1111
});
1212

13-
test("There is an image with alt text", () => {
13+
test("(2 pts) There is an image with alt text", () => {
1414
render(<App />);
1515
const image = screen.getByRole("img");
1616
expect(image).toBeInTheDocument();
1717
expect(image).toHaveAttribute("alt");
1818
});
1919

20-
test("There is a list with at least three elements", () => {
20+
test("(2 pts) There is a list with at least three elements", () => {
2121
render(<App />);
2222
const list = screen.getByRole("list");
2323
expect(list).toBeInTheDocument();
2424
expect(list.children.length).toBeGreaterThanOrEqual(3);
2525
});
2626
});
2727

28-
describe("Some basic CSS is added.", () => {
28+
describe("(2 pts) Some basic CSS is added.", () => {
2929
test("The background color of the header area is different", () => {
3030
render(<App />);
3131
const banner = screen.getByRole("banner");
@@ -35,7 +35,7 @@ describe("Some basic CSS is added.", () => {
3535
});
3636
});
3737

38-
describe("Some Bootstrap Elements are added", () => {
38+
describe("(2 pts) Some Bootstrap Elements are added", () => {
3939
test("There is one bootstrap button with the text 'Log Hello World'", () => {
4040
render(<App />);
4141
const button = screen.getByRole("button", { name: /Log Hello World/i });
@@ -44,13 +44,13 @@ describe("Some Bootstrap Elements are added", () => {
4444
expect(button).toHaveClass("btn-primary");
4545
});
4646

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!'", () => {
4848
const consoleSpy = jest.spyOn(console, "log");
4949
render(<App />);
5050
expect(consoleSpy).not.toHaveBeenCalledWith("Hello World!");
5151
});
5252

53-
test("Clicking the bootstrap button logs 'Hello World!'", () => {
53+
test("(2 pts) Clicking the bootstrap button logs 'Hello World!'", () => {
5454
const consoleSpy = jest.spyOn(console, "log");
5555
render(<App />);
5656
const button = screen.getByRole("button", { name: /Log Hello World/i });
@@ -60,7 +60,7 @@ describe("Some Bootstrap Elements are added", () => {
6060
});
6161

6262
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", () => {
6464
const { container } = render(<App />);
6565
// Get all elements in the rendered container
6666
const elements = container.querySelectorAll("*");

0 commit comments

Comments
 (0)