mirror of
https://github.com/wassname/talk.git
synced 2026-07-03 04:55:04 +08:00
Changes field for metadata. Needs to look at this test better.
This commit is contained in:
@@ -10,7 +10,11 @@ import CommentHistory from 'coral-plugin-history/CommentHistory';
|
||||
import SettingsHeader from '../components/SettingsHeader';
|
||||
import RestrictedContent from 'coral-framework/components/RestrictedContent';
|
||||
|
||||
class SignInContainer extends Component {
|
||||
import I18n from 'coral-framework/modules/i18n/i18n';
|
||||
import translations from '../translations';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
class SettingsContainer extends Component {
|
||||
constructor (props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
@@ -59,7 +63,7 @@ class SignInContainer extends Component {
|
||||
? <CommentHistory
|
||||
comments={commentsMostRecentFirst}
|
||||
assets={user.myAssets.map(id => items.assets[id])} />
|
||||
: <p>Loading comment history...</p>
|
||||
: <p>{lang.t('user-no-comment')}</p>
|
||||
}
|
||||
</TabContent>
|
||||
<TabContent show={activeTab === 1}>
|
||||
@@ -83,4 +87,4 @@ const mapDispatchToProps = dispatch => ({
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(SignInContainer);
|
||||
)(SettingsContainer);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"en":{
|
||||
"user-no-comment": "This user has not yet left a comment."
|
||||
},
|
||||
"es":{
|
||||
"user-no-comment": "Aún no ha escrito ningún comentario."
|
||||
}
|
||||
}
|
||||
@@ -225,8 +225,9 @@ describe('/api/v1/comments', () => {
|
||||
let action = actions[0];
|
||||
|
||||
expect(action).to.have.property('item_id', comment.id);
|
||||
expect(action).to.have.property('field', 'body');
|
||||
expect(action).to.have.property('detail', 'Matched suspect word filters.');
|
||||
expect(action).to.have.property('metadata', 'body');
|
||||
|
||||
// expect(action).to.have.property('detail', 'Matched suspect word filters.');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user