Skip to content

Commit cb52025

Browse files
Merge pull request #477 from CodeForPhilly/fixes/cypress-hardening
Fixes/cypress hardening
2 parents 54c014f + 14ab0fd commit cb52025

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

.github/workflows/pythonapp.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,18 @@ jobs:
4141
run: |
4242
streamlit run src/app.py &
4343
- name: Cypress
44-
uses: cypress-io/github-action@v1.23.2
44+
uses: cypress-io/github-action@v1
4545
with:
4646
working-directory: e2e
4747
wait-on: 'http://localhost:8000'
4848
wait-on-timeout: 300
49-
49+
- uses: actions/upload-artifact@v1
50+
if: failure()
51+
with:
52+
name: cypress-screenshots
53+
path: e2e/cypress/screenshots
54+
- uses: actions/upload-artifact@v1
55+
if: always()
56+
with:
57+
name: cypress-videos
58+
path: e2e/cypress/videos

e2e/cypress.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
"baseUrl": "http://localhost:8000"
2+
"baseUrl": "http://localhost:8000",
3+
"viewportWidth": 1200,
4+
"viewportHeight": 660
35
}

e2e/cypress/integration/tests/steppers.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ context('Increment steppers', () => {
88
it('Increment regional population', () => {
99
cy.contains('Hospitalized Admissions peaks at 300');
1010

11-
cy.get('input.st-al').eq(0)
11+
cy.get('input[type=number]').eq(0)
1212
.should('has.value', '3600000');
1313

1414
cy.get('.step-up').eq(0).click();
1515

16-
cy.get('input.st-al').eq(0)
16+
cy.get('input[type=number]').eq(0)
1717
.should('has.value', '3600001');
1818

1919
cy.contains('Hospitalized Admissions peaks at 300');
@@ -22,12 +22,12 @@ context('Increment steppers', () => {
2222
it('Increment hospital market share', () => {
2323
cy.contains('Hospitalized Admissions peaks at 300');
2424

25-
cy.get('input.st-al').eq(1)
25+
cy.get('input[type=number]').eq(1)
2626
.should('has.value', '15');
2727

2828
cy.get('.step-up').eq(1).click();
2929

30-
cy.get('input.st-al').eq(1)
30+
cy.get('input[type=number]').eq(1)
3131
.should('has.value', '15.1');
3232

3333
cy.contains('Hospitalized Admissions peaks at 302');
@@ -36,12 +36,12 @@ context('Increment steppers', () => {
3636
it('Increment doubling time', () => {
3737
cy.contains('Hospitalized Admissions peaks at 300');
3838

39-
cy.get('input.st-al').eq(3)
39+
cy.get('input[type=number]').eq(3)
4040
.should('has.value', '4');
4141

4242
cy.get('.step-up').eq(3).click();
4343

44-
cy.get('input.st-al').eq(3)
44+
cy.get('input[type=number]').eq(3)
4545
.should('has.value', '4.25');
4646

4747
cy.contains('Hospitalized Admissions peaks at 272');

0 commit comments

Comments
 (0)