gopass-ui icon indicating copy to clipboard operation
gopass-ui copied to clipboard

Test data integration

Open ruettenm opened this issue 6 years ago • 1 comments

It would be great to add a new menu entry to switch into some "testdata" mode. So it's easy to take screenshots without any production gopass store.

One solution could be:

  • Load the renderer app with a query parameter like ?test-data=1 when the "test-data"-mode is active.
  • In the app we could simple check for this query param with the following snipped and always return some static list of secrets.
const url = new URL(document.location.href)
const SHOW_TEST_DATA = url.searchParams.has('test-data')

ruettenm avatar Apr 24 '20 11:04 ruettenm

The thing I don't like about this: if you want to do a full demo about the tool, including modification the Gopass store (add, delete, edit secret values etc) a simple test data provider is not enough.

After adding or deleting a secret Gopass UI retrieves all secret names again and re-builds the navigation tree. When using hard-coded test data, one would need to implement a mocked version of Gopass that behaves like real Gopass in terms of deletion, adding, editing and so on. I don't have a good feeling about adding this to the production code. Also it's more work. I would prefer having a shell script that generates a Gopass store with test data.

jonas-pietzsch avatar Apr 28 '20 07:04 jonas-pietzsch