Skip to content

Commit 217f5bf

Browse files
committed
Add preview link expiry text to compare view
1 parent eb80731 commit 217f5bf

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

app/views/application/fact_check_comparison.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
padding: true,
3232
} %>
3333
<p class="govuk-body"><%= link_to t("fact_check_comparison.preview_link"), @draft_url, class: "govuk-link--no-visited-state govuk-link", target: :_blank, rel: :noopener %></p>
34+
<p class="govuk-body"><%= t("fact_check_comparison.preview_link_expiry") %></p>
3435
<hr class="govuk-section-break govuk-section-break govuk-section-break--visible govuk-!-margin-top-6 govuk-!-margin-bottom-3" />
3536
<% end %>
3637
<%= render "govuk_publishing_components/components/heading", {

config/locales/en.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ en:
66
respond_to_button: "Respond to fact check"
77
preview_heading: "Preview"
88
preview_link: "Preview the draft page (opens in new tab)"
9+
preview_link_expiry: The preview link will expire when the content is published.
910
guidance_heading: "Guidance"
1011
guidance_deleted: "Red highlights and a minus sign (–) show content that’s been deleted"
1112
guidance_added: "Green highlights and a plus sign (+) show content that’s been added"

spec/system/fact_check_comparison_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
expect(page).to have_text(I18n.t("fact_check_comparison.preview_heading"))
4242
expect(page).to have_link(I18n.t("fact_check_comparison.preview_link"))
43+
expect(page).to have_text(I18n.t("fact_check_comparison.preview_link_expiry"))
4344
end
4445

4546
it "displays the guidance sidebar" do
@@ -61,6 +62,7 @@
6162

6263
expect(page).not_to have_text(I18n.t("fact_check_comparison.preview_heading"))
6364
expect(page).not_to have_link(I18n.t("fact_check_comparison.preview_link"))
65+
expect(page).not_to have_text(I18n.t("fact_check_comparison.preview_link_expiry"))
6466
end
6567
end
6668
end

0 commit comments

Comments
 (0)