Skip to content

Commit

Permalink
chore: fix component tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Aug 22, 2023
1 parent bcfb4e8 commit ada67b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/actions/test-e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ runs:
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-snapshots-components-${{ strategy.job-index }}
name: cypress-snapshots-components-${{ strategy.job-index + 1 }}
path: test/cypress/snapshots
6 changes: 3 additions & 3 deletions packages/components/src/utils/mask/types/mask-date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class DateMask extends AbstractMask {
}
return value.padStart(2, '0')
},
// mask: 'D',
mask: 'D',
}),
new MaskBlock({ from: 2, to: 3, mask: locale => dateSeparator(locale), isSeparator: true }),
new MaskBlock({
Expand All @@ -34,10 +34,10 @@ export class DateMask extends AbstractMask {
}
return value.padStart(2, '0')
},
// mask: 'M',
mask: 'M',
}),
new MaskBlock({ from: 5, to: 6, mask: locale => dateSeparator(locale), isSeparator: true }),
new MaskBlock({ from: 6, to: 10, allowedKeys: [...NUMBER_KEYS] /*, mask: 'Y'*/ }),
new MaskBlock({ from: 6, to: 10, allowedKeys: [...NUMBER_KEYS], mask: 'Y' }),
])
}

Expand Down
4 changes: 2 additions & 2 deletions test/cypress/component/bal-input-date.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ describe('bal-input-date.cy.ts', () => {
cy.get('@click').should('have.been.calledOnce')
})

it.only('should not fire a click event, because the input is disabled', () => {
cy.get('bal-input-date').invoke('attr', 'disabled', true).waitForComponents()
it('should not fire a click event, because the input is disabled', () => {
cy.get('bal-input-date').invoke('attr', 'disabled', true)
cy.get('bal-input-date').find('input').should('have.class', 'is-disabled')
cy.get('bal-input-date').find('input').should('have.attr', 'aria-disabled', 'true')
cy.get('bal-input-date').find('input').should('have.attr', 'disabled', 'disabled')
Expand Down

0 comments on commit ada67b0

Please sign in to comment.