Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 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
c2e556d
First stab at questions
acbart Feb 2, 2022
406ffb2
Move Question interface to separate file
acbart Feb 6, 2022
9b9adb6
Fix formatting
acbart Aug 24, 2024
73ada3d
Added name to App
iammiraclee Aug 29, 2025
b79dca6
Merge remote-tracking branch 'upstream/task-first-branch' into solved…
iammiraclee Aug 31, 2025
3c888e4
Added a "Hello world" message
iammiraclee Aug 31, 2025
f3bc6b1
Added text to paragraph
iammiraclee Aug 31, 2025
c2d0a95
Merge remote-tracking branch 'upstream/task-html-css' into solved-htm…
iammiraclee Sep 7, 2025
826ef1b
Added a header
iammiraclee Sep 7, 2025
ec2d33c
Merge remote-tracking branch 'upstream/task-functions' into solved-fu…
iammiraclee Sep 9, 2025
37eb04f
Modified the fahrenheitToCelsius function to be able convert a number…
iammiraclee Sep 10, 2025
9a07ab0
Made all functions work properly
iammiraclee Sep 11, 2025
fc0dc58
Merge remote-tracking branch 'upstream/task-arrays' into solved-arrays
iammiraclee Sep 13, 2025
57a92e4
Editted the functions to work
iammiraclee Sep 18, 2025
579a125
Got rid of parse
iammiraclee Sep 18, 2025
2bc9a83
Merge remote-tracking branch 'upstream/task-objects' into solved-objects
iammiraclee Sep 20, 2025
31f8603
created a new blank question.
iammiraclee Sep 21, 2025
d67ef39
completed "isValid function"
iammiraclee Sep 21, 2025
2e016d9
Combined the "id" and first 10 characters of the "name"
iammiraclee Sep 21, 2025
b4a0b49
completed the "toShortForm" function.
iammiraclee Sep 21, 2025
80693b2
finished the "formatted string representation" function(toMarkdown) a…
iammiraclee Sep 21, 2025
1127405
finished the "duplicateQuestion" and the "publishQuestion" functions.
iammiraclee Sep 21, 2025
7d20c7d
Finished fixing all functions.
iammiraclee Sep 21, 2025
373f346
fixed the linting error
iammiraclee Sep 21, 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
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.
5 changes: 5 additions & 0 deletions public/tasks/task-objects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Task - Objects

Version: 0.0.1

Implement functions that work with objects immutably.
6 changes: 4 additions & 2 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.App {
text-align: center;
}

.aligned {
text-align: left;
}
.App-logo {
height: 40vmin;
pointer-events: none;
Expand All @@ -15,7 +17,7 @@

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

function App(): React.JSX.Element {
return (
<div className="App">
<header className="App-header">
UD CISC275 with React Hooks and TypeScript
</header>
<p>
Edit <code>src/App.tsx</code> and save. This page will
automatically reload.
</p>
<div style={{ border: "2px solid blue", padding: "2px" }}>
<div className="App">
<header className="App-header">
<h1>UD CISC275 with Miracle, Hello World</h1>
</header>
<p>
Hello World . Edit <code>src/App.tsx</code> and save. This
page will automatically reload.
</p>
<div className="aligned">
<Button
onClick={() => {
console.log("Hello World!");
}}
>
Log Hello World
</Button>
<p>Unordered List:</p>
<ul>
<li style={{ color: "red" }}>First thing</li>
<li style={{ color: "red" }}>second thing</li>
<li style={{ color: "red" }}>third thing</li>
</ul>

<img
src="https://tse4.mm.bing.net/th/id/OIP.tuJ0eQdPRyK_GsDAQ4B65AHaEK?pid=Api&P=0&h=220"
alt="A picture of the Goat football ⚽ player"
/>
<Container>
<Row>
<Col>
<p>First column.</p>
<div
style={{
width: "100%",
height: "40vh",
backgroundColor: "red",
}}
></div>
</Col>
<Col>
<p>Second column.</p>
<div
style={{
width: "100%",
height: "40vh",
backgroundColor: "red",
}}
></div>
</Col>
</Row>
</Container>
</div>
</div>
</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 header", () => {
render(<App />);
const header = screen.getByRole("heading");
expect(header).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