Skip to content

Commit

Permalink
Merge pull request #713 from projectcypress/cypress301
Browse files Browse the repository at this point in the history
Cypress 3.0.1 patches
  • Loading branch information
Michael O'Keefe committed Sep 15, 2016
2 parents 54b0298 + 55b3896 commit ef0894e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -112,6 +112,7 @@ group :test do
gem 'simplecov', require: false
gem 'brakeman', require: false
gem 'bundler-audit'
gem 'launchy'
end

group :production do
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Expand Up @@ -225,6 +225,8 @@ GEM
railties (>= 3.2.16)
json (1.8.3)
kgio (2.10.0)
launchy (2.4.3)
addressable (~> 2.3)
local_time (1.0.3)
coffee-rails
log4r (1.1.10)
Expand Down Expand Up @@ -469,6 +471,7 @@ DEPENDENCIES
jquery-datatables-rails (~> 3.3.0)
jquery-rails (~> 4.0.4)
jquery-ui-rails (~> 5.0.5)
launchy
local_time
minitest
minitest-rails
Expand Down
2 changes: 1 addition & 1 deletion app/views/application/_header_product.html.erb
Expand Up @@ -4,7 +4,7 @@
<%= button_to edit_vendor_product_path(@product.vendor, @product), :method => :get, :class => "btn btn-default" do %>
<i class="fa fa-fw fa-wrench" aria-hidden="true"></i> Edit Product
<% end %>
<% if mode_atl?%>
<% if current_user.user_role?([:atl, :admin]) %>
<%= button_to report_vendor_product_path(@product.vendor, @product), :method => :get, :class => "btn btn-default" do %>
<i class="fa fa-fw fa-download" aria-hidden="true"></i> Download Report
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion config/cypress.yml
Expand Up @@ -3,7 +3,7 @@ effective_date:
month: 12
day: 31

version: 3.0.0
version: 3.0.1

default_bundle: "3.0.0"

Expand Down
8 changes: 4 additions & 4 deletions features/products/show.feature
Expand Up @@ -56,17 +56,17 @@ Scenario: Cannot View Download All Patients
Then the page should be accessible according to: section508
Then the page should be accessible according to: wcag2aa

Scenario: Can Download Report in ATL Mode
Scenario: Can Download Report
When a user creates a product with c2 certifications and visits that product page
And all product tests have a state of ready
And the application is in ATL mode
And the application is not in ATL mode
And the user visits the product page
Then the user should be able to download the report

Scenario: Cannot Download Report
Scenario: Cannot Download Report when not an ATL in ATL mode
When a user creates a product with c2 certifications and visits that product page
And all product tests have a state of ready
And the application is not in ATL mode
And the application is in ATL mode
And the user visits the product page
Then the user should not be able to download the report

Expand Down
2 changes: 1 addition & 1 deletion lib/cypress/create_download_zip.rb
Expand Up @@ -72,7 +72,7 @@ def self.create_c1_criteria_zip(checklist_test, criteria_list)
checklist_test.measures.each do |m|
example_patients[m.cms_id] = Cypress::ExamplePatientFinder.find_example_patient(m)
end
formatter = formatter_for_patients(records, 'html')
formatter = formatter_for_patients(example_patients.values, 'html')
Zip::ZipOutputStream.open(file.path) do |z|
add_file_to_zip(z, 'criteria_list.html', criteria_list)
example_patients.each do |measure_id, patient|
Expand Down

0 comments on commit ef0894e

Please sign in to comment.