Skip to content

Commit

Permalink
Merge pull request #9890 from alphagov/content-modelling/872-copy-cha…
Browse files Browse the repository at this point in the history
…nges-for-draft-journey

(872) Copy tweaks for draft journey
  • Loading branch information
pezholio authored Feb 4, 2025
2 parents 24630ef + b78c096 commit b2491b0
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 @@ -19,7 +19,7 @@
<% if @content_block_document.has_newer_draft? %>
<%
content_for :banner, render("govuk_publishing_components/components/notice", {
title: "A newer draft exists for this content block",
title: "There’s a saved draft of this content block",
description_govspeak: sanitize("<p>#{link_to "Continue editing", content_block_manager.content_block_manager_content_block_workflow_path(@content_block_document.latest_draft, step: :edit_draft)}</p>"),
show_banner_title: false,
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<% content_for :context, context %>
<% content_for :title, "Do you want to save your progress, or delete the draft entirely?" %>
<% content_for :title, "Do you want to save your draft, or delete it?" %>

<div class="govuk-button-group govuk-!-margin-bottom-6">
<div>
<%= render "govuk_publishing_components/components/button", {
text: "Save and come back later",
text: "Save for later",
href: content_block_manager.content_block_manager_content_block_document_path(@content_block_edition.document),
} %>
</div>
Expand All @@ -17,7 +17,7 @@
method: :patch,
) do %>
<%= render "govuk_publishing_components/components/button", {
text: "Delete in-progress draft",
text: "Delete draft",
name: "_method",
value: "delete",
type: "submit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
end

When("I choose to delete the in-progress draft") do
click_button "Delete in-progress draft"
click_button "Delete draft"
end

When("I click to save and come back later") do
click_link "Save and come back later"
click_link "Save for later"
end

When("I click the cancel link") do
Expand Down Expand Up @@ -421,11 +421,11 @@
end

Then(/^I should see a notification that a draft is in progress$/) do
expect(page).to have_content("A newer draft exists for this content block")
expect(page).to have_content("There’s a saved draft of this content block")
end

Then(/^I should not see a notification that a draft is in progress$/) do
expect(page).to_not have_content("A newer draft exists for this content block")
expect(page).to_not have_content("There’s a saved draft of this content block")
end

Then("there should be no draft editions remaining") do
Expand Down

0 comments on commit b2491b0

Please sign in to comment.