Skip to content

Commit

Permalink
Merge pull request #26 from rewiringamerica/tomc/cypress-ri
Browse files Browse the repository at this point in the history
add cypress test for RI calc, ignore videos
  • Loading branch information
RandomEtc authored Oct 2, 2023
2 parents 6a6cc94 + d5a0e91 commit f6a8672
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ yarn-error.log*

# parcel
.parcel-cache

# cypress
cypress/videos/*.mp4
54 changes: 54 additions & 0 deletions cypress/e2e/state-calculator.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/// <reference types="Cypress" />

describe('template spec', () => {
it('passes', () => {
cy.visit('http://localhost:1234/rhode-island.html');
cy.get('rewiring-america-state-calculator').should('exist');

cy.get('rewiring-america-state-calculator')
.shadow()
.contains('Your household info');

cy.get('rewiring-america-state-calculator')
.shadow()
.find('input#zip')
.type('02859{enter}');

cy.get('rewiring-america-state-calculator')
.shadow()
.contains('Incentives available to you in Rhode Island');

cy.get('rewiring-america-state-calculator')
.shadow()
.find('select#utility')
.should("exist");

cy.get('rewiring-america-state-calculator')
.shadow()
.contains("Incentives you're interested in");

cy.get('rewiring-america-state-calculator')
.shadow()
.contains('$8,000 off a heat pump');

cy.get('rewiring-america-state-calculator')
.shadow()
.contains('$1,250/ton off a heat pump');

cy.get('rewiring-america-state-calculator')
.shadow()
.contains('$350/ton off a heat pump');

cy.get('rewiring-america-state-calculator')
.shadow()
.contains('30% of cost of geothermal heating installation');

cy.get('rewiring-america-state-calculator')
.shadow()
.contains('$2,000 off a heat pump');

cy.get('rewiring-america-state-calculator')
.shadow()
.contains("Other incentives available to you");
});
});
Binary file removed cypress/videos/calculator.cy.ts.mp4
Binary file not shown.

1 comment on commit f6a8672

@vercel
Copy link

@vercel vercel bot commented on f6a8672 Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.