From 6c975998c5135c8d4e358a6090e009b535c36134 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 21 Jun 2017 02:54:00 +0200 Subject: [PATCH 1/2] Increase darft version feature spec scenario to expect comments visible --- spec/features/legislation/draft_versions_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/features/legislation/draft_versions_spec.rb b/spec/features/legislation/draft_versions_spec.rb index 01b307f9a..7288c0cf0 100644 --- a/spec/features/legislation/draft_versions_spec.rb +++ b/spec/features/legislation/draft_versions_spec.rb @@ -175,12 +175,14 @@ feature 'Legislation Draft Versions' do draft_version = create(:legislation_draft_version, :published) annotation1 = create(:legislation_annotation, draft_version: draft_version, text: "my annotation", ranges: [{"start"=>"/p[1]", "startOffset"=>5, "end"=>"/p[1]", "endOffset"=>10}]) annotation2 = create(:legislation_annotation, draft_version: draft_version, text: "my other annotation", ranges: [{"start"=>"/p[1]", "startOffset"=>12, "end"=>"/p[1]", "endOffset"=>19}]) + comment = create(:comment, commentable: annotation1) visit legislation_process_draft_version_path(draft_version.process, draft_version) expect(page).to have_css ".annotator-hl" first(:css, ".annotator-hl").click expect(page).to have_content "my annotation" + expect(page).to have_content comment.body all(".annotator-hl")[1].trigger('click') expect(page).to have_content "my other annotation" From 56434cf197f055d74a1f44c2caa158ea2d62ed31 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 21 Jun 2017 02:54:31 +0200 Subject: [PATCH 2/2] Make Draft Version comments panel visible by default, that hides Table of Contents --- app/views/legislation/draft_versions/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/legislation/draft_versions/show.html.erb b/app/views/legislation/draft_versions/show.html.erb index b330ca2ed..754d02494 100644 --- a/app/views/legislation/draft_versions/show.html.erb +++ b/app/views/legislation/draft_versions/show.html.erb @@ -31,7 +31,7 @@ -
+
">