Skip to content

Commit

Permalink
add cypress test for RI calc, ignore videos
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomEtc committed Oct 1, 2023
1 parent 55a965d commit d5a0e91
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.

0 comments on commit d5a0e91

Please sign in to comment.