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

Refactor Address input component test file to new format #3316

Merged

Conversation

precious-onyenaucheya-ons
Copy link
Contributor

@precious-onyenaucheya-ons precious-onyenaucheya-ons commented Aug 23, 2024

What is the context of this PR?

Fixes: ONSdigital/design-team#132
This PR involves refactoring of the address input test document to follow the Given, When, Then testing approach.

How to review this PR

Functionality:

  • Run the test suite using: yarn test --testNamePattern="FOR: Macro: Address-input"

Does this testing refactor meet the following success criteria:

  • Clearly structured.
  • Follows naming conventions.
  • Consistent.
  • Concise.
  • Suited to our codebase.
  • Compatible with existing testing framework.

Look at the refactored code in relation to:

  • The original test document.
  • The macro file.
  • The macro options file.

Checklist

This needs to be completed by the person raising the PR.

  • I have selected the correct Assignee
  • I have linked the correct Issue

@precious-onyenaucheya-ons precious-onyenaucheya-ons added the Tech improvements Tech debt, cleanup, code standardisation etc. label Aug 23, 2024
@precious-onyenaucheya-ons precious-onyenaucheya-ons requested a review from a team August 23, 2024 07:05
Copy link

netlify bot commented Aug 23, 2024

Deploy Preview for ons-design-system-preview ready!

Name Link
🔨 Latest commit 4ba1374
🔍 Latest deploy log https://app.netlify.com/sites/ons-design-system-preview/deploys/673622094928110007646c88
😎 Deploy Preview https://deploy-preview-3316--ons-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rmccar
Copy link
Contributor

rmccar commented Aug 23, 2024

I think part of the work on this was to move the examples like EXAMPLE_MANUAL_INPUT_FIELDS out into its own file and then be imported. Have a look at one of the ones Bali has done

@precious-onyenaucheya-ons precious-onyenaucheya-ons changed the title refactor address input test Refactor address-input test document Aug 23, 2024
@precious-onyenaucheya-ons precious-onyenaucheya-ons force-pushed the feature/132/refactor-address-input-test branch from a2e0924 to 496bd95 Compare September 5, 2024 15:35
@precious-onyenaucheya-ons precious-onyenaucheya-ons changed the title Refactor address-input test document Refactor address-input component test file to new format Sep 12, 2024
src/components/address-input/_macro.spec.js Outdated Show resolved Hide resolved
src/components/address-input/_macro.spec.js Outdated Show resolved Hide resolved
src/components/address-input/_macro.spec.js Outdated Show resolved Hide resolved
src/components/address-input/_macro.spec.js Outdated Show resolved Hide resolved
@rmccar rmccar changed the title Refactor address-input component test file to new format Refactor Address input component test file to new format Sep 27, 2024
Copy link
Contributor

@rmccar rmccar left a comment

Choose a reason for hiding this comment

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

Couple of minor things

src/components/address-input/_macro.spec.js Outdated Show resolved Hide resolved
src/components/address-input/_macro.spec.js Outdated Show resolved Hide resolved
@rmccar rmccar added the Do not merge Don't merge this PR until this label is removed label Oct 2, 2024
@rmccar rmccar removed the Do not merge Don't merge this PR until this label is removed label Oct 9, 2024
@precious-onyenaucheya-ons precious-onyenaucheya-ons merged commit 14ad695 into main Nov 14, 2024
25 checks passed
@precious-onyenaucheya-ons precious-onyenaucheya-ons deleted the feature/132/refactor-address-input-test branch November 14, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tech improvements Tech debt, cleanup, code standardisation etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testing refactor - Address input
5 participants