Skip to content

feat: add IonTabButtonCypress helper for ion-tab-button#19

Merged
distante merged 2 commits intomainfrom
ssd/tab-button
Apr 18, 2026
Merged

feat: add IonTabButtonCypress helper for ion-tab-button#19
distante merged 2 commits intomainfrom
ssd/tab-button

Conversation

@distante
Copy link
Copy Markdown
Owner

Summary

  • Adds IonTabButtonCypress class with a click() method that pierces the shadow DOM to interact with the inner <a class="button-native"> element
  • Exports ionTabButtonCypress singleton via the existing barrel exports
  • Adds a dedicated test fixture page (html/ion-tab-button.html) with three tab buttons and a status indicator for asserting click events
  • Adds a Cypress spec covering CSS selector, jQuery element, and isolation test cases

Exposes a click() method that pierces the shadow DOM to interact with
the inner <a class="button-native"> element, following the same pattern
as existing component helpers.
Copilot AI review requested due to automatic review settings April 18, 2026 12:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class Cypress support for interacting with Ionic ion-tab-button by introducing a dedicated helper, a fixture page to validate behavior, and an accompanying Cypress spec.

Changes:

  • Added IonTabButtonCypress helper with a click() that targets the inner native element inside the component’s shadow DOM.
  • Exported the helper via the components barrel exports.
  • Added an HTML fixture page + script and a Cypress spec to validate clicking via CSS selector and jQuery element.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/components/tab-button.ts New IonTabButtonCypress helper that clicks the inner native element.
src/components/index.ts Re-exports the new tab-button helper from the components barrel.
html/ion-tab-button.html New fixture page with multiple tab buttons and a click status indicator.
html/index.html Adds navigation link to the new fixture page.
html/assets/ion-tab-button.mjs Fixture script that updates status on ionTabButtonClick.
cypress/e2e/components/tab-button.spec.ts New Cypress coverage for tab-button clicking scenarios.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread html/index.html
@distante distante merged commit c98b1f2 into main Apr 18, 2026
5 checks passed
@distante distante deleted the ssd/tab-button branch April 18, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants