-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a review recommendation test stub
This starts a system test for the review recommendation journey. It can't be fully tested yet as the other parts of the journey aren't built yet and it's not possible to access this page yet.
- Loading branch information
1 parent
8e5c98b
commit bcbf93d
Showing
4 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
spec/support/autoload/page_objects/assessor_interface/assessment_recommendation_review.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
module PageObjects | ||
module AssessorInterface | ||
class AssessmentRecommendationReview < SitePrism::Page | ||
set_url "/assessor/applications/{application_form_id}/assessments/{assessment_id}" \ | ||
"/recommendation/review/edit" | ||
|
||
element :continue_button, ".govuk-button" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
spec/system/assessor_interface/reviewing_verifications_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rails_helper" | ||
|
||
RSpec.describe "Assessor reviewing verifications", type: :system do | ||
before do | ||
given_the_service_is_open | ||
given_i_am_authorized_as_an_assessor_user | ||
given_there_is_an_application_form_with_failed_verifications | ||
end | ||
|
||
it "sends for review" do | ||
# TODO: review functionality is not built yet, this page can never be reached | ||
when_i_visit_the( | ||
:assessor_assessment_recommendation_review_page, | ||
application_form_id:, | ||
assessment_id:, | ||
) | ||
then_i_see_the( | ||
:assessor_application_page, | ||
application_id: application_form_id, | ||
) | ||
end | ||
|
||
private | ||
|
||
def given_there_is_an_application_form_with_failed_verifications | ||
application_form | ||
end | ||
|
||
def application_form | ||
@application_form ||= | ||
create(:application_form, :submitted).tap do |application_form| | ||
assessment = create(:assessment, :verify, application_form:) | ||
create( | ||
:professional_standing_request, | ||
:received, | ||
assessment:, | ||
verify_passed: false, | ||
) | ||
end | ||
end | ||
|
||
def application_form_id | ||
application_form.id | ||
end | ||
|
||
def assessment_id | ||
application_form.assessment.id | ||
end | ||
end |