Fix all failing cypress tests (#774)

* Fix all failing cypress tests

- update test name to be more appropriate
- update download packet tests to CDN
- update data-cy tag on About heading

* Update snapshot
This commit is contained in:
Vim 2021-10-05 15:52:03 -04:00 committed by GitHub
commit 819113ceb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 52 additions and 41 deletions

View file

@ -1,13 +1,14 @@
// / <reference types="Cypress" />
describe('Census Block Group packet download', () => {
describe('Does the 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}`,
cy.intercept('GET', '/data-pipeline/data/score/downloadable/Screening_Tool_Data.zip',
{
hostname: 'https://d3jqyw10j8e7p9.cloudfront.net',
body: 'success',
headers: {
'Content-Type': 'text/html; charset=utf-8',