Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Programmatically determine when links should open in new tabs #1100

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

meissadia
Copy link
Contributor

@meissadia meissadia commented Dec 20, 2024

Closes #1071

Changes

  • New hook useIsNewTabImplied that determines when links should open in new tabs
  • Update test utilities:
    • Rename to clarify their intent (openLink, openLinkNewTab)
    • New helpers (expectLinkOpensSameTab, expectLinkOpensNewTab)
  • Add E2E tests to verify link targets on each page
    • Unauthenticated homepage
    • Complete your user profile
    • Authenticated landing page
    • View your user profile
    • View your financial institution profile
    • Updated your financial institution profile
    • Filing home for each filing step
      • Start filing
      • Resolve syntax errors
      • Resolve logic errors
      • Review warnings
      • Provide filing details
      • Sign and Submit
    • Filing homepage for each step of the Filing process
      • Provide type of financial institution
      • Upload file
      • Resolve syntax errors
      • Resolve logic errors
      • Review warnings
      • Provide filing details
      • Sign and submit

Follow-up ticket?

I did a refactor of E2E tests to address my concerns about:

  • Code duplication
  • Improve reusability of selectors for common page elements
  • Create reusable test functions for common patterns

However there is still inconsistency in

  • Naming of tests (i.e. test("Verify link targets", ...))
  • Where the verifications are implemented (some in separate files, some squished in to existing files)
  • Grouping of tests

It is probably easiest to identify where/how to make these improvements here in the same PR. At the same time, I feel like the tests we have implemented do a solid job of verifying the functionality and would identify any breaking changes, so are probably "good enough as-is".

@meissadia meissadia force-pushed the when-to-open-links-in-new-tab branch from b96809e to e2c6403 Compare December 30, 2024 19:43
@meissadia meissadia enabled auto-merge (squash) January 7, 2025 20:21
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.

Update when links open in new tab
1 participant