From 53dd34f406151693fec9e152e83e10c9b4709476 Mon Sep 17 00:00:00 2001 From: David Erwin Date: Tue, 24 Jan 2017 16:11:17 -0500 Subject: [PATCH 1/2] Updating admin screen for all caps enums --- client/coral-admin/src/containers/Community/Table.js | 8 ++++---- .../containers/ModerationQueue/ModerationContainer.js | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/client/coral-admin/src/containers/Community/Table.js b/client/coral-admin/src/containers/Community/Table.js index c146e564a..254550e74 100644 --- a/client/coral-admin/src/containers/Community/Table.js +++ b/client/coral-admin/src/containers/Community/Table.js @@ -55,8 +55,8 @@ class Table extends Component { className={styles.selectField} label={lang.t('community.status')} onChange={status => this.onCommenterStatusChange(row.id, status)}> - - + + @@ -65,8 +65,8 @@ class Table extends Component { label={lang.t('community.role')} onChange={role => this.onRoleChange(row.id, role)}> - - + + diff --git a/client/coral-admin/src/containers/ModerationQueue/ModerationContainer.js b/client/coral-admin/src/containers/ModerationQueue/ModerationContainer.js index 41988e216..1b23de89a 100644 --- a/client/coral-admin/src/containers/ModerationQueue/ModerationContainer.js +++ b/client/coral-admin/src/containers/ModerationQueue/ModerationContainer.js @@ -75,12 +75,12 @@ class ModerationContainer extends React.Component { render () { const {comments} = this.props; - const premodIds = comments.ids.filter(id => comments.byId[id].status === 'premod'); - const rejectedIds = comments.ids.filter(id => comments.byId[id].status === 'rejected'); + const premodIds = comments.ids.filter(id => comments.byId[id].status === 'PREMOD'); + const rejectedIds = comments.ids.filter(id => comments.byId[id].status === 'REJECTED'); const flaggedIds = comments.ids.filter(id => comments.byId[id].flagged === true && - comments.byId[id].status !== 'rejected' && - comments.byId[id].status !== 'accepted' + comments.byId[id].status !== 'REJECTED' && + comments.byId[id].status !== 'ACCEPTED' ); return ( @@ -112,7 +112,7 @@ const mapDispatchToProps = dispatch => { fetchFlaggedQueue: () => dispatch(fetchFlaggedQueue()), showBanUserDialog: (userId, userName, commentId) => dispatch(showBanUserDialog(userId, userName, commentId)), hideBanUserDialog: () => dispatch(hideBanUserDialog(false)), - banUser: (userId, commentId) => dispatch(userStatusUpdate('banned', userId, commentId)).then(() => { + banUser: (userId, commentId) => dispatch(userStatusUpdate('BANNED', userId, commentId)).then(() => { dispatch(fetchModerationQueueComments()); }), updateStatus: (action, comment) => dispatch(updateStatus(action, comment)) From 050e98f1576b4eeb6b6141869fe5df4d6828de9d Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Tue, 24 Jan 2017 14:12:38 -0700 Subject: [PATCH 2/2] Fixed report location --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index fb598ffe0..4d1f54286 100644 --- a/circle.yml +++ b/circle.yml @@ -10,7 +10,7 @@ test: - npm run lint - ./bin/cli settings init - sleep 5 - - MOCHA_FILE=junit/test-results.xml NPM_PACKAGE_CONFIG_MOCHA_REPORTER=mocha-junit-reporter npm run test + - MOCHA_FILE=$CIRCLE_TEST_REPORTS/junit/test-results.xml NPM_PACKAGE_CONFIG_MOCHA_REPORTER=mocha-junit-reporter npm run test deployment: release: