diff --git a/minimal_redux_poc/__tests__/integration/mirador/config_updating_from_instance.test.js b/minimal_redux_poc/__tests__/integration/mirador/config_updating_from_instance.test.js new file mode 100644 index 0000000..6190e90 --- /dev/null +++ b/minimal_redux_poc/__tests__/integration/mirador/config_updating_from_instance.test.js @@ -0,0 +1,17 @@ +/* global miradorInstance */ + +describe('Config updating from instance', () => { + beforeAll(async () => { + await page.goto('http://127.0.0.1:4488/__tests__/integration/mirador/'); + }); + it('can modify the config via api', async () => { + await page.evaluate(() => { + const a = miradorInstance.actions.updateConfig({ foo: 'bat' }); + miradorInstance.store.dispatch(a); + }); + const config = await page.evaluate(() => ( + miradorInstance.store.getState().config + )); + await expect(config.foo).toBe('bat'); + }); +}); diff --git a/minimal_redux_poc/__tests__/integration/mirador/index.html b/minimal_redux_poc/__tests__/integration/mirador/index.html index d79ce78..e820e5e 100644 --- a/minimal_redux_poc/__tests__/integration/mirador/index.html +++ b/minimal_redux_poc/__tests__/integration/mirador/index.html @@ -10,7 +10,7 @@