Updating package.json and nightwatch package

This commit is contained in:
Belen Curcio
2016-12-17 10:50:47 -03:00
4 changed files with 27 additions and 17 deletions
+10
View File
@@ -4,6 +4,16 @@
"node": true
},
"extends": "eslint:recommended",
"ecmaFeatures": {
"sourceType": "module"
},
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
}
},
"rules": {
"indent": ["error",
2
@@ -48,7 +48,6 @@ class ModerationQueue extends React.Component {
// Hack for dynamic mdl tabs
componentDidMount () {
if (typeof componentHandler !== 'undefined') {
// FIXME: fix this hack
componentHandler.upgradeAllRegistered(); // eslint-disable-line no-undef
}
@@ -56,7 +55,6 @@ class ModerationQueue extends React.Component {
// Dispatch the update status action
onCommentAction (action, id) {
// If not banning then change the status to approved or flagged as action = status
this.props.dispatch(updateStatus(action, id));
}
@@ -73,7 +71,7 @@ class ModerationQueue extends React.Component {
this.props.dispatch(banUser('banned', userId, commentId));
}
showShortcuts = () => {
showShortcuts () {
this.setState({modalOpen: true});
}
@@ -100,7 +98,7 @@ class ModerationQueue extends React.Component {
className={`mdl-tabs__tab ${styles.tab}`}>{lang.t('modqueue.rejected')}</a>
<a href='#flagged' onClick={() => this.onTabClick('flagged')}
className={`mdl-tabs__tab ${styles.tab}`}>{lang.t('modqueue.flagged')}</a>
<a href='#shortcuts' onClick={this.showShortcuts}
<a href='#' onClick={() => this.showShortcuts()}
className={`mdl-tabs__tab ${styles.tab} ${styles.showShortcuts}`}>
<Icon name='keyboard' />
<span>{lang.t('modqueue.showshortcuts')}</span>
@@ -122,7 +120,7 @@ class ModerationQueue extends React.Component {
handleClose={() => this.hideBanUserDialog()}
onClickBanUser={(userId, commentId) => this.banUser(userId, commentId)}
user={comments.banUser}/>
</div>
</div>
<div className={`mdl-tabs__panel ${styles.listContainer}`} id='rejected'>
<CommentList
isActive={activeTab === 'rejected'}
@@ -136,7 +134,7 @@ class ModerationQueue extends React.Component {
</div>
<div className={`mdl-tabs__panel ${styles.listContainer}`} id='flagged'>
<CommentList
isActive={activeTab === 'flagged'}
isActive={activeTab === 'rejected'}
singleView={singleView}
commentIds={flaggedIds}
comments={comments.byId}
@@ -145,14 +143,11 @@ class ModerationQueue extends React.Component {
actions={['reject', 'approve']}
loading={comments.loading} />
</div>
<div className={`mdl-tabs__panel ${styles.listContainer}`} id='shortcuts'>
<ModerationKeysModal open={modalOpen}
onClose={() => this.setState({modalOpen: false})} />
</div>
<ModerationKeysModal open={modalOpen}
onClose={() => this.setState({modalOpen: false})} />
</div>
</div>
);
}
}
+8 -3
View File
@@ -19,6 +19,8 @@ module.exports = {
},
'test_settings': {
'default': {
'launch_url' : 'http://localhost:3000',
'globals' : {},
'selenium_port': 6666,
'selenium_host': 'localhost',
'silent': true,
@@ -27,7 +29,7 @@ module.exports = {
'javascriptEnabled': true,
'acceptSslCerts': true,
'webStorageEnabled' : true,
'databaseEnabled' : true,
'databaseEnabled' : true,""
'applicationCacheEnabled' : false,
'nativeEvents' : true
},
@@ -37,8 +39,11 @@ module.exports = {
'on_error' : true,
'path' : './tests/e2e/reports'
},
'exclude': [
]
'exclude': []
},
'integration': {
'launch_url' : 'http://localhost:3000',
'globals' : {}
}
}
};
+3 -3
View File
@@ -11,8 +11,8 @@
"lint-fix": "./node_modules/.bin/eslint bin/* . --fix",
"test": "NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register tests/helpers/*.js --require ignore-styles --recursive tests",
"test-watch": "NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel-core/register --recursive -w tests",
"pree2e": "NODE_ENV=test ./scripts/pree2e.sh",
"e2e": "NODE_ENV=test ./node_modules/.bin/nightwatch",
"pree2e": "node_modules/selenium-standalone/bin/selenium-standalone install",
"e2e": "NODE_ENV=test nightwatch",
"embed-start": "NODE_ENV=development npm run build && ./bin/cli serve --jobs"
},
"config": {
@@ -115,7 +115,7 @@
"material-design-lite": "^1.2.1",
"mocha": "^3.1.2",
"mocha-junit-reporter": "^1.12.1",
"nightwatch": "^0.9.9",
"nightwatch": "^0.9.11",
"node-fetch": "^1.6.3",
"postcss-loader": "^1.1.0",
"postcss-modules": "^0.5.2",