Skip to content
Snippets Groups Projects
Commit a9b9b6d1 authored by David Beniamine's avatar David Beniamine
Browse files

Merge branch '3-upstream-01022023' into 'annotation-on-video'

Update from upstream

Closes #3

See merge request iiif/mirador-video-annotation!12
parents 53b90c72 26448c93
Branches
No related tags found
1 merge request!12Update from upstream
Pipeline #1341 passed
Showing
with 9 additions and 62 deletions
......@@ -38,6 +38,8 @@
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}]
}],
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off"
}
}
......@@ -14,15 +14,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 17.x]
node-version: [16.x, 18.x, 19.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g codecov
- run: npm install
- run: npm test
- run: codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
......@@ -13,24 +13,6 @@ describe('workspace actions', () => {
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', () => {
it('should updates mosaic layout', () => {
const options = { foo: 'bar' };
......
import React from 'react';
import { shallow } from 'enzyme';
import { AccessTokenSender } from '../../../src/components/AccessTokenSender';
......
import React from 'react';
import { shallow } from 'enzyme';
import MiradorMenuButton from '../../../src/containers/MiradorMenuButton';
import { AnnotationSettings } from '../../../src/components/AnnotationSettings';
......
import React from 'react';
import { shallow } from 'enzyme';
import OpenSeadragon from 'openseadragon';
import { Utils } from 'manifesto.js';
......
import React from 'react';
import { shallow } from 'enzyme';
import PluginProvider from '../../../src/extend/PluginProvider';
import AppProviders from '../../../src/containers/AppProviders';
......
import React from 'react';
import { shallow } from 'enzyme';
import { ThemeProvider, StylesProvider } from '@material-ui/core/styles';
import Fullscreen from 'react-full-screen';
import { DndContext, DndProvider } from 'react-dnd';
import { AppProviders } from '../../../src/components/AppProviders';
import settings from '../../../src/config/settings';
......@@ -14,7 +12,6 @@ function createWrapper(props) {
<AppProviders
language="en"
isFullscreenEnabled={false}
setWorkspaceFullscreen={() => {}}
theme={settings.theme}
translations={{}}
t={k => k}
......@@ -28,7 +25,6 @@ describe('AppProviders', () => {
const wrapper = createWrapper();
expect(wrapper.find(ThemeProvider).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', () => {
......@@ -44,23 +40,6 @@ describe('AppProviders', () => {
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()', () => {
it('changes the i18n language if the language prop has been updated', () => {
const wrapper = createWrapper();
......
import React from 'react';
import { shallow } from 'enzyme';
import Typography from '@material-ui/core/Typography';
import Link from '@material-ui/core/Link';
......
import React from 'react';
import { shallow } from 'enzyme';
import { AudioViewer } from '../../../src/components/AudioViewer';
......
import React from 'react';
import { shallow } from 'enzyme';
import { BackgroundPluginArea } from '../../../src/components/BackgroundPluginArea';
import { PluginHook } from '../../../src/components/PluginHook';
......
import React from 'react';
import { shallow } from 'enzyme';
import Typography from '@material-ui/core/Typography';
import IconButton from '@material-ui/core/IconButton';
......
import React from 'react';
import { shallow } from 'enzyme';
import Typography from '@material-ui/core/Typography';
import Chip from '@material-ui/core/Chip';
......
import React from 'react';
import { shallow } from 'enzyme';
import Typography from '@material-ui/core/Typography';
import { CanvasInfo } from '../../../src/components/CanvasInfo';
......
import React from 'react';
import { shallow } from 'enzyme';
import Input from '@material-ui/core/Input';
import Slider from '@material-ui/core/Slider';
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 IIIFThumbnail from '../../../src/containers/IIIFThumbnail';
......
import React from 'react';
import { shallow } from 'enzyme';
import Dialog from '@material-ui/core/Dialog';
import ListItemText from '@material-ui/core/ListItemText';
......
import React from 'react';
import { shallow } from 'enzyme';
import Typography from '@material-ui/core/Typography';
import MiradorMenuButton from '../../../src/containers/MiradorMenuButton';
......
import React from 'react';
import { shallow } from 'enzyme';
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
......
import React from 'react';
import { shallow } from 'enzyme';
import Button from '@material-ui/core/Button';
import { CollectionInfo } from '../../../src/components/CollectionInfo';
......
import React from 'react';
import { shallow } from 'enzyme';
import Slide from '@material-ui/core/Slide';
import ArrowLeftIcon from '@material-ui/icons/ArrowLeftSharp';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment