diff --git a/__tests__/integration/mirador/minimalist.html b/__tests__/integration/mirador/minimalist.html new file mode 100644 index 0000000000..7ecebbcf84 --- /dev/null +++ b/__tests__/integration/mirador/minimalist.html @@ -0,0 +1,36 @@ + + + + + + + Mirador + + + +
+ + + + diff --git a/__tests__/integration/mirador/minimalist.test.js b/__tests__/integration/mirador/minimalist.test.js new file mode 100644 index 0000000000..7357119448 --- /dev/null +++ b/__tests__/integration/mirador/minimalist.test.js @@ -0,0 +1,16 @@ +describe('Minimalist configuration to Mirador', () => { + beforeAll(async () => { + await page.goto('http://127.0.0.1:4488/__tests__/integration/mirador/minimalist.html'); + }); + it('loads a manifest and displays it without some of the default controls', async () => { + await expect(page).toMatchElement( + 'h2', + { text: /Self-Portrait/ }, + ); + await expect(page).toMatchElement('button[aria-label="Information"]'); + await expect(page).toMatchElement('button[aria-label="Rights"]'); + await expect(page).not.toMatchElement('#addBtn'); + await expect(page).not.toMatchElement('button[aria-label="Toggle sidebar"]'); + await expect(page).not.toMatchElement('button[aria-label="Close window"]'); + }); +}); diff --git a/src/containers/WindowTopBar.js b/src/containers/WindowTopBar.js index eebf13ebba..82148be2f4 100644 --- a/src/containers/WindowTopBar.js +++ b/src/containers/WindowTopBar.js @@ -9,7 +9,7 @@ import { WindowTopBar } from '../components/WindowTopBar'; /** mapStateToProps */ const mapStateToProps = (state, { windowId }) => { - const config = getWindowConfig; + const config = getWindowConfig(state, { windowId }); return { allowClose: config.allowClose,