Skip to content

Project Organization feature cypress tests with improvements/bug fixes#844

Draft
gingerknight wants to merge 10 commits intodevelopfrom
project-cypress
Draft

Project Organization feature cypress tests with improvements/bug fixes#844
gingerknight wants to merge 10 commits intodevelopfrom
project-cypress

Conversation

@gingerknight
Copy link
Contributor

Summary

  • Add 18 new smoke tests for the Project Organization feature (12 → 30 total)
  • Standardize all test selectors from mixed data-cy/data-testid to data-testid only
  • Replace all hardcoded cy.wait() calls in helper files with deterministic API intercepts and DOM assertions
  • Fix e2e login flow to handle both single-page and two-step Cognito auth
  • Fix e2e test failures in bedrock-model-workflow and chat specs (7 failing → 0 failing)

Changes

  • ~55% faster E2e suite runtime
  • ~9% faster on shared smoke specs

New Project Smoke Tests

  • project.shared.spec.ts: 18 tests covering view toggle, CRUD, session assignment/removal
  • projectHelpers.ts: Helper functions for project creation, rename, delete, and view switching
  • Smoke fixtures for project and session API stubs with stateful mock data
  • smoke/support/commands.ts: Added project and session API stubs with in-memory state

Test Selector Standardization

  • Added data-testid attributes to 6 React components (Chat, ChatPromptInput, RagOptions, BaseModelConfig, Sessions, ProjectsSection)
  • Updated all Cypress helper selectors to use data-testid with fallback to old selectors
  • Migrated all 10 data-cydata-testid in React components and Cypress tests

Hardcoded Wait Removal

  • Replaced 9 cy.wait(ms) calls across 6 helper files with:
    • API intercepts (cy.intercept + cy.wait('@alias')) for delete operations
    • DOM assertions (aria-pressed, element visibility, content checks) for UI state changes

Tests

  • All 30 smoke tests passing in CI
  • No regressions on existing smoke tests
  • E2e test run against deployed environment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

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.

1 participant