Skip to content
Snippets Groups Projects
Commit 4277a995 authored by Anthony's avatar Anthony
Browse files

Merge

parents b8f1dc59 735afa7d
Branches add-plugin
No related tags found
No related merge requests found
Pipeline #1374 passed
Showing
with 271 additions and 58 deletions
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
"ignoreStrings": true, "ignoreStrings": true,
"ignoreTemplateLiterals": true, "ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true "ignoreRegExpLiterals": true
}] }],
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off"
} }
} }
...@@ -14,15 +14,15 @@ jobs: ...@@ -14,15 +14,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
node-version: [14.x, 16.x, 17.x] node-version: [16.x, 18.x, 19.x]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1 uses: actions/setup-node@v2
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- run: npm install -g codecov
- run: npm install - run: npm install
- run: npm test - run: npm test
- run: codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/manifest.json",
"type": "Manifest",
"label": { "en": [ "Video Example 3" ] },
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0003-mvm-video-annot/canvas",
"type": "Canvas",
"height": 360,
"width": 640,
"duration": 572.034,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0003-mvm-video-annot/canvas/page",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0003-mvm-video-annot/canvas/page/annotation",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://fixtures.iiif.io/video/indiana/lunchroom_manners/high/lunchroom_manners_1024kb.mp4",
"type": "Video",
"height": 360,
"width": 480,
"duration": 572.034,
"format": "video/mp4"
},
"target": "https://iiif.io/api/cookbook/recipe/0003-mvm-video-annot/canvas"
}
]
}
],
"annotations": [
{
"id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1/annopage-2",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1/annopage-2/anno-1",
"type": "Annotation",
"motivation": "commenting",
"body": {
"type": "TextualBody",
"language": "de",
"format": "text/plain",
"value": "Göttinger Marktplatz mit Gänseliesel Brunnen"
},
"target": "https://iiif.io/api/cookbook/recipe/0003-mvm-video-annot/canvas/page/annotation"
}
]
}
]
}
]
}
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/manifest.json",
"type": "Manifest",
"label": {
"en": [
"Lunchroom Manners"
]
},
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas",
"type": "Canvas",
"height": 360,
"width": 480,
"duration": 572.034,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas/page",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas/page/annotation1",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://fixtures.iiif.io/video/indiana/lunchroom_manners/high/lunchroom_manners_1024kb.mp4",
"type": "Video",
"height": 360,
"width": 480,
"duration": 572.034,
"format": "video/mp4"
},
"target": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas"
}
]
}
],
"annotations": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas/page2",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas/page2/a1",
"type": "Annotation",
"motivation": "supplementing",
"body": {
"id": "https://fixtures.iiif.io/video/indiana/lunchroom_manners/lunchroom_manners.vtt",
"format": "text/vtt",
"language": "en"
},
"target": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas"
}
]
}
]
}
]
}
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/manifest.json",
"type": "Manifest",
"label": {
"en": [
"Lunchroom Manners"
]
},
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas",
"type": "Canvas",
"height": 360,
"width": 480,
"duration": 572.034,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas/page",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas/page/annotation1",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://fixtures.iiif.io/video/indiana/lunchroom_manners/high/lunchroom_manners_1024kb.mp4",
"type": "Video",
"height": 360,
"width": 480,
"duration": 572.034,
"format": "video/mp4"
},
"target": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas"
}
]
}
],
"annotations": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas/page2",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas/page2/a1",
"type": "Annotation",
"motivation": "supplementing",
"body": [
{
"id": "https://fixtures.iiif.io/video/indiana/lunchroom_manners/lunchroom_manners.vtt#fr",
"format": "text/vtt",
"language": "fr"
},
{
"id": "https://fixtures.iiif.io/video/indiana/lunchroom_manners/lunchroom_manners.vtt#en",
"format": "text/vtt",
"language": "en"
}
],
"target": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas"
},
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas/page2/a1",
"type": "Annotation",
"motivation": "supplementing",
"body": {
"id": "https://fixtures.iiif.io/video/indiana/lunchroom_manners/lunchroom_manners.vtt#ru",
"format": "text/vtt",
"language": "ru"
},
"target": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas"
}
]
}
]
}
]
}
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/manifest.json",
"type": "Manifest",
"label": {
"en": [
"Lunchroom Manners"
]
},
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas",
"type": "Canvas",
"height": 360,
"width": 480,
"duration": 572.034,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas/page",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas/page/annotation1",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://fixtures.iiif.io/video/indiana/lunchroom_manners/high/lunchroom_manners_1024kb.mp4",
"type": "Video",
"height": 360,
"width": 480,
"duration": 572.034,
"format": "video/mp4"
},
"target": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas"
}
]
}
],
"annotations": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas/page2",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas/page2/a1",
"type": "Annotation",
"motivation": "supplementing",
"body": [
{
"id": "https://fixtures.iiif.io/video/indiana/lunchroom_manners/lunchroom_manners.vtt#fr",
"format": "text/vtt",
"language": "fr"
},
{
"id": "https://fixtures.iiif.io/video/indiana/lunchroom_manners/lunchroom_manners.vtt#en",
"format": "text/vtt",
"language": "en"
}
],
"target": "https://iiif.io/api/cookbook/recipe/0219-using-caption-file/canvas"
}
]
}
]
}
]
}
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
{ manifestId: "https://iiif.durham.ac.uk/manifests/trifle/32150/t1/m4/q7/t1m4q77fr328/manifest", provider: "Durham University Library"}, { manifestId: "https://iiif.durham.ac.uk/manifests/trifle/32150/t1/m4/q7/t1m4q77fr328/manifest", provider: "Durham University Library"},
//{ manifestId: "https://iiif.vam.ac.uk/collections/O1023003/manifest.json", provider: "Ocean liners"}, //{ manifestId: "https://iiif.vam.ac.uk/collections/O1023003/manifest.json", provider: "Ocean liners"},
{ manifestId: "https://zavicajna.digitalna.rs/iiif/api/presentation/3/96571949-03d6-478e-ab44-a2d5ad68f935%252F00000001%252Fostalo01%252F00000071/manifest", provider: "Библиотека 'Милутин Бојић'"}, { manifestId: "https://zavicajna.digitalna.rs/iiif/api/presentation/3/96571949-03d6-478e-ab44-a2d5ad68f935%252F00000001%252Fostalo01%252F00000071/manifest", provider: "Библиотека 'Милутин Бојић'"},
{ manifestId : "https://preview.iiif.io/cookbook/master/recipe/0003-mvm-video/manifest.json", provider : "IIIF Cookbook" }
] ]
}); });
</script> </script>
......
...@@ -13,24 +13,6 @@ describe('workspace actions', () => { ...@@ -13,24 +13,6 @@ describe('workspace actions', () => {
expect(actions.updateWorkspace(options)).toEqual(expectedAction); expect(actions.updateWorkspace(options)).toEqual(expectedAction);
}); });
}); });
describe('setWorkspaceFullscreen', () => {
it('should return correct action type if set to true', () => {
const receivedAction = actions.setWorkspaceFullscreen(true);
const expectedAction = {
isFullscreenEnabled: true,
type: ActionTypes.SET_WORKSPACE_FULLSCREEN,
};
expect(receivedAction).toEqual(expectedAction);
});
it('should return correct action type if set to false', () => {
const receivedAction = actions.setWorkspaceFullscreen(false);
const expectedAction = {
isFullscreenEnabled: false,
type: ActionTypes.SET_WORKSPACE_FULLSCREEN,
};
expect(receivedAction).toEqual(expectedAction);
});
});
describe('updateWorkspaceMosaicLayout', () => { describe('updateWorkspaceMosaicLayout', () => {
it('should updates mosaic layout', () => { it('should updates mosaic layout', () => {
const options = { foo: 'bar' }; const options = { foo: 'bar' };
......
import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import { AccessTokenSender } from '../../../src/components/AccessTokenSender'; import { AccessTokenSender } from '../../../src/components/AccessTokenSender';
......
import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import MiradorMenuButton from '../../../src/containers/MiradorMenuButton'; import MiradorMenuButton from '../../../src/containers/MiradorMenuButton';
import { AnnotationSettings } from '../../../src/components/AnnotationSettings'; import { AnnotationSettings } from '../../../src/components/AnnotationSettings';
......
import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import OpenSeadragon from 'openseadragon'; import OpenSeadragon from 'openseadragon';
import { Utils } from 'manifesto.js'; import { Utils } from 'manifesto.js';
......
import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import PluginProvider from '../../../src/extend/PluginProvider'; import PluginProvider from '../../../src/extend/PluginProvider';
import AppProviders from '../../../src/containers/AppProviders'; import AppProviders from '../../../src/containers/AppProviders';
......
import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import { ThemeProvider, StylesProvider } from '@material-ui/core/styles'; import { ThemeProvider, StylesProvider } from '@material-ui/core/styles';
import Fullscreen from 'react-full-screen';
import { DndContext, DndProvider } from 'react-dnd'; import { DndContext, DndProvider } from 'react-dnd';
import { AppProviders } from '../../../src/components/AppProviders'; import { AppProviders } from '../../../src/components/AppProviders';
import settings from '../../../src/config/settings'; import settings from '../../../src/config/settings';
...@@ -14,7 +12,6 @@ function createWrapper(props) { ...@@ -14,7 +12,6 @@ function createWrapper(props) {
<AppProviders <AppProviders
language="en" language="en"
isFullscreenEnabled={false} isFullscreenEnabled={false}
setWorkspaceFullscreen={() => {}}
theme={settings.theme} theme={settings.theme}
translations={{}} translations={{}}
t={k => k} t={k => k}
...@@ -28,7 +25,6 @@ describe('AppProviders', () => { ...@@ -28,7 +25,6 @@ describe('AppProviders', () => {
const wrapper = createWrapper(); const wrapper = createWrapper();
expect(wrapper.find(ThemeProvider).length).toBe(1); expect(wrapper.find(ThemeProvider).length).toBe(1);
expect(wrapper.find(StylesProvider).length).toBe(1); expect(wrapper.find(StylesProvider).length).toBe(1);
expect(wrapper.find(Fullscreen).length).toBe(1);
}); });
it('sets up a theme based on the config passed in merged w/ MaterialUI', () => { it('sets up a theme based on the config passed in merged w/ MaterialUI', () => {
...@@ -44,23 +40,6 @@ describe('AppProviders', () => { ...@@ -44,23 +40,6 @@ describe('AppProviders', () => {
expect(wrapper.instance().i18n.t('off')).toEqual('on'); expect(wrapper.instance().i18n.t('off')).toEqual('on');
}); });
it('should pass setWorkspaceFullscreen to Fullscreen.onChange', () => {
const mockFn = jest.fn();
const wrapper = createWrapper({ setWorkspaceFullscreen: mockFn });
expect(wrapper.find(Fullscreen).first().prop('onChange'))
.toBe(mockFn);
});
it('should pass isFullscreenEnabled to Fullscreen.enabled', () => {
let wrapper = createWrapper({ isFullscreenEnabled: false });
expect(wrapper.find(Fullscreen).first().prop('enabled'))
.toEqual(false);
wrapper = createWrapper({ isFullscreenEnabled: true });
expect(wrapper.find(Fullscreen).first().prop('enabled'))
.toEqual(true);
});
describe('componentDidUpdate()', () => { describe('componentDidUpdate()', () => {
it('changes the i18n language if the language prop has been updated', () => { it('changes the i18n language if the language prop has been updated', () => {
const wrapper = createWrapper(); const wrapper = createWrapper();
......
import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import Typography from '@material-ui/core/Typography'; import Typography from '@material-ui/core/Typography';
import Link from '@material-ui/core/Link'; import Link from '@material-ui/core/Link';
......
import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import { AudioViewer } from '../../../src/components/AudioViewer'; import { AudioViewer } from '../../../src/components/AudioViewer';
......
import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import { BackgroundPluginArea } from '../../../src/components/BackgroundPluginArea'; import { BackgroundPluginArea } from '../../../src/components/BackgroundPluginArea';
import { PluginHook } from '../../../src/components/PluginHook'; import { PluginHook } from '../../../src/components/PluginHook';
......
import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import Typography from '@material-ui/core/Typography'; import Typography from '@material-ui/core/Typography';
import IconButton from '@material-ui/core/IconButton'; import IconButton from '@material-ui/core/IconButton';
......
import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import Typography from '@material-ui/core/Typography'; import Typography from '@material-ui/core/Typography';
import Chip from '@material-ui/core/Chip'; import Chip from '@material-ui/core/Chip';
......
import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import Typography from '@material-ui/core/Typography'; import Typography from '@material-ui/core/Typography';
import { CanvasInfo } from '../../../src/components/CanvasInfo'; import { CanvasInfo } from '../../../src/components/CanvasInfo';
......
import React from 'react';
import { shallow } from 'enzyme'; import { shallow } from 'enzyme';
import Input from '@material-ui/core/Input'; import Input from '@material-ui/core/Input';
import Slider from '@material-ui/core/Slider'; import Slider from '@material-ui/core/Slider';
import Typography from '@material-ui/core/Typography'; import Typography from '@material-ui/core/Typography';
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd'; import { DragDropContext, Droppable, Draggable } from '@hello-pangea/dnd';
import { CanvasLayers } from '../../../src/components/CanvasLayers'; import { CanvasLayers } from '../../../src/components/CanvasLayers';
import IIIFThumbnail from '../../../src/containers/IIIFThumbnail'; import IIIFThumbnail from '../../../src/containers/IIIFThumbnail';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment