test: add test for #2863
parent
2b11c25e9b
commit
ecd53e3a5d
|
@ -0,0 +1,25 @@
|
|||
import { checkA11Y, fr } from '../../support/utils'
|
||||
|
||||
describe('Simulateur indépendant', { testIsolation: false }, function () {
|
||||
if (!fr) {
|
||||
return
|
||||
}
|
||||
|
||||
const inputSelector = 'div[id="simulator-legend"] input[inputmode="numeric"]'
|
||||
|
||||
before(function () {
|
||||
return cy.visit('/simulateurs/indépendant')
|
||||
})
|
||||
|
||||
it('should not display info about cotisations forfaitaires début activité by default', function () {
|
||||
cy.get(inputSelector).first().type('{selectall}50000')
|
||||
cy.contains(
|
||||
'Comment fonctionne la régularisation des cotisations provisionnelles'
|
||||
)
|
||||
cy.contains('Montant des cotisations forfaitaires').should('not.exist')
|
||||
})
|
||||
|
||||
it('should be RGAA compliant', function () {
|
||||
checkA11Y()
|
||||
})
|
||||
})
|
|
@ -7,14 +7,7 @@ type ViolationType = {
|
|||
|
||||
export const checkA11Y = () => {
|
||||
cy.injectAxe()
|
||||
cy.configureAxe({
|
||||
rules: [
|
||||
{
|
||||
id: 'color-contrast',
|
||||
enabled: false,
|
||||
},
|
||||
],
|
||||
})
|
||||
cy.configureAxe({})
|
||||
cy.checkA11y(
|
||||
null,
|
||||
null,
|
||||
|
|
|
@ -16,10 +16,11 @@ export function WhenApplicable({
|
|||
const defaultEngine = useEngine()
|
||||
|
||||
const engineValue = engine ?? defaultEngine
|
||||
|
||||
if (
|
||||
engineValue.evaluate({ 'est applicable': dottedName }).nodeValue !== true
|
||||
) {
|
||||
const applicable = engineValue.evaluate({
|
||||
'est applicable': dottedName,
|
||||
}).nodeValue
|
||||
console.log(dottedName, applicable)
|
||||
if (applicable !== true) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
|
|
@ -131,7 +131,6 @@ export default function RuleInput<Names extends string = DottedName>({
|
|||
['radio', 'card', 'toggle', 'select'].includes(meta.affichage)
|
||||
? (meta.affichage as 'radio' | 'card' | 'toggle' | 'select')
|
||||
: 'radio')
|
||||
console.log(value, missing, dottedName)
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
Loading…
Reference in New Issue