Skip to content

Commit e0a6165

Browse files
committed
Upgrade Mirador to version 4
replaces both Mirador 3 and the customized Mirador 2 previously used for palimpsests
1 parent d456495 commit e0a6165

File tree

301 files changed

+3496
-95166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

301 files changed

+3496
-95166
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ node_modules
99
/cypress/videos
1010

1111

12+
# mirador annotation editor, temporarily copied while I wait for a fix on the npm package exports
13+
/mae
14+
15+
1216
# local env files
1317
.env.local
1418
.env.*.local
Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
describe('With the `site=sinai` parameter set', () => {
2-
const URL_PARAMETERS = `?site=sinai&manifest=${encodeURIComponent("https://iiif.library.ucla.edu/ark%3A%2F21198%2Fz18w4z1w/manifest")}`
3-
4-
it('loads Mirador 3 in an iframe', () => {
2+
const URL_PARAMETERS = `?site=sinai&manifest=${encodeURIComponent('https://iiif.library.ucla.edu/ark%3A%2F21198%2Fz18w4z1w/manifest')}`
3+
4+
it('loads in Mirador', () => {
55
// http://localhost:8080/?site=sinai&manifest=https%3A%2F%2Fiiif.library.ucla.edu%2Fark%253A%252F21198%252Fz18w4z1w%2Fmanifest
66
cy.visit('/' + URL_PARAMETERS)
7-
8-
cy.frameLoaded("#mirador-iframe", {
9-
url: '/mirador3.html' + URL_PARAMETERS,
10-
});
11-
})
12-
13-
it('loads in Mirador 3', () => {
14-
// http://localhost:8080/mirador3.html?site=sinai&manifest=https%3A%2F%2Fiiif.library.ucla.edu%2Fark%253A%252F21198%252Fz18w4z1w%2Fmanifest
15-
cy.visit('/mirador3.html' + URL_PARAMETERS)
167

17-
// Shows title
18-
cy.get(".mirador-viewer").should("exist").should("be.visible")
19-
cy.contains("h2", "Sinai, St. Catherine’s Monastery, Arabic 1").should("exist").should("be.visible")
8+
cy.get('.mirador-viewer').should('exist').should('be.visible')
9+
10+
// Image tools loaded
11+
cy.get('[aria-label="Expand image tools"]').should('exist').should('be.visible')
12+
13+
// Annotations plugin loaded
14+
cy.get('button[aria-label="Annotations"]').should('exist').should('be.visible')
15+
16+
// index panel open on load
17+
cy.get('.mirador-companion-area-left')
18+
.contains('h3', 'Index')
19+
.should('exist')
20+
.should('be.visible')
21+
22+
// close window button is present
23+
cy.get('button[aria-label="Close window"').should('exist').should('be.visible')
2024
})
2125
})
Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
describe('With the `viewer=mirador` parameter set', () => {
2-
const URL_PARAMETERS = `?viewer=mirador&manifest=${encodeURIComponent('https://sinai-images.library.ucla.edu/iiif/ark:%2F21198%2Fz1bc4wfw/manifest')}`
3-
// beforeEach(() => {
4-
// cy.intercept(
5-
// 'GET',
6-
// 'https://sinai-images.library.ucla.edu/iiif/ark:%2F21198%2Fz1bc4wfw/manifest',
7-
// { fixture: 'arabic514.json' },
8-
// ).as('getManifest')
9-
// })
10-
11-
// For some reason cypress is blocking the api call to get the manifest, so everything works in real life but the test fails. It even loads fine int he cypress window, but only AFTER cypress times out
12-
13-
// it('loads Mirador 2 in an iframe', () => {
14-
// // http://localhost:8080/?viewer=mirador&manifest=https%3A%2F%2Fsinai-images.library.ucla.edu%2Fiiif%2Fark%3A%252F21198%252Fz1bc4wfw%2Fmanifest
15-
// cy.visit('/' + URL_PARAMETERS)
16-
// // cy.wait('@getManifest')
17-
18-
// cy.frameLoaded('#mirador-iframe', {
19-
// url: '/palimpsest/viewer.html' + URL_PARAMETERS,
20-
// })
21-
// })
22-
23-
it('loads in Mirador2 Viewer!', () => {
24-
// http://localhost:8080/mirador3.html?viewer=mirador&manifest=https%3A%2F%2Fsinai-images.library.ucla.edu%2Fiiif%2Fark%3A%252F21198%252Fz1bc4wfw%2Fmanifest
25-
cy.visit('/palimpsest/viewer.html' + URL_PARAMETERS)
26-
// cy.wait('@getManifest')
27-
28-
// Shows title
29-
cy.contains('.window-manifest-title', 'Arabic 514').should('exist').should('be.visible')
2+
const URL_PARAMETERS =
3+
'?site=sinai&manifest=https%3A%2F%2Fsinai-images.library.ucla.edu%2Fiiif%2Fark%3A%252F21198%252Fz1ft92mh%2Fmanifest'
4+
5+
it('loads in Mirador', () => {
6+
// http://localhost:8080/?site=sinai&manifest=https%3A%2F%2Fiiif.library.ucla.edu%2Fark%253A%252F21198%252Fz18w4z1w%2Fmanifest
7+
cy.visit('/' + URL_PARAMETERS)
8+
9+
cy.get('.mirador-viewer').should('exist').should('be.visible')
10+
11+
cy.contains('CPA NF fragment 13').should('exist')
12+
13+
// Image tools loaded
14+
cy.get('[aria-label="Expand image tools"]').should('exist').should('be.visible')
15+
16+
// Annotations plugin loaded
17+
cy.get('button[aria-label="Annotations"]').should('exist').should('be.visible')
18+
19+
// index panel open on load
20+
cy.get('.mirador-companion-area-left')
21+
.contains('h3', 'Index')
22+
.should('exist')
23+
.should('be.visible')
24+
25+
// close window button is present
26+
cy.get('button[aria-label="Close window"').should('exist').should('be.visible')
27+
28+
cy.contains('An error occurred').should('not.exist')
3029
})
3130
})

0 commit comments

Comments
 (0)