Skip to content

Commit

Permalink
Merge pull request #787 from MetaPhase-Consulting/fix/tests-client-ba…
Browse files Browse the repository at this point in the history
…dge-list

Fix/tests client badge list
  • Loading branch information
scott062 committed Mar 19, 2020
2 parents 6beba00 + ea05acb commit f27ba98
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 31 deletions.
Expand Up @@ -21,7 +21,7 @@ const CheckboxList = ({ list, clientClassifications }) => (
const checked = indexOf(clientClassifications, c.code) > -1;
return (
<CheckBox
id={c.id}
id={c.code}
label={c.text}
small
value={checked}
Expand Down
@@ -1,12 +1,14 @@
import React from 'react';
import { shallow } from 'enzyme';
import Classifications from 'Constants/Classifications';
import CheckboxList from './CheckboxList';

describe('CheckboxList', () => {
const props = {
id: 'a',
isDisabled: false,
clientClassifications: ['3', 'T', 'C'],
list: Classifications,
};

it('is defined', () => {
const wrapper = shallow(<CheckboxList
{...props}
Expand Down
6 changes: 3 additions & 3 deletions src/Components/BidderPortfolio/ClientBadge/ClientBadge.jsx
Expand Up @@ -131,10 +131,10 @@ const ClientBadge = ({ type, status }) => {

ClientBadge.propTypes = {
type: PropTypes.oneOf([
3,
4,
'3',
'4',
'R',
6,
'6',
'A',
'C',
'C1',
Expand Down
Expand Up @@ -5,9 +5,10 @@ import ClientBadge from './ClientBadge';

describe('ClientBadge', () => {
const props = {
type: 3,
type: '3',
status: true,
};

it('is defined', () => {
const wrapper = shallow(<ClientBadge
{...props}
Expand Down
@@ -1,17 +1,15 @@
import React from 'react';
import { shallow } from 'enzyme';
import toJSON from 'enzyme-to-json';
import Classifications from 'Constants/Classifications';
import ClientBadgeList from './ClientBadgeList';

describe('ClientBadgeList', () => {
const props = {
statuses: {
handshake: 0,
sixeight: 1,
fairshare: 2,
retirement: 1,
},
clientClassifications: ['3', 'T', 'C'],
Classifications,
};

it('is defined', () => {
const wrapper = shallow(<ClientBadgeList
{...props}
Expand Down
79 changes: 79 additions & 0 deletions src/Constants/Classifications.js
@@ -0,0 +1,79 @@
const CLASSIFICATIONS = [
{
code: '3',
text: '3rd Tour Bidders',
disabled_ind: false,
},
{
code: '4',
text: 'Tenured',
disabled_ind: false,
},
{
code: 'D',
text: 'Differential Bidder',
disabled_ind: true,
},
{
code: 'T',
text: 'Tandem Bidder',
disabled_ind: false,
},
{
code: 'M',
text: 'Meritorious Step Increases',
disabled_ind: false,
},
{
code: '6',
text: '6/8 Rule',
disabled_ind: false,
},
{
code: 'F',
text: 'Fair Share Bidders',
disabled_ind: false,
},
{
code: 'C',
text: 'Critical Need Language',
disabled_ind: false,
},
{
code: 'C1',
text: 'Critical Need Language 1st Tour Complete',
disabled_ind: false,
},
{
code: 'CC',
text: 'Critical Need Language Final Tour Complete',
disabled_ind: false,
},
{
code: 'R',
text: 'Recommended for Tenure',
disabled_ind: false,
},
{
code: 'A',
text: 'Ambassador or Deputy Assistant Secretary',
disabled_ind: false,
},
{
code: 'F1',
text: 'Pickering Fellows',
disabled_ind: false,
},
{
code: 'F2',
text: 'Rangel Fellows',
disabled_ind: false,
},
{
code: 'P',
text: 'Pickering/Rangel Fellows',
disabled_ind: false,
},
];

export default CLASSIFICATIONS;
18 changes: 0 additions & 18 deletions src/Constants/ClientEdits.js

This file was deleted.

0 comments on commit f27ba98

Please sign in to comment.