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

Isolated AP/PV pill now manifested #948

Merged
merged 1 commit into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 10 additions & 1 deletion src/Components/SavedSearchPillList/SavedSearchPillList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,16 @@ const SavedSearchPillList = ({ pills, isProjectedVacancy, highlightedString }) =
)
}
</div>
: null
:
<div>
{
<div
className={`saved-search-pill ${isProjectedVacancy ? 'pill--projected-vacancy' : ''} ${isProjectedVacancy ? 'pill--highlight' : ''}`}
>
{isProjectedVacancy ? 'Projected Vacancy' : 'Available Position'}
</div>
}
</div>
);

SavedSearchPillList.propTypes = {
Expand Down
17 changes: 17 additions & 0 deletions src/Components/SavedSearchPillList/SavedSearchPillList.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import SavedSearchPillList from './SavedSearchPillList';

describe('FavoriteContentComponent', () => {
const pills = ['1', '0A', 'Projected Vacancy', 'Los Angeles, CA United States of America'];
const props = {
isProjectedVacancy: true,
};
it('is defined', () => {
const wrapper = shallow(
<SavedSearchPillList
Expand All @@ -23,6 +26,20 @@ describe('FavoriteContentComponent', () => {
expect(wrapper).toBeDefined();
});

it('shows just PV pill when length is 0 and isProjectedVacancy', () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good test 👍

const wrapper = shallow(
<SavedSearchPillList
pills={[]}
{...props}
/>,
);
expect(wrapper).toBeDefined();
expect(wrapper.find('div').at(0).children().find('div')
.at(0)
.text())
.toBe('Projected Vacancy');
});

it('sorts "Projected Vacancy" to the top', () => {
const wrapper = shallow(
<SavedSearchPillList
Expand Down