Skip to content

Commit 3adc632

Browse files
fix: use stable selector for cypress input tests
1 parent 240545d commit 3adc632

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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)