updates filename and comments (#378)

This commit is contained in:
Vim 2021-07-19 08:05:32 -07:00 committed by GitHub
commit e5908cf7d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View file

@ -2,9 +2,10 @@
describe('Census Block Group download', () => {
it('validate file download', () => {
const filename = `usa.zip`;
cy.visit('localhost:8000/en/cejst');
cy.get('#download-link').invoke('attr', 'target', '_blank');
cy.intercept('https://justice40-data.s3.amazonaws.com/Score/usa.zip',
cy.intercept(`https://justice40-data.s3.amazonaws.com/Score/${filename}`,
{
body: 'success',
headers: {
@ -15,6 +16,6 @@ describe('Census Block Group download', () => {
).as('downloadRequest');
cy.get('button[class*="downloadPacket"]').click();
cy.wait('@downloadRequest');
cy.readFile(`cypress/downloads/usa.csv`).should('exist');
cy.readFile(`cypress/downloads/${filename}`).should('exist');
});
});