<p dir="auto">Hi,<br>
I am using Snapshot testing for my application.<br>
My application has a theme, based on some parameter passed to the component. The theme changes the look n feel of the app, by adding some classes to the elements.</p>
<p dir="auto">I want to generate snapshots for the components for both the themes.<br>
But I do not want to duplicate the code or keep two separate .test/.spec files for this.</p>
<p dir="auto">Is there a way I can generate snapshot files based on what theme is passed, with just one spec file.</p>
<h4 dir="auto">Expected Behaviour:</h4>
<p dir="auto">If, two theme values are: dark and light<br>
One Component.spec.js file should generate Component.dark.spec.js.snap or Component.light.spec.js.snap based on the theme passed.</p>
<p dir="auto">This way I can have separate separate snapshots based on theme with just one source .spec file.</p>
<p dir="auto">Describe what you were doing when the bug occurred:</p>
<ol dir="auto">
<li>React Development tool is not running by this</li>
<li></li>
<li></li>
</ol>
<hr>
<h2 dir="auto">Please do not remove the text below this line</h2>
<p dir="auto">DevTools version: 4.8.2-fed4ae024</p>
<p dir="auto">Call stack: at Store.getElementAtIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19359:35)<br>
at Store.getElementIDAtIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19376:26)<br>
at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26594:18<br>
at List.render (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:21229:18)<br>
at li (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11802:76)<br>
at ki (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11793:10)<br>
at ck (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:14433:86)<br>
at bk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13779:11)<br>
at ak (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13768:5)<br>
at Sj (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13750:7)</p>
<p dir="auto">Component stack: at List (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:20924:30)<br>
at div<br>
at AutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:2786:5)<br>
at div<br>
at div<br>
at Tree_Tree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26368:45)<br>
at div<br>
at div<br>
at InspectedElementContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26848:23)<br>
at OwnersListContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25520:23)<br>
at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26139:23)<br>
at Components_Components (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30926:50)<br>
at ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27172:5)<br>
at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27303:32)<br>
at div<br>
at div<br>
at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30463:23)<br>
at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22538:23)<br>
at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23040:27)<br>
at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28328:23)<br>
at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33797:21)</p>