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

Snapshot management in the presence of a variant #1508

Closed
maelle opened this issue Dec 6, 2021 · 2 comments · Fixed by #1531
Closed

Snapshot management in the presence of a variant #1508

maelle opened this issue Dec 6, 2021 · 2 comments · Fixed by #1531
Labels
feature a feature request or enhancement snapshot 📷
Milestone

Comments

@maelle
Copy link
Contributor

maelle commented Dec 6, 2021

First I am aware that variants are experimental. 😅

When using variants it seems I can't use snapshot_accept(). Example https://github.com/maelle/clii where I changed the code after recording a snapshot. When I run the tests again I get

Snapshot of code has changed:
    old                    | new                       
[4] "Message <message>"    | "Message <message>"    [4]
[5] "  thing"              | "  thing"              [5]
[6] "Message <cliMessage>" | "Message <cliMessage>" [6]
[7] "  -- bla --"          - "  -- blaaa --"        [7]
[8] "Message <message>"    | "Message <message>"    [8]
[9] "  another thing"      | "  another thing"      [9]

Run `snapshot_accept('bla')` if this is a deliberate change

But if I run snapshot_accept('bla') I get the message "No snapshots to update".

@hadley
Copy link
Member

hadley commented Dec 6, 2021

Right, you have to manage your snapshot variants yourself currently.

@hadley hadley added feature a feature request or enhancement snapshot 📷 labels Dec 20, 2021
@hadley
Copy link
Member

hadley commented Jan 5, 2022

BTW snapshot_accept() works, so you can at accept en masse.

There are at least two bugs here:

  • The message should say snapshot_accept('variant/bla')
  • snapshot_accept('variant/bla') should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement snapshot 📷
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants