mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-29 11:01:18 -07:00
updates filename and comments (#378)
This commit is contained in:
parent
a1a3a013a8
commit
e5908cf7d7
2 changed files with 13 additions and 4 deletions
12
.github/workflows/e2e.yml
vendored
12
.github/workflows/e2e.yml
vendored
|
@ -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
|
|
@ -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');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue