mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-30 17:11:16 -07:00
Adds download packet to methodology page (Sprint 4 designs) (#578)
* adds responsive download packet * adds tests and intl
This commit is contained in:
parent
e8bafc813d
commit
b3f63c29f6
7 changed files with 118 additions and 79 deletions
|
@ -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');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue