-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add an integration test of updating config via Mirador api
- Loading branch information
1 parent
78dde5f
commit 083a096
Showing
3 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
minimal_redux_poc/__tests__/integration/mirador/config_updating_from_instance.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export default { | ||
manifestVersion: 'v2', | ||
foo: 'bar', | ||
}; |