-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Allow configuration of the local IIIF server port so multiple servers can run at the same time - Extend collections tests to check if multiple child manifests can be loaded successively - Add basic tests for TIFY's API
- Loading branch information
Showing
14 changed files
with
7,040 additions
and
46 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// TODO: Extend API tests | ||
|
||
describe('API', () => { | ||
it('controls TIFY programmatically', () => { | ||
cy.visit(`/?manifest=${Cypress.env('iiifApiUrl')}/manifest/gdz-PPN857449303`); | ||
|
||
cy.window().its('tify').then((tify) => { | ||
tify.ready.then(() => { | ||
tify.setLanguage('de'); | ||
cy.contains('Seiten'); | ||
|
||
tify.setPage(2); | ||
cy.contains('.tify-page-select-button', '2 : -'); | ||
|
||
tify.setView('export'); | ||
cy.contains('.-active', 'Export'); | ||
}); | ||
}); | ||
}); | ||
}); |
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
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
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,22 +1,22 @@ | ||
describe('Main', () => { | ||
it('starts the app', () => { | ||
cy.visit('/?manifest=http://0.0.0.0:8081/manifest/gdz-PPN857449303&language=de'); | ||
cy.visit(`/?manifest=${Cypress.env('iiifApiUrl')}/manifest/gdz-PPN857449303&language=de`); | ||
cy.get('#tify > .tify'); | ||
}); | ||
|
||
it('checks the manifest (valid JSON, but not IIIF)', () => { | ||
// Prevent the test from failing due to an uncaught exception (which is expected) | ||
cy.on('uncaught:exception', () => false); | ||
|
||
cy.visit('/?manifest=http://0.0.0.0:8081/manifest/invalid'); | ||
cy.visit(`/?manifest=${Cypress.env('iiifApiUrl')}/manifest/invalid`); | ||
cy.contains('Please provide a valid IIIF Presentation API 2.x manifest'); | ||
}); | ||
|
||
it('checks the manifest (invalid JSON)', () => { | ||
// Prevent the test from failing due to an uncaught exception (which is expected) | ||
cy.on('uncaught:exception', () => false); | ||
|
||
cy.visit('/?manifest=http://0.0.0.0:8081/manifest/not-json'); | ||
cy.visit(`/?manifest=${Cypress.env('iiifApiUrl')}/manifest/not-json`); | ||
cy.contains('Error loading IIIF manifest'); | ||
}); | ||
}); |
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.