Questions tagged [snapshot-testing]
A mechanism to assist automated unit testing of visual components by generating a 'snapshot' of the component and then comparing the rendered component with the saved snapshot.
snapshot-testing
57
questions
0
votes
1
answer
39
views
Android Compose Screenshot testing failing on pipeline with no visible differences
I'm trying out the new Compose Screenshot Testing https://developer.android.com/studio/preview/compose-screenshot-testing.
When I create reference images locally, then run the tests to validate the UI ...
0
votes
0
answers
14
views
React Native Jest Snapshot Test not showing css styles
box.js file
import {View} from 'react-native';
import styled from 'styled-components';
import {
border,
color,
compose,
flexbox,
layout,
overflow,
position,
size,
space,
variant,
...
0
votes
0
answers
168
views
Paparazzi file not found exception
I have a few tests, we wrote with com.cash.paparazzi
And everything works well on my local machine and another local machines. But on CI, after verify gradle task:
./gradlew verifyPaparazziDebug --...
-1
votes
1
answer
73
views
Angular Cypress component testing error: Unexpected framework angular, expected one of create-react-app, nuxt, react, vue-cli, next, vue
I wish to run my Cypress snapshot tests for my Angular app in a docker container to maintain consistency and make my visual tests less brittle. I am using the Cypress Docker container:
FROM cypress/...
-2
votes
1
answer
46
views
Testing a conditionally rendered section of a React Functional Component (Jest + @testing-library/react)
This is about testing a component which has a state update within a useEffect(). The issue is that the component is always tested against its default state.
There is a bunch of problems that goes ...
1
vote
0
answers
96
views
Optimizing Image Handling in Swift Snapshot Testing
I am using the Swift-Snapshot-Testing library (https://github.com/pointfreeco/swift-snapshot-testing) for snapshot testing in an iOS project and facing a couple of challenges related to image ...
0
votes
0
answers
43
views
Date field fails using .any and .anything
I am writing Jest snapshot tests. I have a field that is a date string and it always fails the snapshot. I've tried testing:
expect(reducer(initialModel, action)).toMatchSnapshot({
startDate: expect....
0
votes
0
answers
39
views
Verify snapshot test writes all frameworks to single file
It's is probably specific to how Verify runs on this repo and I'm familiar:
A snapshot test runs for different frameworks (net6.0, net7.0) and works fine.
I've added net8.0 and it now fails because 1 ...
0
votes
0
answers
47
views
Jest Snapshot testing on Gutenberg React Custom Blocks
I tried to set up a working Jest environment inside a Wordpress plugin.
Gutenberg blocks are split between an edit.jsx component and a save.jsx component.
My issue stands when I try to create a ...
0
votes
1
answer
78
views
Node-tap Protocol updating a spec.ts.cjs snapshot
Using the example from node-tap-snapshot-examples, I created a snapshot using the command tap tagger.test.mjs --snapshot for the following test (Modified TS version).
// tagger.spec.ts
import t from '...
0
votes
1
answer
295
views
How to create and compare syrupy snapshots in hypothesis's stateful testing?
I want to create a hypothesis.stateful.RuleBasedStateMachine to run stateful testing in Python. When the test is running, I want it to be deterministic and either update some snapshots or compare with ...
0
votes
1
answer
261
views
Jest snapshot test fails with @mui/x-date-pickers, different timestamp in Snapshot
We updated to the latest Mui Date picker. And now we have a strange Problem with a failing snapshot test in our CI pipeline.
In our Jest Test, we set a fixed Date like this:
jest.useFakeTimers()....
0
votes
0
answers
320
views
pytest_snapshot snaphot removal
If I have a tests folder structure like this
-tests
--init.py
--test_main.py
And my test looks like this:
from pytest_snapshot.plugin import Snapshot
def test_my_func(snapshot: Snapshot) -> None:
...
0
votes
0
answers
67
views
Paparazzi running ./gradlew testDebug verifyPaparazziDebug does not generate report htlm
I tried to run Paparazzi snapshot tests via terminal using these commands:
./gradlew clean assembleDebug testDebug verifyPaparazziDebug
But this seems to skip testDebug. It is supposed to generate ...
0
votes
0
answers
176
views
error- toMatchSnapshot() must be called during the test (playwright + ts)
In project I used playwright + typescript + cucumber.
I have problem with comparing screenshots using 'toMatchSnapshot()' method.
In definition steps file I used it like that
expect(await ...