# End-to-end tests This directory contains the fixture data used to bootstrap the individual e2e tests. Each sub-directory contains one thing: 1. A `state.json` file that represents a the saved state for the extension (see _Generating fixture data_ below) ## Generating fixture data Fixture data can be generated by loading the unpacked extension, inspecting the background context, dumping `chrome.storage.local`, and using [`copy`][1] to copy it to the clipboard, and manually pasting the contents into a file on disk. ```js // Step 1: chrome.storage.local.get(null, (x) => console.log(x)) // Should print something like: // > temp1 // > {data: {…}, meta: {…}} // Step 2: // Store the value as a global via the 'Store as global variable' option in context menu (shown below) // Step 3: copy(temp1) ``` Store the value as a global variable: Store as global variable [1]:https://developers.google.com/web/tools/chrome-devtools/console/utilities