Files
Maria Hutt d36283e8c9 chore(snapshots): use default value for cmd line argument (#30263)
Issue number: N/A

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Certain custom commands related to Playwright are failing. Specifically:
- `npm run test.e2e.update-snapshots ${component}`
- `npm run test.e2e.docker.update-snapshots ${component}`

The failures are due to Playwright [v1.50
changing](https://playwright.dev/docs/release-notes#breaking) it's
accepted values for `update-snapshots`. Possible values are "all",
"changed", "missing", and "none". By default, it's "all". All snapshots
will be updated when no value is passed or a wrong value is passed.

Our scripts end up running (doesn't matter if it's local or through the
docker):
- `npx playwright test --update-snapshots ${component}`

It used to only update the snapshots that have changed. However, with
the update, the argument thinks that the component is its value but
since it's not an accepted one, it leads to the default.


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Set our default value when it comes to updating snapshots. By using
`changed` then we would only update snapshots for those tests that have
a difference. This aligns with how it used to work before the update.


## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

N/A
2025-03-17 21:30:13 +00:00
..