Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging Dev to Main #41

Merged
merged 94 commits into from
Mar 14, 2024
Merged
Changes from 1 commit
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
f7324ff
Docker set up
brok3turtl3 Sep 24, 2023
253b67a
Docker setup
brok3turtl3 Sep 24, 2023
aa46ddc
Docker Setup
brok3turtl3 Sep 24, 2023
6b4f784
docker-dev script fix
brok3turtl3 Sep 24, 2023
d5ff984
build context added to yaml file
brok3turtl3 Sep 24, 2023
fa8d78b
Additional yaml edit to set up explicit build directions for local image
brok3turtl3 Sep 24, 2023
3c083aa
further yaml edits to troubleshoot remote pulls
brok3turtl3 Sep 24, 2023
79c12f8
README updated to reflect correct instructions for dev env start up
brok3turtl3 Nov 26, 2023
794c4c8
YAML adjusted for dev compose file
brok3turtl3 Nov 26, 2023
6d7de70
Merge pull request #17 from Code-Hammers/docker-prep
brok3turtl3 Nov 26, 2023
b7ddc37
Login component hooked up to state and back end for basic database auth
brok3turtl3 Nov 26, 2023
07eaefa
Updated auth check for userstate
brok3turtl3 Nov 27, 2023
343038e
Updated README with testing credentials, and removed console.log
brok3turtl3 Nov 27, 2023
fbc5d12
Merge pull request #18 from Code-Hammers/login
brok3turtl3 Nov 27, 2023
2f76465
logout button and fuctionality added to Banner
brok3turtl3 Nov 27, 2023
6671bd8
Merge pull request #19 from Code-Hammers/logout
brok3turtl3 Nov 27, 2023
f44b7cb
Added testing to Banner to cover new logout button and functionality,…
brok3turtl3 Nov 27, 2023
a475391
added error property to mock initial states
brok3turtl3 Nov 27, 2023
ecf5813
Merge pull request #20 from Code-Hammers/logout-testing
brok3turtl3 Nov 27, 2023
538b293
Refactored tests to account for changes made to index.ts and various …
brok3turtl3 Nov 27, 2023
75714d9
Merge pull request #21 from Code-Hammers/be-testing
brok3turtl3 Nov 27, 2023
23a66f5
file structure changes
brok3turtl3 Nov 27, 2023
2c8c1be
Merge pull request #22 from Code-Hammers/be-testing
brok3turtl3 Nov 27, 2023
8bd7bd3
Created profile models and types
brok3turtl3 Nov 27, 2023
1959cb8
Merge branch 'dev' into profiles
brok3turtl3 Nov 27, 2023
d5a4eab
router, controller and createProfile route added for profiles
brok3turtl3 Nov 27, 2023
2917ac1
getAllProfiles route and controller added
brok3turtl3 Nov 28, 2023
b8310f3
getProfileByID route and controller added
brok3turtl3 Nov 28, 2023
959c36f
updateProfile route and controller created
brok3turtl3 Nov 28, 2023
b05d64d
created testing file for profileController
brok3turtl3 Nov 28, 2023
6791d30
testing added for better coverage on profileController
brok3turtl3 Nov 28, 2023
1c31c40
Merge pull request #23 from Code-Hammers/profiles
brok3turtl3 Nov 28, 2023
21ca7a4
Setting up CI testing with Github actions
brok3turtl3 Nov 28, 2023
df6bbb4
Merge branch 'dev' into ci-setup
brok3turtl3 Nov 28, 2023
fe571fc
Merge pull request #24 from Code-Hammers/ci-setup
brok3turtl3 Nov 28, 2023
2a88277
ci test 1
brok3turtl3 Nov 28, 2023
d9e3914
ci test 2
brok3turtl3 Nov 28, 2023
619bfb5
ci test 3
brok3turtl3 Nov 28, 2023
6481e18
Merge pull request #25 from Code-Hammers/ci-test1
brok3turtl3 Nov 28, 2023
ef55ce7
setting up test container to work with its own db environment
brok3turtl3 Nov 29, 2023
cd7494c
workflow file edit
brok3turtl3 Nov 29, 2023
a0ce75c
test1
brok3turtl3 Nov 29, 2023
59e0b79
test2
brok3turtl3 Nov 29, 2023
13961d7
test3
brok3turtl3 Nov 29, 2023
cccffbd
test4
brok3turtl3 Nov 29, 2023
5424f8d
test5
brok3turtl3 Nov 29, 2023
196a090
test6
brok3turtl3 Nov 29, 2023
9f5e423
test7
brok3turtl3 Nov 29, 2023
59c2291
test8
brok3turtl3 Nov 29, 2023
4ed9b04
test9
brok3turtl3 Nov 29, 2023
0c2fbf8
test10
brok3turtl3 Nov 29, 2023
1771f84
test11
brok3turtl3 Nov 29, 2023
b0512d0
test12
brok3turtl3 Nov 29, 2023
071f7fe
test13
brok3turtl3 Nov 29, 2023
5004691
test14
brok3turtl3 Nov 29, 2023
b8de1af
test15
brok3turtl3 Nov 29, 2023
7e16218
test16
brok3turtl3 Nov 29, 2023
e5f2531
test17
brok3turtl3 Nov 29, 2023
4c894a6
test18
brok3turtl3 Nov 29, 2023
0fd0a69
test19
brok3turtl3 Nov 29, 2023
234dccb
Merge pull request #27 from Code-Hammers/db-container
brok3turtl3 Nov 29, 2023
b2f5049
Added profiles state, initial profiles load on profiles page
brok3turtl3 Nov 29, 2023
1c878c1
tests refatored and updated to reflect new Profiles component structure
brok3turtl3 Nov 29, 2023
6c0a116
quick fix for syntax error
brok3turtl3 Nov 30, 2023
975427e
Merge pull request #28 from Code-Hammers/profile-page
brok3turtl3 Nov 30, 2023
fadf724
Profile page and profileSlice created
brok3turtl3 Nov 30, 2023
aee0e1d
Banner button functionality augmented to include profile and logout d…
brok3turtl3 Nov 30, 2023
df4da08
Tests updated for Banner component
brok3turtl3 Nov 30, 2023
1da2abf
Refactored Banner tests, added Profile tests
brok3turtl3 Nov 30, 2023
e116fbf
Merge pull request #29 from Code-Hammers/user-profile
brok3turtl3 Nov 30, 2023
2632b8b
PR template added
brok3turtl3 Nov 30, 2023
d423839
Merge pull request #30 from Code-Hammers/PR-template
brok3turtl3 Nov 30, 2023
fcd9dd4
template edited
brok3turtl3 Nov 30, 2023
cb0cb6c
Merge pull request #31 from Code-Hammers/template-PR
brok3turtl3 Nov 30, 2023
a42b78a
Create pull_request_template.md
brok3turtl3 Nov 30, 2023
c4d3b54
Create pull_request_template.md
brok3turtl3 Nov 30, 2023
814763d
Name field added to profile model
brok3turtl3 Dec 1, 2023
11e9988
Merge pull request #32 from Code-Hammers/profile-model
brok3turtl3 Dec 1, 2023
059e2f9
ProfileThumb display component added and model adjusted for first and…
brok3turtl3 Dec 1, 2023
3cb4dd3
Merge pull request #33 from Code-Hammers/profile-thumb
brok3turtl3 Dec 1, 2023
304793b
Created test file for userSlice
brok3turtl3 Dec 3, 2023
a71e044
created user type for front end, added logout test to userSlice test …
brok3turtl3 Dec 3, 2023
06b52d2
test for successful login added
brok3turtl3 Dec 3, 2023
41df373
test added for connection errors with axios, adjusted thunk logic for…
brok3turtl3 Dec 3, 2023
b20ec55
quick fix from a model update error
brok3turtl3 Dec 3, 2023
7efb600
Update to Profile useEffcet logic to account for possible null value
brok3turtl3 Dec 3, 2023
1ac1d85
Merge pull request #34 from Code-Hammers/userSlice-tests
brok3turtl3 Dec 5, 2023
3e4d841
Created testing file for userprofileSlice and added two tests
brok3turtl3 Dec 5, 2023
97fec61
Added test and updated error key on profileSlice
brok3turtl3 Dec 6, 2023
8692571
Refactored thunk and testfile
brok3turtl3 Dec 9, 2023
4764e28
Merge pull request #35 from Code-Hammers/userProfileSlice-tests
brok3turtl3 Dec 9, 2023
bb2814b
added docker testing script
brok3turtl3 Dec 17, 2023
a2e63b0
typescript help docs added
brok3turtl3 Dec 17, 2023
f02945e
Merge pull request #36 from Code-Hammers/documentation
brok3turtl3 Dec 17, 2023
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
Prev Previous commit
Next Next commit
tests refatored and updated to reflect new Profiles component structure
brok3turtl3 committed Nov 29, 2023

