Merge pull request #1671 from consul/feature/1590#display_draft_comments_by_default

Display Draft Version comments panel by default
This commit is contained in:
Alberto
2017-06-21 17:36:46 +02:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -31,7 +31,7 @@
</div>
<div class="row draft-allegation medium-collapse">
<div class="row draft-allegation medium-collapse comments-on">
<div class="small-12 calc-index column <%= "js-toggle-allegations" unless @draft_version.final_version? %>">
<div class="draft-panel">
<div>

View File

@@ -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"