diff --git a/client/coral-admin/src/components/ModerationList.js b/client/coral-admin/src/components/ModerationList.js index 8ce3ec4a4..c1df40d31 100644 --- a/client/coral-admin/src/components/ModerationList.js +++ b/client/coral-admin/src/components/ModerationList.js @@ -8,10 +8,10 @@ import SuspendUserModal from './SuspendUserModal'; // Each action has different meaning and configuration const menuOptionsMap = { - 'reject': {status: 'rejected', icon: 'close', key: 'r'}, - 'approve': {status: 'accepted', icon: 'done', key: 't'}, - 'flag': {status: 'flagged', icon: 'flag', filter: 'Untouched'}, - 'ban': {status: 'banned', icon: 'not interested'} + 'reject': {status: 'REJECTED', icon: 'close', key: 'r'}, + 'approve': {status: 'ACCEPTED', icon: 'done', key: 't'}, + 'flag': {status: 'FLAGGED', icon: 'flag', filter: 'Untouched'}, + 'ban': {status: 'BANNED', icon: 'not interested'} }; // Renders a comment list and allow performing actions @@ -135,9 +135,9 @@ export default class ModerationList extends React.Component { } else if (action.item_type === 'USERS') { // If a user bio or name is rejected, bring up a dialog before suspending them. - if (menuOption === 'rejected') { + if (menuOption === 'REJECTED') { this.setState({suspendUserModal: action}); - } else if (menuOption === 'accepted') { + } else if (menuOption === 'ACCEPTED') { this.props.userStatusUpdate('ACTIVE', action.item_id); } } diff --git a/package.json b/package.json index 41b11e848..641d85757 100644 --- a/package.json +++ b/package.json @@ -154,7 +154,7 @@ "redux-mock-store": "^1.2.1", "redux-thunk": "^2.1.0", "regenerator": "^0.8.46", - "selenium-standalone": "latest", + "selenium-standalone": "^5.11.2", "style-loader": "^0.13.1", "supertest": "^2.0.1", "timeago.js": "^2.0.3", diff --git a/scripts/pree2e.sh b/scripts/pree2e.sh index f9caae85d..80aed9253 100755 --- a/scripts/pree2e.sh +++ b/scripts/pree2e.sh @@ -1,7 +1,7 @@ #!/bin/bash # install selenium -selenium-standalone install +selenium-standalone install --config=./selenium.config.js # Creating Admin Test User ./bin/cli users create --flag_mode --email "admin@test.com" --password "testtest" --name "AdminTestUser" --role "ADMIN" diff --git a/selenium.config.js b/selenium.config.js new file mode 100644 index 000000000..b43c31ef0 --- /dev/null +++ b/selenium.config.js @@ -0,0 +1,9 @@ +module.exports = { + drivers: { + chrome: { + version: '2.25', + arch: process.arch, + baseURL: 'https://chromedriver.storage.googleapis.com' + }, + }, +};