diff --git a/__tests__/components/GridItem.test.js b/__tests__/components/GridItem.test.js
index 0cf824e8..30fa3ae3 100755
--- a/__tests__/components/GridItem.test.js
+++ b/__tests__/components/GridItem.test.js
@@ -1,12 +1,15 @@
import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import TestRenderer from 'react-test-renderer';
+import { DndProvider } from 'react-dnd';
+import { HTML5Backend } from 'react-dnd-html5-backend';
import { GridItem } from '../../src/js/components/GridItem';
-import { core } from '../state';
+import state from '../state';
jest.mock('react-redux', () => ({
useSelector: jest.fn(),
useDispatch: () => jest.fn(),
+ useDrag: jest.fn(),
}));
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
@@ -21,10 +24,14 @@ jest.mock('react-router-dom', () => ({
}));
describe('', () => {
+ const { core: { items } } = state;
+
it('should handle album', () => {
const result = TestRenderer.create(
-
+
+
+
).toJSON();
expect(result).toMatchSnapshot();
@@ -32,7 +39,9 @@ describe('', () => {
it('should handle artist', () => {
const result = TestRenderer.create(
-
+
+
+
).toJSON();
expect(result).toMatchSnapshot();
@@ -40,9 +49,11 @@ describe('', () => {
it('should handle playlist', () => {
const result = TestRenderer.create(
-
+
+
+
).toJSON();
expect(result).toMatchSnapshot();
});
-});
\ No newline at end of file
+});
diff --git a/__tests__/components/__snapshots__/GridItem.test.js.snap b/__tests__/components/__snapshots__/GridItem.test.js.snap
index 32abf510..50ed0ad5 100644
--- a/__tests__/components/__snapshots__/GridItem.test.js.snap
+++ b/__tests__/components/__snapshots__/GridItem.test.js.snap
@@ -1,76 +1,77 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[` should handle album 1`] = `
-
-
-
- Sirens of the Sea
-
-
+
+ Sirens of the Sea
+
+
+
+ -
@@ -78,156 +79,173 @@ exports[` should handle album 1`] = `
data-qa-file="LinksSentence"
data-qa-node="span"
>
- Above & Beyond
+
+ Above & Beyond
+
-
-
-
-
-
+
+
+
+
+
`;
exports[` should handle artist 1`] = `
-
-
-
- Above & Beyond
-
-
-
+ perm_identity
+
+
+
+
+
+ Above & Beyond
+
+
+
+
`;
exports[` should handle playlist 1`] = `
-
-
-
- Local tester
-
-
-
+ queue_music
+
+
+
+
+
+ Local tester
+
+
+
+
`;
diff --git a/__tests__/state.js b/__tests__/state.js
index f22366ad..3427392e 100755
--- a/__tests__/state.js
+++ b/__tests__/state.js
@@ -259,4 +259,4 @@ state.core.items['jest:track:three'] = {
]
};
-module.exports = state;
+export default state;
diff --git a/__tests__/views/Album.test.js b/__tests__/views/Album.test.js
index b7af2475..43061473 100755
--- a/__tests__/views/Album.test.js
+++ b/__tests__/views/Album.test.js
@@ -4,8 +4,7 @@ import TestRenderer from 'react-test-renderer';
import { Album } from '../../src/js/views/Album';
import * as uiActions from '../../src/js/services/ui/actions';
import * as coreActions from '../../src/js/services/core/actions';
-
-const state = require('../state');
+import state from '../state';
jest.mock('react-redux', () => ({
useSelector: jest.fn(),