mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 10:04:18 -08:00
* integrate gherkin/cucumber w/ cypress - change cypress.json config from e2e back to standard integration - add cypress-cucumber-preprocessor - add integration test of about page * add a title to each page * add intl to the 404 page * Refactor explore tool page - add intl to static strings - replace component css with <Grid> layout * Add title to contact page * add intl to title of page * Add gherkin tests for nav to about page - navigate from any page to the about page - ensure each link has the title correct on that page
22 lines
788 B
JavaScript
22 lines
788 B
JavaScript
// / <reference types="Cypress" />
|
|
|
|
describe('Census Block Group packet download', () => {
|
|
const filename = `Screening_Tool_Data.zip`;
|
|
it('validate file download', () => {
|
|
cy.visit('localhost:8000/en/methodology');
|
|
|
|
cy.get('[data-cy="download-link"]').invoke('attr', 'target', '_blank');
|
|
cy.intercept(`https://d3jqyw10j8e7p9.cloudfront.net/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');
|
|
});
|
|
});
|