Réparation 🐛 de test, ✨ utilisation de title et pas titre
parent
f1980911a7
commit
e9207e3276
|
@ -40,7 +40,7 @@ export default class Aide extends Component {
|
|||
className="fa fa-times-circle"
|
||||
onClick={stopExplaining} ></i>
|
||||
<p
|
||||
dangerouslySetInnerHTML={{__html: this.renderExplanationMarkdown(text, rule.titre || capitalise0(rule.name))}}>
|
||||
dangerouslySetInnerHTML={{__html: this.renderExplanationMarkdown(text, rule.title)}}>
|
||||
</p>
|
||||
{/* { possibilities &&
|
||||
<p>
|
||||
|
|
|
@ -72,7 +72,7 @@ export default class extends Component {
|
|||
return (
|
||||
<div id="sim">
|
||||
<Helmet>
|
||||
<title>Simulateur d'embauche : {R.pluck('titre', this.targetRules).join(', ')}</title>
|
||||
<title>Simulateur d'embauche : {R.pluck('title', this.targetRules).join(', ')}</title>
|
||||
<meta name="description" content={R.pluck('description', this.targetRules).join(' - ')} />
|
||||
</Helmet>
|
||||
<Results />
|
||||
|
|
|
@ -25,7 +25,7 @@ export default class Explicable extends React.Component {
|
|||
if (!rule) return <span>{label}</span>
|
||||
|
||||
let ruleLabel = (
|
||||
label || rule.titre || rule.name
|
||||
label || rule.title
|
||||
).replace(/\s\?$/g, '\u00a0?') // le possible ' ?' final est rendu insécable
|
||||
|
||||
// Rien à expliquer ici, il n'y a pas de champ description dans la règle
|
||||
|
|
|
@ -78,14 +78,14 @@ export default class Question extends Component {
|
|||
<RadioLabel {...{value: 'non', label: 'Aucun', input, submit, themeColours}}/>
|
||||
</li>
|
||||
}
|
||||
{ choices.children && choices.children.map( ({name, titre, dottedName, children}) =>
|
||||
{ choices.children && choices.children.map( ({name, title, dottedName, children}) =>
|
||||
children ?
|
||||
<li key={name} className="variant">
|
||||
<div>{titre || name}</div>
|
||||
<div>{title}</div>
|
||||
{this.renderChildren({children})}
|
||||
</li>
|
||||
: <li key={name} className="variantLeaf">
|
||||
<RadioLabel {...{value: relativeDottedName(dottedName), label: titre || name, dottedName, input, submit, themeColours}}/>
|
||||
<RadioLabel {...{value: relativeDottedName(dottedName), label: title, dottedName, input, submit, themeColours}}/>
|
||||
</li>
|
||||
)}
|
||||
</ul>)
|
||||
|
|
|
@ -54,14 +54,14 @@ export default class Rule extends Component {
|
|||
let conversationStarted = !R.isEmpty(this.props.form),
|
||||
situationExists = conversationStarted || this.state.example != null
|
||||
|
||||
let { type, name, titre, description, question } = this.rule,
|
||||
let { type, name, title, description, question } = this.rule,
|
||||
situationOrExampleRule =
|
||||
R.path(["example", "rule"])(this.state) || this.rule
|
||||
|
||||
return (
|
||||
<div id="rule">
|
||||
<Helmet>
|
||||
<title>{titre || capitalise0(name)}</title>
|
||||
<title>{title}</title>
|
||||
<meta name="description" content={description} />
|
||||
</Helmet>
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import ReactCSSTransitionGroup from "react-addons-css-transition-group"
|
|||
export default ({
|
||||
name,
|
||||
type,
|
||||
titre,
|
||||
title,
|
||||
conversationStarted,
|
||||
nodeValue: ruleValue
|
||||
}) =>
|
||||
|
@ -30,7 +30,7 @@ export default ({
|
|||
>
|
||||
<Link to={"/regle/" + encodeRuleName(name)}>
|
||||
<div className="rule-box">
|
||||
<span className="rule-name">{titre || capitalise0(name)}</span>
|
||||
<span className="rule-name">{title}</span>
|
||||
<RuleValue
|
||||
{...{ unsatisfied, irrelevant, conversationStarted, ruleValue }}
|
||||
/>
|
||||
|
|
|
@ -52,7 +52,7 @@ export let nextSteps = (situationGate, flatRules, analysis) => {
|
|||
}
|
||||
|
||||
export let constructStepMeta = ({
|
||||
titre,
|
||||
title,
|
||||
question,
|
||||
subquestion,
|
||||
dottedName,
|
||||
|
@ -69,7 +69,7 @@ export let constructStepMeta = ({
|
|||
lightBackground={true}
|
||||
/>
|
||||
),
|
||||
title: titre || name,
|
||||
title,
|
||||
subquestion,
|
||||
|
||||
// Legacy properties :
|
||||
|
|
|
@ -7,13 +7,13 @@ let stateSelector = (state, name) => null
|
|||
describe('enrichRule', function() {
|
||||
|
||||
it('should extract the type of the rule', function() {
|
||||
let rule = {cotisation:{}}
|
||||
let rule = {nom: 'retraite', cotisation:{}}
|
||||
expect(enrichRule(rule)).to.have.property('type','cotisation')
|
||||
});
|
||||
|
||||
it('should load external data into the rule', function() {
|
||||
let data = {taux_versement_transport: {one: "two"}}
|
||||
let rule = {cotisation:{}, données: 'taux_versement_transport'}
|
||||
let rule = {nom: 'retraite', cotisation:{}, données: 'taux_versement_transport'}
|
||||
expect(enrichRule(rule, data)).to.have.deep.property('data',{one: "two"})
|
||||
});
|
||||
|
||||
|
@ -24,7 +24,7 @@ describe('enrichRule', function() {
|
|||
});
|
||||
|
||||
it('should render Markdown in sub-questions', function() {
|
||||
let rule = {"sous-question":"**wut**"}
|
||||
let rule = {nom: 'quoi', "sous-question":"**wut**"}
|
||||
expect(enrichRule(rule)).to.have.property('subquestion','<p><strong>wut</strong></p>\n')
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue