Skip to content

Commit

Permalink
Merge d445a53 into 92ce9ad
Browse files Browse the repository at this point in the history
  • Loading branch information
robisson committed Oct 28, 2018
2 parents 92ce9ad + d445a53 commit 90c3aa4
Show file tree
Hide file tree
Showing 80 changed files with 2,325 additions and 231 deletions.
Binary file modified .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# production
/build
public/dist
public/uploads
public/assets/css/main.css

npm-debug.log*
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# WipKanban
# WipKanban - **This project is not yet launched. The first version will be 2019-01-02**
[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.png?v=103)](https://github.com/wipkanban/wipkanban/blob/master/LICENSE)
[![Build Status](https://travis-ci.org/wipkanban/wipkanban.svg?branch=travisci)](https://travis-ci.org/wipkanban/wipkanban)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3fabcb66f2ee4c0f907ee76b48199da3)](https://www.codacy.com/app/WipKanban/wipkanban?utm_source=github.com&utm_medium=referral&utm_content=wipkanban/wipkanban&utm_campaign=Badge_Grade)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "3.2.1",
"@material-ui/core": "3.3.1",
"@material-ui/icons": "3.0.1",
"axios": "0.18.0",
"bcrypt-nodejs": "0.0.3",
Expand Down
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Empty file modified public/uploads/45733d18-51c8-497a-9f51-f63ee42bffe8.jpg
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file modified public/uploads/9c774c8a-8e7f-44c0-aefb-31db056b8711.png
100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
6 changes: 5 additions & 1 deletion src/client/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import { type Store } from "redux";

import { MuiThemeProvider, createMuiTheme } from "@material-ui/core/styles";

const theme = createMuiTheme({});
const theme = createMuiTheme({
typography: {
useNextVariants: true
}
});

const store: Store = configureStore();
let stateLocalStorage: string = window.localStorage.getItem("state");
Expand Down
26 changes: 25 additions & 1 deletion src/client/api/__tests__/UserApi.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { login, logout } from "../../actions/Login";
import { updateAccountUser } from "../../actions/User";
import { updateAccountUser, createAccount } from "../../actions/User";
import configureStore from "../../configureStore";
import axios from "axios";
import MockAdapter from "axios-mock-adapter";
Expand All @@ -22,6 +22,30 @@ describe("User API", () => {
mock.reset();
});

it("Shoud to create user account", () => {
let response = {
success: true,
message: "User account created with successfull!"
};

let expectedState = {
success: true,
message: "User account created with successfull!",
showPreloader: false,
user: {}
};

mock.onPost(`/api/v1/user`).reply(200, response);

store
.dispatch(createAccount("email@examaple.com", "mypassword"))
.then(() => {
let currentState = store.getState().userReducer;

expect(currentState).toEqual(expectedState);
});
});

it("Shoud to authenticate a user and set token localstorage", () => {
let response = {
success: true,
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/Board/Board.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Navbar from "../Navbar/index";
import Column from "../Board/Column";
import MenuLeft from "../Navbar/MenuLeft";
import MenuRight from "../Navbar/MenuRight";
import UserAccountSettings from "../Navbar/Buttons/UserAccountSettings";
import UserAccountSettings from "../Navbar/Buttons/UserAccountSettingsContainer";
import AddCardButton from "../Navbar/Buttons/AddCardButton";
import DashboardIconButton from "../Navbar/Buttons/DashboardIconButton";
import TransferWithinAStationIconButton from "../Navbar/Buttons/TransferWithinAStationIconButton";
Expand Down
7 changes: 1 addition & 6 deletions src/client/components/Board/Board.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ import { createShallow } from "@material-ui/core/test-utils";
import toJson from "enzyme-to-json";
import Grid from "@material-ui/core/Grid";
import Navbar from "../Navbar/index";

// setup file
import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

configure({ adapter: new Adapter() });
import "../../setupTest"

describe("<Board /> Component", () => {
let shallow;
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/Board/BoardList.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const BoardList = ({ boards }: Props) => {
return (
<div>
<div>
<Typography color="secondary" variant="title" gutterBottom>
<Typography color="secondary" variant="h6" gutterBottom>
<DeveloperBoardIcon /> My boards
<Tooltip title="Add team">
<IconButton color="default" aria-label="Add board">
Expand Down
7 changes: 1 addition & 6 deletions src/client/components/Board/BoardList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ import Grid from "@material-ui/core/Grid";
import Typography from "@material-ui/core/Typography";
import { boards } from "../../fakeData";
import toJson from "enzyme-to-json";

// setup file
import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

configure({ adapter: new Adapter() });
import "../../setupTest"

describe("BoardList Component", () => {
let shallow;
Expand Down
7 changes: 1 addition & 6 deletions src/client/components/Board/Card.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import CardMaterialUi from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import { createShallow } from "@material-ui/core/test-utils";
import toJson from "enzyme-to-json";

// setup file
import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

configure({ adapter: new Adapter() });
import "../../setupTest"

describe("<Card /> Component", () => {
let shallow;
Expand Down
7 changes: 1 addition & 6 deletions src/client/components/Board/Column.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ import Column from "./Column";
import { createShallow } from "@material-ui/core/test-utils";
import toJson from "enzyme-to-json";
import columns from "./fakeData";

// setup file
import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

configure({ adapter: new Adapter() });
import "../../setupTest"

describe("<Column /> Component", () => {
let shallow;
Expand Down
7 changes: 1 addition & 6 deletions src/client/components/Board/ColumnHeader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ import toJson from "enzyme-to-json";
import ListItemSecondaryAction from "@material-ui/core/ListItemSecondaryAction";
import ListItemText from "@material-ui/core/ListItemText";
import ListItemIcon from "@material-ui/core/ListItemIcon";

// setup file
import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

configure({ adapter: new Adapter() });
import "../../setupTest"

describe("<ColumnHeader /> Component", () => {
let shallow;
Expand Down
7 changes: 1 addition & 6 deletions src/client/components/Board/MenuHeaderColumn.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ import toJson from "enzyme-to-json";
import IconButton from "@material-ui/core/IconButton";
import Menu from "@material-ui/core/Menu";
import MenuItem from "@material-ui/core/MenuItem";

// setup file
import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

configure({ adapter: new Adapter() });
import "../../setupTest"

describe("<MenuHeaderColumn /> Component", () => {
let shallow;
Expand Down
20 changes: 10 additions & 10 deletions src/client/components/Board/MiniBoard.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,42 +52,42 @@ function MediaControlCard(props: Props) {
return (
<Card>
<div className={classes.cardHeader}>
<Typography variant="title">{name}</Typography>
<Typography variant="subheading">
<Typography variant="h6">{name}</Typography>
<Typography variant="subtitle1">
createdb by {createdBy} at {createdAt}
</Typography>
</div>
<CardContent className={classes.content}>
<div className={classes.child}>
<Typography variant="body2" color="primary" align="center">
<Typography variant="body1" color="primary" align="center">
Lead Time
</Typography>
<Typography variant="display1" align="center">
<Typography variant="h4" align="center">
{leadTime}
</Typography>
<Typography variant="body1" align="center">
by week
</Typography>
</div>
<div className={classes.child}>
<Typography variant="body2" color="primary" align="center">
<Typography variant="body1" color="primary" align="center">
Cycle Time
</Typography>
<Typography variant="display1" align="center">
<Typography variant="h4" align="center">
{cycleTime}
</Typography>
<Typography variant="body1" align="center">
<Typography variant="body2" align="center">
by week
</Typography>
</div>
<div className={classes.child}>
<Typography variant="body2" color="primary" align="center">
<Typography variant="body1" color="primary" align="center">
Throghput
</Typography>
<Typography variant="display1" align="center">
<Typography variant="h4" align="center">
{throuput}
</Typography>
<Typography variant="body1" align="center">
<Typography variant="body2" align="center">
by week
</Typography>
</div>
Expand Down
7 changes: 1 addition & 6 deletions src/client/components/Board/MiniBoard.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import { createShallow } from "@material-ui/core/test-utils";
import toJson from "enzyme-to-json";
import Card from "@material-ui/core/Card";
import CardContent from "@material-ui/core/CardContent";

// setup file
import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

configure({ adapter: new Adapter() });
import "../../setupTest"

describe("<MiniBoard /> Component", () => {
let shallow;
Expand Down
4 changes: 2 additions & 2 deletions src/client/components/Board/__snapshots__/Board.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`<Board /> Component should render correctly with Navbar and a Grid 1`]
<SettingsIconButton />
<ZoomOutMapIconButton />
<Search />
<WithStyles(Connect(UserAccountSettings)) />
<Connect(WithStyles(UserAccountSettings)) />
</WithStyles(MenuRight)>
</WithStyles(Navbar)>
<WithStyles(Grid)
Expand Down Expand Up @@ -154,7 +154,7 @@ exports[`<Board /> Component should render correctly with Navbar and a Grid, eve
<SettingsIconButton />
<ZoomOutMapIconButton />
<Search />
<WithStyles(Connect(UserAccountSettings)) />
<Connect(WithStyles(UserAccountSettings)) />
</WithStyles(MenuRight)>
</WithStyles(Navbar)>
<WithStyles(Grid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`BoardList Component should render 1 Typogragh and 2 Grid 1`] = `
<WithStyles(Typography)
color="secondary"
gutterBottom={true}
variant="title"
variant="h6"
>
<pure(DeveloperBoardIcon) />
My boards
Expand Down Expand Up @@ -159,7 +159,7 @@ exports[`BoardList Component should render a div 1`] = `
<WithStyles(Typography)
color="secondary"
gutterBottom={true}
variant="title"
variant="h6"
>
<pure(DeveloperBoardIcon) />
My boards
Expand Down
20 changes: 10 additions & 10 deletions src/client/components/Board/__snapshots__/MiniBoard.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ exports[`<MiniBoard /> Component should render correctly 1`] = `
className="MediaControlCard-cardHeader-4"
>
<WithStyles(Typography)
variant="title"
variant="h6"
/>
<WithStyles(Typography)
variant="subheading"
variant="subtitle1"
>
createdb by
at
Expand All @@ -24,13 +24,13 @@ exports[`<MiniBoard /> Component should render correctly 1`] = `
<WithStyles(Typography)
align="center"
color="primary"
variant="body2"
variant="body1"
>
Lead Time
</WithStyles(Typography)>
<WithStyles(Typography)
align="center"
variant="display1"
variant="h4"
/>
<WithStyles(Typography)
align="center"
Expand All @@ -45,17 +45,17 @@ exports[`<MiniBoard /> Component should render correctly 1`] = `
<WithStyles(Typography)
align="center"
color="primary"
variant="body2"
variant="body1"
>
Cycle Time
</WithStyles(Typography)>
<WithStyles(Typography)
align="center"
variant="display1"
variant="h4"
/>
<WithStyles(Typography)
align="center"
variant="body1"
variant="body2"
>
by week
</WithStyles(Typography)>
Expand All @@ -66,17 +66,17 @@ exports[`<MiniBoard /> Component should render correctly 1`] = `
<WithStyles(Typography)
align="center"
color="primary"
variant="body2"
variant="body1"
>
Throghput
</WithStyles(Typography)>
<WithStyles(Typography)
align="center"
variant="display1"
variant="h4"
/>
<WithStyles(Typography)
align="center"
variant="body1"
variant="body2"
>
by week
</WithStyles(Typography)>
Expand Down
10 changes: 5 additions & 5 deletions src/client/components/GridContainer.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// @flow
import * as React from "react";
import Grid from '@material-ui/core/Grid';
import {withStyles} from '@material-ui/core/styles';
import Grid from "@material-ui/core/Grid";
import { withStyles } from "@material-ui/core/styles";

const styles : Object = {
const styles: Object = {
root: {
flexGrow: 1
},
Expand All @@ -17,12 +17,12 @@ type Props = {
children: React.Node
};

const GridContainer = ({classes,children}:Props) => {
const GridContainer = ({ classes, children }: Props) => {
return (
<Grid container spacing={0} className={classes.gridContainer}>
{children}
</Grid>
)
);
};

export default withStyles(styles)(GridContainer);
2 changes: 2 additions & 0 deletions src/client/components/GridContainer.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import GridContainer from "./GridContainer";
import { createShallow } from "@material-ui/core/test-utils";
import toJson from "enzyme-to-json";

// setup file
import { configure } from "enzyme";
Expand All @@ -22,5 +23,6 @@ describe("TeamList Component", () => {
</GridContainer>
);
expect(wrapper.find("div").text()).toEqual("Hello");
expect(toJson(wrapper)).toMatchSnapshot();
});
});

0 comments on commit 90c3aa4

Please sign in to comment.