Skip to content

Conversation

@shayneahchoon
Copy link
Contributor

Resolves JIRA: No-Jira

Summary

Removes redundant cypress helper functions.

Code changes

  • A bullet point list of key code changes that have been made.

Developer Checklist

  • UX
    • UX Criteria met (visual UX & screenreader UX)
  • Accessibility
    • Accessibility Acceptance Criteria met
    • Accessibility swarm completed
    • Component Health updated
    • P1 accessibility bugs resolved
    • P2/P3 accessibility bugs planned (if not resolved)
  • Security
    • Security issues addressed
    • Threat Model updated
  • Documentation
    • Docs updated (runbook, READMEs)
  • Testing
    • Feature tested on relevant environments
  • Comms
    • Relevant parties notified of changes

Testing

  • Manual Testing required?
    • Local (Ready-For-Test, Local)
    • Test (Ready-For-Test, Test)
    • Preview (Ready-For-Test, Preview)
    • Live (Ready-For-Test, Live)
  • Manual Testing complete?
    • Local
    • Test
    • Preview
    • Live

Additional Testing Steps

  1. List the steps required to test this PR.

Useful Links

@shayneahchoon shayneahchoon marked this pull request as ready for review December 16, 2025 14:43

describe('Header Tests', () => {
const serviceName = config[service]?.name || service;
const serviceName = service;
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need aliased? Can we just use service throughout the is test?

Copy link
Contributor

@amoore108 amoore108 left a comment

Choose a reason for hiding this comment

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

Thanks for this, looks great 👍

@MeriemMechri MeriemMechri self-requested a review December 17, 2025 10:10
@eagerterrier eagerterrier requested a review from Copilot December 17, 2025 10:24
Copy link
Contributor

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

This PR removes redundant Cypress helper functions and configuration files to clean up the test suite. The refactoring eliminates the intermediate service configuration lookup that was mapping service identifiers to names, simplifying the codebase by using service identifiers directly.

Key changes:

  • Removed the entire settings.ts configuration file containing service-to-name mappings
  • Removed the services.ts helper that filtered services based on environment variables
  • Updated test files to use service identifiers directly instead of looking up service names

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
testsForCanonicalOnly.ts Simplified to use service identifier directly instead of looking up service name from config
testsForAMPOnly.ts Removed service config lookup, now passes service identifier directly to cy.getToggles
settings.ts Deleted entire file containing service configuration mappings
services.ts Deleted helper file that provided filtered service configurations
testsForAllCanonicalPages.ts Removed config lookup for serviceName, uses service identifier directly
testsForAllAMPPages.ts Simplified conditional by removing config lookup layer
atiAnalytics/assertions/*.ts (11 files) Cleaned up import paths to use relative imports from index file instead of deeply nested absolute paths
atiAnalytics/assertions/index.ts New file consolidating assertion functions previously imported from absolute paths
crossPlatformAssertion.ts Removed service config lookups, uses service identifier directly throughout

Copy link
Contributor

@MeriemMechri MeriemMechri left a comment

Choose a reason for hiding this comment

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

LGTM - thank you!

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.

4 participants