Skip to content

Commit

Permalink
Use the actual file count rather than a hard-coded value (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorcorrea authored Mar 22, 2024
1 parent 70eb4fc commit cdf3362
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/projects/contents.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
This will generate a list of 1,234,567 files and their attributes in a downloadable CSV. Do you wish to continue?
This will generate a list of <%= @num_files %> files and their attributes in a downloadable CSV. Do you wish to continue?
</div>
<div class="modal-footer">
<button type="button" id="request-list-contents" class="btn btn-success" data-list-contents-path="<%= project_list_contents_path %>" >Yes</button>
Expand Down
10 changes: 10 additions & 0 deletions spec/fixtures/files/project_with_files_asset_get_response.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,17 @@
<unique-name-index>true</unique-name-index>
<store inherited="true">data</store>
<contained-asset-index cascade="true">true</contained-asset-index>
<accumulator type="collection.asset.count" name="idp-coarse-count">
<stime>9773</stime>
<value>
<collections>0</collections>
<non-collections>4</non-collections>
</value>
</accumulator>
</collection>
<members>
<static>4</static>
</members>
</asset>
</result>
</reply>
Expand Down
2 changes: 1 addition & 1 deletion spec/system/project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@

expect(page).to have_content("List All Files")
click_on "List All Files"
expect(page).to have_content("This will generate a list of 1,234,567 files and their attributes in a downloadable CSV. Do you wish to continue?")
expect(page).to have_content("This will generate a list of 4 files and their attributes in a downloadable CSV. Do you wish to continue?")
expect(page).to have_content("Yes")
sleep 1
click_on "Yes"
Expand Down

0 comments on commit cdf3362

Please sign in to comment.