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

@ -1,8 +1,14 @@
# Full command list of cypress github actions:
# https://github.com/cypress-io/github-action#cypress-iogithub-action--
name: End to end tests
on:
# push
# To run tests on the push event of a specific branch:
# push:
# branches:
# - vimusds/cypress-debug-download
schedule:
# runs tests every day at 12am ET (4am UTC)
# runs tests every day at 12am ET (4am UTC):
- cron: '0 4 * * *'
jobs:
nightly:
@ -18,3 +24,5 @@ jobs:
working-directory: ${{env.working-directory}}
start: npm start
wait-on: 'http://localhost:8000'
# To run only specific spec/tests:
# spec: cypress/e2e/downloadPacket.spec.js

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');
});
});