Test IDs Reference
This page documents the stable data-testid attributes used throughout PassTheNote for reliable automation testing. All components maintain consistent test IDs across releases to ensure your test suites remain stable.
Test ID Schema Version: 1.0 • Stable as of December 2025
Authentication
| Element | data-testid | Location | Notes |
|---|---|---|---|
| Login page container | ptn-login-page | /auth/login | Main login page wrapper |
| Email input field | ptn-login-email-input | /auth/login | Email/username input |
| Password input field | ptn-login-password-input | /auth/login | Password input |
| Login submit button | ptn-login-submit-button | /auth/login | Primary submit button |
| Signup name input | ptn-signup-name-input | /auth/signup | Full name field |
| Signup email input | ptn-signup-email-input | /auth/signup | Email field |
| Signup password input | ptn-signup-password-input | /auth/signup | Password field with strength meter |
| Forgot password email | ptn-forgot-email-input | /auth/forgot-password | Email for password reset |
| Reset password page | ptn-reset-page | /auth/reset-password | Reset password container |
Notes & Knowledge Sharing
| Element | data-testid | Location | Notes |
|---|---|---|---|
| Notes list view | ptn-notes-list-view | /notes | List view container |
| Notes grid view | ptn-notes-grid-view | /notes | Grid view container |
| Note card | ptn-note-card-{id} | /notes | Individual note card with ID |
| Note card title | ptn-note-card-title | /notes | Note title text |
| Search input | ptn-notes-search-input | /notes | Keyword search field |
| Tag filter buttons | ptn-notes-tag-{tag} | /notes | Tag filter chips (multiple) |
| Type filter buttons | ptn-notes-type-{type} | /notes | Note type filters |
| Comment submit button | ptn-note-comment-submit-button | /notes/[id] | Post comment button |
E-Commerce
| Element | data-testid | Location | Notes |
|---|---|---|---|
| Product card | ptn-product-card | /app/products | Individual product (multiple) |
| Product name | ptn-product-name | /app/products | Product title text |
| Product price | ptn-product-price | /app/products | Price display |
| Add to cart button | ptn-product-add-button | /app/products | Add to cart action |
| Cart item | ptn-cart-item | /app/cart | Each cart line item |
| Cart item name | ptn-cart-item-name | /app/cart | Product name in cart |
| Cart item quantity | ptn-cart-item-quantity | /app/cart | Quantity controls |
| Cart item remove | ptn-cart-item-remove | /app/cart | Remove from cart button |
| Cart subtotal | ptn-cart-subtotal | /app/cart | Subtotal price display |
| Checkout button | ptn-cart-checkout-button | /app/cart | Proceed to checkout |
Admin Dashboard
| Element | data-testid | Location | Notes |
|---|---|---|---|
| Dashboard page | ptn-dashboard-page | /app/dashboard | User dashboard container |
| Dashboard notes snapshot | dashboard-notes-snapshot | /app/dashboard | Recent notes widget |
| Quick action buttons | quick-action-{id} | /app/dashboard | Quick action shortcuts |
| Activity filter buttons | activity-filter-{type} | /app/dashboard | Activity type filters |
| Feature flag toggles | feature-flag-{id} | /app/dashboard | Testing mode toggles |
API Explorer & Testing
| Element | data-testid | Location | Notes |
|---|---|---|---|
| Send request button | ptn-api-explorer-send-button | /app/api-explorer | Execute API call |
| Response status | ptn-api-explorer-response-status | /app/api-explorer | HTTP status code display |
| Endpoint service filters | Various endpoint IDs | /app/api-explorer | Auth, Products, Orders, etc. |
Practice Challenges
| Element | data-testid | Location | Notes |
|---|---|---|---|
| Challenge cards | Various challenge elements | /practice-challenges | Module-specific challenge cards |
| LinkedIn share buttons | Pre-filled share links | /practice-challenges | Social sharing CTAs |
Global Navigation & UI
| Element | data-testid | Location | Notes |
|---|---|---|---|
| Top navigation | top-nav | Global | Main navbar container |
| Navbar brand/logo | ptn-navbar-brand | Global | PassTheNote logo link |
| Navbar login button | ptn-navbar-login-button | Global | Login CTA in navbar |
| Navbar signup button | ptn-navbar-signup-button | Global | Sign up CTA in navbar |
| User menu dropdown | top-nav-user-menu | Global (authenticated) | User profile dropdown |
| Logout button | ptn-nav-logout-btn | User menu | Sign out action |
| Admin link | ptn-nav-admin-link | User menu (admin only) | Admin dashboard link |
Usage Tips
- Selector Strategy: Use
data-testidas your primary selector. Example:cy.get('[data-testid="login-form"]')orpage.locator('[data-testid="login-form"]') - Stability Promise: Test IDs in this schema will remain stable across minor version updates. Breaking changes will be documented with version bumps.
- Multiple Instances: Elements like
note-card,product-cardappear multiple times. UsegetAllByTestId()or index-based selection. - Dynamic Content: In Chaos Mode, test IDs remain stable even when other attributes randomize—perfect for practicing resilient selector strategies.
- Missing IDs? If you find an element without a test ID that should have one, please report it via the issue tracker.
- API Testing: For REST API automation, see our API Documentation and download the Postman Collection.