Skip to content

Commit

Permalink
test(angular): add comments explaining the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney committed Aug 6, 2024
1 parent e8c66e6 commit aa31b62
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/angular/test/base/e2e/src/lazy/router-link.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ describe('Router Link', () => {
});
});

// Angular sets the `tabindex` to `"0"` on any element that uses
// the `routerLink` directive. Ionic removes the `tabindex` from
// components that wrap an `a` or `button` element, so we are
// checking here that it is only removed from Ionic components.
// https://github.com/ionic-team/ionic-framework/issues/20632
describe('tabindex', () => {
it('should have tabindex="0" with a native span', () => {
cy.get('#span').should('have.attr', 'tabindex', '0');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ describe('RouterLink', () => {
cy.url().should('include', '/standalone/popover');
});

// Angular sets the `tabindex` to `"0"` on any element that uses
// the `routerLink` directive. Ionic removes the `tabindex` from
// components that wrap an `a` or `button` element, so we are
// checking here that it is only removed from Ionic components.
// https://github.com/ionic-team/ionic-framework/issues/20632
it('should have tabindex="0" with a native span', () => {
cy.get('span').should('have.attr', 'tabindex', '0');
});
Expand Down

0 comments on commit aa31b62

Please sign in to comment.