-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6508 from ministryofjustice/ap-4910/interrupt-flo…
…w-in-progress AP-4910: Interrupt flow for in-progress applications
- Loading branch information
Showing
12 changed files
with
167 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module Providers | ||
module Interrupt | ||
class BlocksController < ProviderBaseController | ||
def show; end | ||
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
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
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,11 @@ | ||
module Flow | ||
module Flows | ||
class ProviderBlocked < FlowSteps | ||
STEPS = { | ||
providers_blocked: { | ||
path: ->(application) { urls.providers_legal_aid_application_block_path(application) }, | ||
}, | ||
}.freeze | ||
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
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,19 @@ | ||
<div class="interruption-panel"> | ||
<%= page_template(page_title: t(".title_html"), column_width: "full", template: :basic) do %> | ||
<%= page_heading(size: "l") %> | ||
|
||
<div class="maximize-text-width"> | ||
<p class="govuk-body"><%= t(".body_text") %></p> | ||
<p class="govuk-body"><%= t(".options") %></p> | ||
<ul class="govuk-list govuk-list--bullet"> | ||
<% t(".option_bullets").each do |bullet| %> | ||
<li><%= bullet %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
|
||
<div class='govuk-button-group'> | ||
<%= govuk_button_link_to t(".applications"), providers_legal_aid_applications_path, class: "white-button", role: "button" %> | ||
</div> | ||
<% end %> | ||
</div> |
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
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
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
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
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
32 changes: 32 additions & 0 deletions
32
spec/requests/providers/interrupt/blocks_controller_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,32 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe Providers::Interrupt::BlocksController do | ||
let(:legal_aid_application) { create(:legal_aid_application) } | ||
let(:provider) { legal_aid_application.provider } | ||
|
||
describe "GET /providers/applications/:id/blocked" do | ||
subject(:get_request) { get providers_legal_aid_application_block_path(legal_aid_application) } | ||
|
||
context "when the provider is not authenticated" do | ||
before { get_request } | ||
|
||
it_behaves_like "a provider not authenticated" | ||
end | ||
|
||
context "when the provider is authenticated" do | ||
before do | ||
login_as provider | ||
get_request | ||
end | ||
|
||
it "returns http success" do | ||
expect(response).to have_http_status(:ok) | ||
end | ||
|
||
it "shows text to use CCMS" do | ||
get_request | ||
expect(response.body).to include("You cannot submit this application") | ||
end | ||
end | ||
end | ||
end |