Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
avinhurry committed Jul 16, 2024
1 parent dea1326 commit 5568f1e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'rails_helper'

feature 'Adding A levels to a teacher degree apprenticeship course', :can_edit_current_and_next_cycles do
feature 'Adding A levels to a teacher degree apprenticeship course', { can_edit_current_and_next_cycles: false } do
scenario 'adding a level requirements' do
given_i_am_authenticated_as_a_provider_user
and_the_tda_feature_flag_is_active
Expand All @@ -26,13 +26,13 @@
and_i_add_a_minimum_grade_required
and_i_click_continue

then_i_see_the_subject_i_choosen
then_i_see_the_subject_i_selected
and_i_am_on_the_add_another_a_level_subject_page
and_i_see_the_success_message_that_i_added_an_a_level

when_i_click_continue
then_i_see_an_error_message_for_the_add_a_level_to_a_list_page
and_i_see_the_subject_i_choosen
and_i_see_the_subject_i_selected

when_i_choose_yes
and_i_click_continue
Expand Down Expand Up @@ -257,7 +257,7 @@ def and_i_add_a_minimum_grade_required
fill_in 'Minimum grade required (optional)', with: 'C'
end

def then_i_see_the_subject_i_choosen
def then_i_see_the_subject_i_selected
expect(page).to have_current_path(
publish_provider_recruitment_cycle_course_a_levels_add_a_level_to_a_list_path(
@provider.provider_code,
Expand All @@ -268,7 +268,7 @@ def then_i_see_the_subject_i_choosen
)
expect(page).to have_content('Any subject - Grade C or above')
end
alias_method :and_i_see_the_subject_i_choosen, :then_i_see_the_subject_i_choosen
alias_method :and_i_see_the_subject_i_selected, :then_i_see_the_subject_i_selected

def then_i_see_an_error_message_for_the_add_a_level_to_a_list_page
and_i_see_there_is_a_problem
Expand All @@ -284,7 +284,7 @@ def when_i_choose_any_stem_subject
end

def then_i_see_the_two_subjects_i_already_added
and_i_see_the_subject_i_choosen
and_i_see_the_subject_i_selected
expect(page).to have_content('Any STEM subject - Grade C or above')
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'rails_helper'

feature 'Opting into notifications' do
feature 'Opting into notifications', { can_edit_current_and_next_cycles: false } do
before do
given_i_am_authenticated_as_an_accredited_provider_user
when_i_visit_accredited_provider_page
Expand Down
2 changes: 1 addition & 1 deletion spec/models/concerns/courses/edit_options_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

context "for a course that's not further education" do
it 'returns only QTS options for users to choose between' do
expect(course.qualification_options).to eq(%w[qts pgce_with_qts pgde_with_qts])
expect(course.qualification_options).to eq(%w[qts pgce_with_qts pgde_with_qts undergraduate_degree_with_qts])
course.qualification_options.each do |q|
expect(q.include?('qts')).to be_truthy
end
Expand Down

0 comments on commit 5568f1e

Please sign in to comment.