diff --git a/client/cypress/e2e/downloadPacket.spec.js b/client/cypress/e2e/downloadPacket.spec.js
index 2873ad67..790c97fb 100644
--- a/client/cypress/e2e/downloadPacket.spec.js
+++ b/client/cypress/e2e/downloadPacket.spec.js
@@ -2,22 +2,21 @@
describe('Census Block Group download', () => {
it('validate file download', () => {
- // const filename = `usa.zip`;
- cy.visit('localhost:8000/en/cejst');
+ const filename = `Screening+Tool+Data.zip`;
+ cy.visit('localhost:8000/en/methodology');
- // Todo VS: Download packet component is being moved. Will be re-enabled with
- // cy.get('#download-link').invoke('attr', 'target', '_blank');
- // cy.intercept(`https://justice40-data.s3.amazonaws.com/Score/${filename}`,
- // {
- // body: 'success',
- // headers: {
- // 'Content-Type': 'text/html; charset=utf-8',
- // 'Content-Disposition': 'attachment',
- // },
- // },
- // ).as('downloadRequest');
- // cy.get('button[class*="downloadPacket"]').click();
- // cy.wait('@downloadRequest');
- // cy.readFile(`cypress/downloads/${filename}`).should('exist');
+ cy.get('[data-cy="download-link"]').invoke('attr', 'target', '_blank');
+ cy.intercept(`https://justice40-data.s3.amazonaws.com/data-pipeline/data/score/downloadable/${filename}`,
+ {
+ body: 'success',
+ headers: {
+ 'Content-Type': 'text/html; charset=utf-8',
+ 'Content-Disposition': 'attachment',
+ },
+ },
+ ).as('downloadRequest');
+ cy.get('button[class*="downloadPacket"]').click();
+ cy.wait('@downloadRequest');
+ cy.readFile(`cypress/downloads/${filename}`).should('exist');
});
});
diff --git a/client/src/components/downloadPacket.module.scss b/client/src/components/DownloadPacket/downloadPacket.module.scss
similarity index 90%
rename from client/src/components/downloadPacket.module.scss
rename to client/src/components/DownloadPacket/downloadPacket.module.scss
index 3e61ef94..514c05c5 100644
--- a/client/src/components/downloadPacket.module.scss
+++ b/client/src/components/DownloadPacket/downloadPacket.module.scss
@@ -1,20 +1,15 @@
$primary-color: #112f4e;
.downloadBoxContainer {
- flex: 0 0 350px;
- // flex: 1;
- // border: 1px solid red;
color: whitesmoke;
margin: auto;
.downloadBox {
background-color: $primary-color;
- min-width: 400px;
border-radius: 6px 6px;
.downloadBoxTextBox {
- // border: 2px solid green;
padding: 25px 25px;
display: flex;
flex-direction: column;
diff --git a/client/src/components/downloadPacket.module.scss.d.ts b/client/src/components/DownloadPacket/downloadPacket.module.scss.d.ts
similarity index 100%
rename from client/src/components/downloadPacket.module.scss.d.ts
rename to client/src/components/DownloadPacket/downloadPacket.module.scss.d.ts
diff --git a/client/src/components/downloadPacket.test.tsx b/client/src/components/DownloadPacket/downloadPacket.test.tsx
similarity index 51%
rename from client/src/components/downloadPacket.test.tsx
rename to client/src/components/DownloadPacket/downloadPacket.test.tsx
index fab50aa8..36f3dcf0 100644
--- a/client/src/components/downloadPacket.test.tsx
+++ b/client/src/components/DownloadPacket/downloadPacket.test.tsx
@@ -1,9 +1,14 @@
import * as React from 'react';
import {render, screen} from '@testing-library/react';
-import DownloadPacket from './downloadPacket';
+import {LocalizedComponent} from '../../test/testHelpers';
+import DownloadPacket from '.';
test('download packet component defined', () => {
- render(
- The Just Progress tool combines demographic, environmental, and - socio-economic data to generate a cumulative index score, referred - to as the Just Progress Index. The tool currently utilizes - national, - publically-available data from the United States Census Bureau’s - American Community Survey (ACS) and the EPA’s EJScreen tool. + {intl.formatMessage(messages.methodologyPagep1)}
- The various inputs into the Just Progress Index are averaged into - 2 categories: Pollution Burden and Demographics. -
-- Pollution Burden: health risks arising from proximity and - potential exposures to pollution and other adverse environmental - conditions -
-- Demographics: sensitive populations and socioeconomic factors that - make a community more vulnerable -
-- Pollution Burden average x Demographics average = Just Progress - Index + {intl.formatMessage(messages.methodologyPagep2)}