-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add teacher degree apprenticeship filter to Manage #9406
Changes from 4 commits
a4ed221
94da427
36a48e5
4a39f9f
decd79e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
en: | ||
provider_interface: | ||
filters: | ||
course_type: | ||
heading: 'Course type' | ||
postgraduate: 'Postgraduate courses' | ||
teacher_degree_apprenticeship: 'Teaching degree apprenticeship (TDA) courses' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,10 @@ | |
StateStores::RedisStore.new(key: "#{described_class::STATE_STORE_KEY}_#{provider_user.id}") | ||
end | ||
|
||
before do | ||
FeatureFlag.deactivate(:teacher_degree_apprenticeship) | ||
end | ||
|
||
describe '#filters' do | ||
let(:headings) { filter.filters.map { |f| f[:heading] } } | ||
let(:params) { ActionController::Parameters.new } | ||
|
@@ -67,6 +71,23 @@ | |
expect(headings).not_to include('Provider') | ||
end | ||
end | ||
|
||
context 'when teacher degree apprenticeship feature flag active' do | ||
let(:filter) do | ||
described_class.new(params:, | ||
provider_user:, | ||
state_store:) | ||
end | ||
|
||
before do | ||
FeatureFlag.activate(:teacher_degree_apprenticeship) | ||
end | ||
|
||
it 'does include the course type filter' do | ||
expect(filter.filters.size).to be(7) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this adding value? If we add another filter this will fail? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i just maintaned the same test that was there and added the tda filter. I think I will maintain this. |
||
expect(headings).to include('Course type') | ||
end | ||
end | ||
end | ||
|
||
describe 'location filter' do | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it Teaching degree apprenticeship or Teacher degree apprenticeship? We are not consistent. it may be too late to change in some places (eg the programme_type), but we should make an effort where possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this comes from the content designer and from the prototype. I might keep as it is