Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
2b5f14c
Require Hello World in the document
acbart Jan 31, 2022
a7dee05
Rename text.Test.tsx to text.test.tsx
acbart Jan 31, 2022
3e381f3
Include the task info
acbart Jan 31, 2022
fee03d3
Merge branch 'task-first-branch' of https://github.com/UD-CISC275-S22…
acbart Jan 31, 2022
e6b1dab
Allow one or more instances of the Hello World text
acbart Feb 3, 2022
7a20734
Include json test command here
acbart Aug 24, 2024
7fe9ca3
Require Hello World in the document
acbart Jan 31, 2022
b8b8878
Include the task info
acbart Jan 31, 2022
fbdebde
Rename text.Test.tsx to text.test.tsx
acbart Jan 31, 2022
2f0146c
Allow one or more instances of the Hello World text
acbart Feb 3, 2022
a6acb43
Merge branch 'task-first-branch' of https://github.com/frontend-fun/t…
acbart Aug 24, 2024
ac36b32
First set of tests
acbart Jan 30, 2022
d04739d
Some logging tests
acbart Jan 30, 2022
b26100f
More html tests
acbart Jan 30, 2022
3bf4550
Fix the image test
acbart Jan 30, 2022
8dff2b6
Updated CSS tests, left a note about additional tests
acbart Jan 31, 2022
b66d4de
See previous commit message
acbart Jan 31, 2022
0a24364
Add in new css test
acbart Aug 24, 2024
4d43d7a
Add in points
acbart Aug 24, 2024
83c4461
Basic functions tests and stubs
acbart Jan 30, 2022
a486530
Fix test organization
acbart Jan 30, 2022
9722564
Fix issue in fahrenheit conversion
acbart Jan 30, 2022
bd06d5d
Move around some of the functions
acbart Feb 3, 2022
4cd1900
Explain what the actual functions require you to do
acbart Feb 3, 2022
cf1d21a
Update formatting
acbart Aug 24, 2024
e11693a
Add in points
acbart Aug 24, 2024
7cc4e3f
First stab at array problems
acbart Feb 1, 2022
f253337
Add in the rest of the tests
acbart Feb 1, 2022
b8777b1
Fix question text
acbart Feb 1, 2022
f87771e
Update arrays.test.ts
acbart Feb 11, 2022
f0d316b
Add in points
acbart Aug 24, 2024
80f1cf6
Update HtmlCss.test.tsx
greglnelson Sep 17, 2024
ef7dbf6
Merge remote-tracking branch 'upstream/task-first-branch' into solved…
nicoumaine Sep 9, 2025
8a15b18
Update App.tsx
nicoumaine Sep 9, 2025
ede0e96
Update App.tsx
nicoumaine Sep 9, 2025
20a3ad9
Merge remote-tracking branch 'upstream/task-html-css' into solved-htm…
nicoumaine Sep 17, 2025
8506581
Added "Goofy Goober" header
nicoumaine Sep 17, 2025
b688379
Uploaded authentic persian rug
nicoumaine Sep 17, 2025
9e9c5ec
Include persian rug meme on page
nicoumaine Sep 17, 2025
b193b7e
Fix HTML alt caption formatting error
nicoumaine Sep 17, 2025
1ca18dc
Creating assets and internal photos folder
nicoumaine Sep 17, 2025
254bc8e
Delete src/assets/photos directory
nicoumaine Sep 17, 2025
d3b9f62
Create assets folder
nicoumaine Sep 17, 2025
fddaf7d
Create photos folder
nicoumaine Sep 17, 2025
edaea0d
authentic_persian_rug in the correct folder
nicoumaine Sep 17, 2025
d171069
Seeing if getting photo out of header helps
nicoumaine Sep 17, 2025
560ca78
Accidentally imported stuff I didn't need
nicoumaine Sep 17, 2025
5d686b0
Going back to Commit b193b7e because something bad
nicoumaine Sep 17, 2025
01bea80
Realized I need to put persian rugs in public
nicoumaine Sep 17, 2025
6578255
Image inserted
nicoumaine Sep 17, 2025
3f9e103
Fixed file serving
nicoumaine Sep 17, 2025
8c2a3a3
Fixing rug import
nicoumaine Sep 17, 2025
c09e795
Change background to brat green
nicoumaine Sep 17, 2025
2e5c3cf
Add a list
nicoumaine Sep 17, 2025
c410833
Add button
nicoumaine Sep 17, 2025
221f9f5
Fix broken button
nicoumaine Sep 17, 2025
0079f09
Add red rectangles
nicoumaine Sep 17, 2025
d9504de
Go back to Commit 221f9f5
nicoumaine Sep 17, 2025
94668c3
Add columns
nicoumaine Sep 17, 2025
e15f3fd
Fix columns
nicoumaine Sep 17, 2025
cd87ed7
Fix column import
nicoumaine Sep 17, 2025
a612f01
Try to add the red rectangles AGAIN
nicoumaine Sep 17, 2025
b2e2804
Go back to Commit cd87ed7
nicoumaine Sep 17, 2025
4417d52
Red rectangle a 3rd attempt
nicoumaine Sep 17, 2025
0698371
Red rectangles a 4th attempt
nicoumaine Sep 17, 2025
ff39313
Back to Commit cd87ed7Again
nicoumaine Sep 18, 2025
86c1f2e
5th attempt at red rectangles
nicoumaine Sep 18, 2025
277e213
Fix red rectangle
nicoumaine Sep 18, 2025
0443d6f
Try to just move the rectangle
nicoumaine Sep 18, 2025
21b3d74
I put a period on accident :')
nicoumaine Sep 18, 2025
5e3afef
Add second rectangle
nicoumaine Sep 18, 2025
9a1899e
Merge remote-tracking branch 'upstream/task-functions' into solved-fu…
nicoumaine Sep 18, 2025
b47f1b4
Merge branch 'main' of https://github.com/nicoumaine/tasks into solve…
nicoumaine Sep 18, 2025
1dd214e
Made W in "Hello world" capitalized
nicoumaine Sep 18, 2025
845059b
Merge remote-tracking branch 'upstream/task-arrays' into solved-arrays
nicoumaine Sep 22, 2025
fda6f2d
First 4 functions
nicoumaine Sep 22, 2025
a8ba22a
Function shoutIfExclaiming
nicoumaine Sep 22, 2025
bd30158
Function countShortWords
nicoumaine Sep 22, 2025
c3320d1
Function allRGB
nicoumaine Sep 22, 2025
a418ede
Function makeMath
nicoumaine Sep 22, 2025
08b0169
Function injectPositive
nicoumaine Sep 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"build": "react-scripts build",
"test": "react-scripts test",
"test:cov": "react-scripts test --coverage --watchAll",
"test:json": "react-scripts test --json --watchAll=false --outputFile jest-output.json --coverage",
"eject": "react-scripts eject",
"lint": "eslint ./src --ext .tsx --ext .ts --max-warnings 0",
"eslint-output": "eslint-output ./src --ext .tsx --ext .ts --max-warnings 0",
Expand Down
Binary file added public/authentic_persian_rug.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/tasks/task-arrays.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Task - Arrays

