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

feat: remove feature flag for pathways #252

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 12 additions & 17 deletions packages/catalog-search/src/LearningTypeRadioFacet.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { SearchContext } from './SearchContext';
import {
setRefinementAction,
} from './data/actions';
import { features } from './config';
import { LEARNING_TYPE_COURSE, LEARNING_TYPE_PROGRAM, LEARNING_TYPE_PATHWAY } from './data/constants';

const LearningTypeRadioFacet = () => {
Expand Down Expand Up @@ -70,22 +69,18 @@ const LearningTypeRadioFacet = () => {
Programs
</span>
</Dropdown.Item>
{
features.ENABlE_PATHWAYS && (
<Dropdown.Item as="label" className="mb-0 py-3 d-flex align-items-center">
<Input
type="radio"
checked={typePathwaySelected}
className="facet-item position-relative mr-2 mb-2"
onChange={() => handleInputOnChange(LEARNING_TYPE_PATHWAY)}
data-testid="learning-type-pathways"
/>
<span className={classNames('facet-item-label', { 'is-refined': typePathwaySelected })}>
Pathways
</span>
</Dropdown.Item>
)
}
<Dropdown.Item as="label" className="mb-0 py-3 d-flex align-items-center">
<Input
type="radio"
checked={typePathwaySelected}
className="facet-item position-relative mr-2 mb-2"
onChange={() => handleInputOnChange(LEARNING_TYPE_PATHWAY)}
data-testid="learning-type-pathways"
/>
<span className={classNames('facet-item-label', { 'is-refined': typePathwaySelected })}>
Pathways
</span>
</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
</div>
Expand Down
4 changes: 0 additions & 4 deletions packages/catalog-search/src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export const FEATURE_ENROLL_WITH_CODES = 'ENROLL_WITH_CODES';
export const FEATURE_LANGUAGE_FACET = 'LANGUAGE_FACET';
export const FEATURE_PROGRAM_TITLES_FACET = 'PROGRAM_TITLES_FACET';
export const LEARNING_TYPE_FACET = 'LEARNING_TYPE_FACET';
export const FEATURE_ENABLE_PATHWAYS = 'ENABLE_PATHWAYS';

// eslint-disable-next-line import/prefer-default-export
export const features = {
Expand All @@ -16,7 +15,4 @@ export const features = {
LEARNING_TYPE_FACET: (
process.env.LEARNING_TYPE_FACET || hasFeatureFlagEnabled(LEARNING_TYPE_FACET)
),
ENABlE_PATHWAYS: (
process.env.FEATURE_ENABLE_PATHWAYS || hasFeatureFlagEnabled(FEATURE_ENABLE_PATHWAYS)
),
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@ import '@testing-library/jest-dom/extend-expect';

import LearningTypeRadioFacet from '../LearningTypeRadioFacet';

import { features } from '../config';
import { renderWithSearchContext } from './utils';

describe('<LearningTypeRadioFacet />', () => {
beforeEach(() => {
features.ENABlE_PATHWAYS = true;
});

test('LearningTypeRadioFacet is rendered and isnt bold initially', () => {
renderWithSearchContext(<LearningTypeRadioFacet />);
expect(screen.getByText('Learning Type')).toBeInTheDocument();
Expand Down