Skip to content
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

(872) Copy tweaks for draft journey #9890

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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