Skip to content

Commit

Permalink
Merge pull request #213 from edx/mroytman/add-edit-image-modal-tests
Browse files Browse the repository at this point in the history
add EditImageModal tests
  • Loading branch information
MichaelRoytman authored May 22, 2018
2 parents fb37fa8 + 8c15f00 commit 79c2751
Show file tree
Hide file tree
Showing 14 changed files with 1,601 additions and 993 deletions.
603 changes: 413 additions & 190 deletions package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { Button } from '@edx/paragon';

import AssetsClearFiltersButton from './index';
import courseDetails from '../../utils/testConstants';
import { courseDetails } from '../../utils/testConstants';
import { shallowWithIntl } from '../../utils/i18n/enzymeHelper';
import WrappedMessage from '../../utils/i18n/formattedMessageWrapper';
import messages from './displayMessages';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Button } from '@edx/paragon';
import React from 'react';

import AssetsClearSearchButton from './index';
import courseDetails from '../../utils/testConstants';
import { courseDetails } from '../../utils/testConstants';
import messages from './displayMessages';
import { shallowWithIntl } from '../../utils/i18n/enzymeHelper';
import WrappedMessage from '../../utils/i18n/formattedMessageWrapper';
Expand Down
2 changes: 1 addition & 1 deletion src/components/AssetsDropZone/AssetsDropZone.test.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import AssetsDropZone from './index';
import courseDetails from '../../utils/testConstants';
import { courseDetails } from '../../utils/testConstants';
import { mountWithIntl } from '../../utils/i18n/enzymeHelper';

const defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/AssetsList/AssetsList.test.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import AssetsList from './index';
import courseDetails, { testAssetsList } from '../../utils/testConstants';
import { courseDetails, testAssetsList } from '../../utils/testConstants';
import messages from './displayMessages';
import { mountWithIntl } from '../../utils/i18n/enzymeHelper';
import { paginationInitial, selectInitial } from '../../data/reducers/assets';
Expand Down
2 changes: 1 addition & 1 deletion src/components/AssetsPage/AssetsPage.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

import { assetActions } from '../../data/constants/actionTypes';
import AssetsPage, { TABLE_CONTENTS_ID } from './index';
import courseDetails, { testAssetsList } from '../../utils/testConstants';
import { courseDetails, testAssetsList } from '../../utils/testConstants';
import messages from './displayMessages';
import { pageTypes } from '../../utils/getAssetsPageType';
import { shallowWithIntl } from '../../utils/i18n/enzymeHelper';
Expand Down
20 changes: 10 additions & 10 deletions src/components/AssetsPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ export default class AssetsPage extends React.Component {
>
<WrappedMessage message={messages.assetsPageSkipLink} />
</a>
{ this.renderAssetsDropZone() }
{this.renderAssetsDropZone()}
<div className="page-header">
<WrappedAssetsImagePreviewFilter />
</div>
{ this.renderAssetsFilters() }
{this.renderAssetsFilters()}
</div>
<div className="col-10" id={TABLE_CONTENTS_ID} tabIndex="-1">
<div className="row">
Expand All @@ -143,10 +143,10 @@ export default class AssetsPage extends React.Component {
renderNoAssetsPage = () => (
<div className="row">
<div className="col">
{ this.renderAssetsDropZone() }
{this.renderAssetsDropZone()}
</div>
<div className="col-10">
{ this.renderNoAssetsBody() }
{this.renderNoAssetsBody()}
</div>
</div>
);
Expand All @@ -161,20 +161,20 @@ export default class AssetsPage extends React.Component {
renderNoResultsPage = () => (
<div className="row">
<div className="col">
{ this.renderAssetsDropZone() }
{ this.renderAssetsFilters() }
{this.renderAssetsDropZone()}
{this.renderAssetsFilters()}
</div>
<div className="col-10">
{ this.renderNoResultsBody() }
{this.renderNoResultsBody()}
</div>
</div>
);

renderSkeletonPage = () => (
<div className="row">
<div className="col-2">
{ this.renderAssetsDropZone() }
{ this.renderAssetsFilters() }
{this.renderAssetsDropZone()}
{this.renderAssetsFilters()}
</div>
</div>
);
Expand All @@ -200,7 +200,7 @@ export default class AssetsPage extends React.Component {
</div>
</div>
)}
{ this.getPage(this.state.pageType) }
{this.getPage(this.state.pageType)}
</div>
</React.Fragment>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/AssetsTable/AssetsTable.test.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import AssetsTable from './index';
import courseDetails, { testAssetsList } from '../../utils/testConstants';
import { courseDetails, testAssetsList } from '../../utils/testConstants';
import { assetActions } from '../../data/constants/actionTypes';
import { assetLoading } from '../../data/constants/loadingTypes';
import mockQuerySelector from '../../utils/mockQuerySelector';
Expand Down
Loading

0 comments on commit 79c2751

Please sign in to comment.