Verified

This commit was signed with the committer’s verified signature.
tombruijn Tom de Bruijn
commit 1c878c1969d6e7185bdb43a22fa35e674d7a6725
2 changes: 1 addition & 1 deletion TODOS_GENERAL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Review and refactor error handling.
# Review and refactor error handling. Needs to be more consistent. Need a guidelines section.

# Review types (Do we need separate types? Will this cause issues later on?)

2 changes: 1 addition & 1 deletion client/src/pages/MainPage/MainPage.tsx
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import { useAppSelector } from "../../app/hooks";

const MainPage = (): JSX.Element => {
const user = useAppSelector((state) => state.user.userData);
console.log("user data", user?.name);

return (
<div className="min-h-screen bg-gray-100 flex flex-col items-center justify-center">
<h1 className="text-4xl font-extrabold mb-4">Main Page</h1>
45 changes: 34 additions & 11 deletions client/src/pages/Profiles/Profiles.test.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
import React from "react";
import { render } from "@testing-library/react";
import "@testing-library/jest-dom";
import { create } from "react-test-renderer";
import { Provider } from "react-redux";
import configureStore from "redux-mock-store";

import Profiles from "./Profiles";

describe("Profiles Page", () => {
it("renders the test H1 correctly", () => {
const { getByText } = render(<Profiles />);
const title = getByText("PROFILES");
expect(title).toBeInTheDocument();
});
interface State {
profiles: {
profiles: { user: string }[];
status: 'idle' | 'loading' | 'failed';
error: string | null;
};
}

it("matches the snapshot", () => {
const { asFragment } = render(<Profiles />);
expect(asFragment()).toMatchSnapshot();
const mockStore = configureStore<State>([]);
const initialState: State = {
profiles: {
profiles: [
{ user: "User1" },
{ user: "User2" }
],
status: 'idle',
error: null
}
},
};

describe("MainPage Component", () => {
it("renders correctly", () => {
const store = mockStore(initialState);
const tree = create(
<Provider store={store}>
<Profiles />
</Provider>
).toJSON();
expect(tree).toMatchSnapshot();
});
});

15 changes: 0 additions & 15 deletions client/src/pages/Profiles/__snapshots__/Profiles.test.tsx.snap

This file was deleted.