ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

chore(github-actions): use flexible options to update screenshots

Open thetaPC opened this issue 1 year ago • 0 comments

Issue number: N/A


What is the current behavior?

GitHub actions allow screenshots to be updated either by updating all the components or providing a component name.

If a component name is given, then the screenshots will only be updated on src/components/{component-name}. This isn't ideal when wanting to update a specific path.

What is the new behavior?

  • The script no longer strips out ion-. The developer needs to submit a valid component name or valid path.
  • The script no longer appends the value to src/components/
  • The script will run all instances of a component if only the name is given
  • The script will run tests within a given path

Does this introduce a breaking change?

  • [ ] Yes
  • [x] No

Other information

How to test:

  1. Create a new branch based off this one
  2. Make a style change
  3. Push it to the new branch
  4. Update the reference images using the new branch
  5. This will show you all the options

Recommended to test:

  • a component name (chip)
  • a path (src/components/chip/test/a11y
  • a component that doesn't exist (random-component)
  • no provided component, leave the first input blank

thetaPC avatar Feb 14 '24 01:02 thetaPC