Version: 0.0.1

Implement functions that work with arrays immutably.
5 changes: 5 additions & 0 deletions public/tasks/task-first-branch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Task - First Branch

Version: 0.0.1

Pass a short test to have certain text on the page.
5 changes: 5 additions & 0 deletions public/tasks/task-functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Task - Functions

Version: 0.0.1

Implement a bunch of functions that work on primitives.
5 changes: 5 additions & 0 deletions public/tasks/task-html-css.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Task - HTML/CSS

Version: 0.0.1

Add in some HTML and CSS, including a fancy looking button.
Binary file added src/8857bb5fa95f7c41a0b9ec3ebf60514f.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

.App-header {
width: 100%;
background-color: #282c34;
background-color: #8ACE00;
min-height: 40vh;
display: flex;
flex-direction: column;
Expand Down
56 changes: 48 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,56 @@
import React from "react";
import "./App.css";

import rug from "./assets/photos/authentic_persian_rug.jpg";
import { Container, Row, Col, Button } from "react-bootstrap";
function App(): React.JSX.Element {
return (
<div className="App">
<header className="App-header">
UM COS420 with React Hooks and TypeScript
</header>
<p>
Edit <code>src/App.tsx</code> and save. This page will
automatically reload.
</p>
<h1>Goofy Goober</h1>
<Container>
<Row>
<Col>
<div
style={{
width: "400px",
height: "5px",
backgroundColor: "red",
}}
/>
<img
src={rug}
alt='A meme featuring several Persian rugs with the text: "Friend, Girlfriend, Boyfriend, Best friend" (all with "end" underlined). Next to them it says "Only authentic persian rug Has no END," highlighting that unlike friendships or relationships that may end, Persian rugs are timeless.'
/>
<ul>
<li>Girlfriend X</li>
<li>Boyfriend X</li>
<li>Bestfriend X</li>
<Button
onClick={() => {
console.log("Hello World!");
}}
>
Log Hello World
</Button>
</ul>
<header className="App-header">
UM COS420 with React Hooks and TypeScript
</header>
</Col>
<Col>
<div
style={{
width: "400px",
height: "5px",
backgroundColor: "red",
}}
/>
<p>
Edit <code>src/App.tsx</code> and save. This page
will automatically reload. Hello World
</p>
</Col>
</Row>
</Container>
</div>
);
}
Expand Down
83 changes: 83 additions & 0 deletions src/HtmlCss.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import React from "react";
import { render, screen } from "@testing-library/react";
import App from "./App";
import userEvent from "@testing-library/user-event";

describe("Some HTML Elements are added.", () => {
test("(2 pts) There is a heading", () => {
render(<App />);
const heading = screen.getAllByRole("heading");
expect(heading[0]).toBeInTheDocument();
});

test("(2 pts) There is an image with alt text", () => {
render(<App />);
const image = screen.getByRole("img");
expect(image).toBeInTheDocument();
expect(image).toHaveAttribute("alt");
});

test("(2 pts) There is a list with at least three elements", () => {
render(<App />);
const list = screen.getByRole("list");
expect(list).toBeInTheDocument();
expect(list.children.length).toBeGreaterThanOrEqual(3);
});
});

describe("(2 pts) Some basic CSS is added.", () => {
test("The background color of the header area is different", () => {
render(<App />);
const banner = screen.getByRole("banner");
expect(banner).not.toHaveStyle({
"background-color": "rgb(40, 44, 52)",
});
});
});

describe("(2 pts) Some Bootstrap Elements are added", () => {
test("There is one bootstrap button with the text 'Log Hello World'", () => {
render(<App />);
const button = screen.getByRole("button", { name: /Log Hello World/i });
expect(button).toBeInTheDocument();
expect(button).toHaveClass("btn");
expect(button).toHaveClass("btn-primary");
});

test("(2 pts) Not clicking the bootstrap button does not logs 'Hello World!'", () => {
const consoleSpy = jest.spyOn(console, "log");
render(<App />);
expect(consoleSpy).not.toHaveBeenCalledWith("Hello World!");
});

test("(2 pts) Clicking the bootstrap button logs 'Hello World!'", () => {
const consoleSpy = jest.spyOn(console, "log");
render(<App />);
const button = screen.getByRole("button", { name: /Log Hello World/i });
userEvent.click(button);
expect(consoleSpy).toHaveBeenCalledWith("Hello World!");
});
});

describe("Some additional CSS was added", () => {
test("(2 pts) checks if any element has a background color of red", () => {
const { container } = render(<App />);
// Get all elements in the rendered container
const elements = container.querySelectorAll("*");

// Check if any element has a background color of red
let foundRedBackground = false;

elements.forEach((element) => {
const style = getComputedStyle(element);
if (
style.backgroundColor === "red" ||
style.backgroundColor === "rgb(255, 0, 0)"
) {
foundRedBackground = true;
}
});

expect(foundRedBackground).toBe(true);
});
});
Loading