Skip to content

New variant expect_snapshot_file() files are being removed #1468

@schloerke

Description

@schloerke

Similar to #1462, but with variant = "something".

Example output with variant = "mac-4.0":

ℹ Loading shinytest2
✔ | F W S  OK | Context
✔ |         5 | apps-web-example [2.4s]
✔ |         4 | shiny-driver-click [2.6s]
✔ |         5 | shiny-driver-init-args [3.2s]
✖ | 1      11 | shiny-driver-set-inputs [3.9s]
──────────────────────────────────────────────
Failure (test-shiny-driver-set-inputs.R:44:3): set kitchen sink of inputs
Snapshot of `snapshot_info$screenshot_path` to 'shiny-driver-set-inputs/input-widgets-004.png' has changed
Run `testthat::snapshot_review('shiny-driver-set-inputs')` to review changes
Backtrace:
 1. app$expectSnapshot(screenshot = TRUE) test-shiny-driver-set-inputs.R:44:2
 2. shinytest2::sd2_expectSnapshot(...) /Users/barret/Documents/git/rstudio/shinytest/shinytest2.nosync/R/shiny-driver.R:570:6
 3. testthat::expect_snapshot_file(...) /Users/barret/Documents/git/rstudio/shinytest/shinytest2.nosync/R/testthat.R:41:4
──────────────────────────────────────────────
✔ |         3 | z-external-packages [3.2s]

══ Results ═══════════════════════════════════
Duration: 15.4 s

[ FAIL 1 | WARN 0 | SKIP 0 | PASS 28 ]
Deleting unused snapshots:
* mac-4.0/shiny-driver-set-inputs/input-widgets-004.new.png
Error: Test failures
# No _new_ file being kept
❯❯ system("tree tests/testthat/_snaps/mac-4.0/shiny-driver-set-inputs/")
tests/testthat/_snaps/mac-4.0/shiny-driver-set-inputs/
├── input-widgets-001.json
├── input-widgets-001.png
├── input-widgets-002.json
├── input-widgets-002.png
├── input-widgets-003.json
├── input-widgets-003.png
├── input-widgets-004.json
└── input-widgets-004.png

0 directories, 8 files

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorsnapshot 📷

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions