diff --git a/lib/static/components/modals/screenshot-accepter/body.jsx b/lib/static/components/modals/screenshot-accepter/body.jsx index ec574924c..fac86d4be 100644 --- a/lib/static/components/modals/screenshot-accepter/body.jsx +++ b/lib/static/components/modals/screenshot-accepter/body.jsx @@ -3,7 +3,7 @@ import {connect} from 'react-redux'; import PropTypes from 'prop-types'; import ResizedScreenshot from '../../state/screenshot/resized'; import StateFail from '../../state/state-fail'; -import {isNoRefImageError} from '../../../modules/utils'; +import {isNoRefImageError} from '../../../../common-utils'; import ViewInBrowserIcon from '../../icons/view-in-browser'; class ScreenshotAccepterBody extends Component { diff --git a/test/unit/lib/static/components/modals/screenshot-accepter/body.jsx b/test/unit/lib/static/components/modals/screenshot-accepter/body.jsx index b10777902..2d5f4c86f 100644 --- a/test/unit/lib/static/components/modals/screenshot-accepter/body.jsx +++ b/test/unit/lib/static/components/modals/screenshot-accepter/body.jsx @@ -5,7 +5,7 @@ import {mkConnectedComponent} from '../../utils'; describe('', () => { const sandbox = sinon.sandbox.create(); - let ScreenshotAccepterBody, ResizedScreenshot, StateFail, isNoRefImageError; + let ScreenshotAccepterBody, ResizedScreenshot, StateFail; const mkBrowser = (opts) => { const browser = defaults(opts, { @@ -56,12 +56,10 @@ describe('', () => { beforeEach(() => { ResizedScreenshot = sandbox.stub().returns(null); StateFail = sandbox.stub().returns(null); - isNoRefImageError = sandbox.stub().returns(false); ScreenshotAccepterBody = proxyquire('lib/static/components/modals/screenshot-accepter/body', { '../../state/screenshot/resized': {default: ResizedScreenshot}, - '../../state/state-fail': {default: StateFail}, - '../../../modules/utils': {isNoRefImageError} + '../../state/state-fail': {default: StateFail} }).default; }); @@ -97,13 +95,12 @@ describe('', () => { id: 'img', parentId: 'res', stateName: 'state', - error: {stack: 'NoRefImageError'}, + error: {name: 'NoRefImageError'}, actualImg: {path: 'some/path', size: {width: 10, height: 20}} }); const resultsById = mkResult({id: 'res', parentId: 'bro'}); const browsersById = mkBrowser({id: 'bro', parentId: 'suite', name: 'yabro'}); const tree = mkStateTree({browsersById, resultsById}); - isNoRefImageError.withArgs(image.error).returns(true); const component = mkBodyComponent({image}, {tree}); @@ -121,7 +118,6 @@ describe('', () => { const resultsById = mkResult({id: 'res', parentId: 'bro'}); const browsersById = mkBrowser({id: 'bro', parentId: 'suite', name: 'yabro'}); const tree = mkStateTree({browsersById, resultsById}); - isNoRefImageError.returns(false); mkBodyComponent({image}, {tree});