Skip to content

Commit

Permalink
Merge pull request #71 from akclifto/cubes
Browse files Browse the repository at this point in the history
US 9: Tasks 303, 307, 308: update collision mesh, backend testing, cleanup
  • Loading branch information
akclifto authored Apr 5, 2021
2 parents a048ea9 + d37b63d commit 0eea83f
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 34 deletions.
10 changes: 5 additions & 5 deletions server/tests/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ describe("DB/Postgres Testing", () => {

/** DB/REDIS TESTING */
describe("DB/Redis Testing", () => {
it("Tests redis createClient,createClient() should create AWS client", async (done) => {
it("Tests redis createClient,createClient() should create AWS client", (done) => {
try {
await request(redisTestClient);
request(redisTestClient);
expect.assertions(2);
expect(redisTestClient.address).toBe(
"ec2-34-202-178-6.compute-1.amazonaws.com:29099"
"ec2-3-210-163-2.compute-1.amazonaws.com:19299"
);
expect(redisTestClient).toBeTruthy();
done();
Expand All @@ -77,14 +77,14 @@ describe("DB/Redis Testing", () => {
}
});

it("Test redis connection, should return connecting true, hadError false", async (done) => {
it("Test redis connection, should return connecting true, hadError false", (done) => {
try {
request(redisTestClient);
expect(redisTestClient.stream).toEqual(
expect.objectContaining({
connecting: true,
_hadError: false,
_host: "ec2-34-202-178-6.compute-1.amazonaws.com",
_host: "ec2-3-210-163-2.compute-1.amazonaws.com",
})
);
done();
Expand Down
42 changes: 21 additions & 21 deletions src/components/ThreeDice/CollisionMesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,50 @@ import { useBox } from "@react-three/cannon";

const CollisionMesh = () => {
const [floor] = useBox(() => ({
position: [0, 0, 0],
position: [0.22, 0, 0.3],
rotation: [0, -Math.PI / 2, 0],
args: [14, 2.5, 22],
args: [18.5, 2.43, 36.5],
material: { friction: 1000 },
}));
const [left] = useBox(() => ({
position: [-14.1, 1, 0],
position: [-18.05, 2, 0.35],
rotation: [0, -Math.PI / 2, 0],
args: [16, 4, 0],
args: [20, 4, 1],
}));
const [right] = useBox(() => ({
position: [14.1, 1, 0],
position: [18.48, 2, 0.35],
rotation: [0, -Math.PI / 2, 0],
args: [16, 4, 0],
}));
const [top] = useBox(() => ({
position: [0, 1, 8],
args: [28, 4, 0],
}));
const [bottom] = useBox(() => ({
position: [0, 1, -8],
args: [28, 4, 0],
position: [0.22, 2, 9.53],
args: [37, 4, 0],
}));
const [top] = useBox(() => ({
position: [0.22, 2, -8.73],
args: [37, 4, 0],
}));
return (
<group>
<mesh ref={floor}>
<boxBufferGeometry args={[15.5, 2, 28]} />
<meshStandardMaterial color="red" transparent opacity={0} />
<boxBufferGeometry args={[18.5, 0, 36.5]} />
<meshStandardMaterial color="yellow" transparent opacity={0} />
</mesh>
<mesh ref={left}>
<boxBufferGeometry args={[16.5, 2, 0]} />
<boxBufferGeometry args={[18.36, 4, 0]} />
<meshStandardMaterial color="red" transparent opacity={0} />
</mesh>
<mesh ref={right}>
<boxBufferGeometry args={[16.5, 2, 0]} />
<meshStandardMaterial color="red" transparent opacity={0} />
</mesh>
<mesh ref={top}>
<boxBufferGeometry args={[28.2, 2, 0]} />
<boxBufferGeometry args={[18.36, 4, 0]} />
<meshStandardMaterial color="red" transparent opacity={0} />
</mesh>
<mesh ref={bottom}>
<boxBufferGeometry args={[28.2, 2, 0]} />
<meshStandardMaterial color="red" transparent opacity={0} />
<boxBufferGeometry args={[36.52, 4, 0]} />
<meshStandardMaterial color="green" transparent opacity={0} />
</mesh>
<mesh ref={top}>
<boxBufferGeometry args={[36.52, 4, 0]} />
<meshStandardMaterial color="green" transparent opacity={0} />
</mesh>
</group>
);
Expand Down
2 changes: 0 additions & 2 deletions src/routes/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import AuthLandingPage from "../pages/AuthLandingPage";
import Login from "../pages/Login";
import Signup from "../pages/Signup";
import PageNotFound from "../pages/PageNotFound";
// can remove this after testing IconsDataStructure is done
import Testing from "../pages/Testing";
// import InfoCard from "../components/InfoCard";

const theme = createMuiTheme({
palette: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ exports[`ThreeDice/GameManager Testing should do a snapshot test on GameManager
Object {
"$$typeof": Symbol(react.context),
"Provider": [Function],
"_calculateChangedBits": null,
"_currentRenderer": null,
"_currentRenderer2": null,
"_currentValue": Object {
Expand Down
4 changes: 2 additions & 2 deletions src/tests/components/__snapshots__/Header.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Components/Header Testing SNAPSHOT: Header 1`] = `
<Fragment>
<div>
<HideOnScroll>
<WithStyles(ForwardRef(AppBar))
className="makeStyles-toolbar-2"
Expand Down Expand Up @@ -36,5 +36,5 @@ exports[`Components/Header Testing SNAPSHOT: Header 1`] = `
</WithStyles(ForwardRef(AppBar))>
</HideOnScroll>
<WithStyles(ForwardRef(Toolbar)) />
</Fragment>
</div>
`;
8 changes: 6 additions & 2 deletions src/tests/components/__snapshots__/InfoCard.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Components/InfoCard Testing SNAPSHOT: InfoCard 1`] = `
<div>
<div
className="container"
>
<button
className="title-button"
onClick={[Function]}
Expand All @@ -21,7 +23,9 @@ exports[`Components/InfoCard Testing SNAPSHOT: InfoCard 1`] = `
`;

exports[`Components/InfoCard Testing Test clickHandler event 1`] = `
<div>
<div
className="container"
>
<button
className="title-button"
onClick={[Function]}
Expand Down
1 change: 0 additions & 1 deletion src/tests/components/__snapshots__/ThreeDice.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ exports[`ThreeDice Testing renders and matches snapshot 1`] = `
Loading game textures....
</ForwardRef>
</Memo(Canvas)>
)
</Fragment>
`;

0 comments on commit 0eea83f

Please sign in to comment.