-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from fga-eps-mds/release/v0.2.0
Release/v0.2.0
- Loading branch information
Showing
85 changed files
with
1,993 additions
and
473 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,8 @@ | ||
coverage: | ||
precision: 2 | ||
round: down | ||
range: "70...100" | ||
|
||
status: | ||
project: yes | ||
patch: no | ||
changes: no | ||
|
||
parsers: | ||
gcov: | ||
branch_detection: | ||
conditional: yes | ||
loop: yes | ||
method: no | ||
macro: no | ||
|
||
comment: | ||
layout: "header, diff" | ||
behavior: default | ||
require_changes: no | ||
project: | ||
default: | ||
target: auto | ||
threshold: 3% | ||
base: auto | ||
patch: off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import App, { AdminPages, JudgeRoutes, PrivateRoute } from './App'; | ||
|
||
describe('App', () => { | ||
test('definition', () => { | ||
const mockProps = {}; | ||
const wrapper = shallow(<App {...mockProps} />); | ||
expect(wrapper).toBeDefined(); | ||
}); | ||
|
||
test('AdminPages', () => { | ||
const mockProps = { props: {} }; | ||
const wrapper = shallow(<AdminPages {...mockProps} />); | ||
expect(wrapper).toBeDefined(); | ||
}); | ||
|
||
test('JudgeRoutes', () => { | ||
const mockProps = {}; | ||
const wrapper = shallow(<JudgeRoutes {...mockProps} />); | ||
expect(wrapper).toBeDefined(); | ||
}); | ||
|
||
test('PrivateRoute', () => { | ||
const wrapper = shallow(<PrivateRoute />); | ||
expect(wrapper).toBeDefined(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react'; | ||
import { Icon, Divider } from 'antd'; | ||
import PropTypes from 'prop-types'; | ||
import { Container, CardContent } from './styles'; | ||
|
||
const Card = ({ title, icon, route }) => ( | ||
<Container> | ||
<CardContent to={`/cadastro/${route}`}> | ||
<Icon type={icon} /> | ||
<Divider type="vertical" /> | ||
{title} | ||
</CardContent> | ||
</Container> | ||
); | ||
|
||
export default Card; | ||
|
||
Card.propTypes = { | ||
title: PropTypes.string.isRequired, | ||
icon: PropTypes.string.isRequired, | ||
route: PropTypes.string.isRequired, | ||
}; |
12 changes: 5 additions & 7 deletions
12
...dastroArbitros/CadastroArbitros.styles.js → src/Components/Card/styles.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React, { useContext, useEffect, useState } from 'react'; | ||
|
||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import { faStopwatch } from '@fortawesome/free-solid-svg-icons'; | ||
import SocketContext from '../../socket-context'; | ||
|
||
export default function Countdown() { | ||
const socket = useContext(SocketContext); | ||
const [secondsRemaining, setSecondsRemaining] = useState(0); | ||
|
||
useEffect(() => { | ||
socket.on('voteTimer', (voteSocket) => { | ||
const { timeRemaining } = voteSocket; | ||
setSecondsRemaining(timeRemaining); | ||
}); | ||
}, [socket]); | ||
|
||
return ( | ||
<> | ||
<FontAwesomeIcon icon={faStopwatch} /> | ||
<b> | ||
{' '} | ||
{Math.floor(secondsRemaining / 60)}: | ||
{(secondsRemaining % 60).toString().padStart(2, '0')} | ||
</b> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Countdown from './Countdown'; | ||
|
||
export default Countdown; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import DatePicker from './DatePicker'; | ||
|
||
describe('DatePicker', () => { | ||
const mockProps = { | ||
form: { | ||
touched: false, | ||
errors: {}, | ||
}, | ||
field: { name: 'field' }, | ||
type: 'password', | ||
}; | ||
const wrapper = shallow(<DatePicker {...mockProps} />); | ||
|
||
it('Deve estar definida', () => { | ||
expect(wrapper).toBeDefined(); | ||
}); | ||
}); |
12 changes: 12 additions & 0 deletions
12
src/Components/DataEntry/FieldWithIcon/FieldWithIcon.test.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import FieldWithIcon from './FieldWithIcon'; | ||
|
||
describe('FieldWithIcon', () => { | ||
const mockProps = {}; | ||
const wrapper = shallow(<FieldWithIcon {...mockProps} />); | ||
|
||
it('Deve estar definida', () => { | ||
expect(wrapper).toBeDefined(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import Select from './Select'; | ||
|
||
describe('Select', () => { | ||
const mockProps = { | ||
form: { | ||
touched: false, | ||
errors: {}, | ||
}, | ||
field: { name: 'field' }, | ||
type: 'password', | ||
}; | ||
const wrapper = shallow(<Select {...mockProps} />); | ||
|
||
it('Deve estar definida', () => { | ||
expect(wrapper).toBeDefined(); | ||
}); | ||
}); |
Oops, something went wrong.