Skip to content
Snippets Groups Projects
Commit cce31949 authored by Yoan VALLET's avatar Yoan VALLET
Browse files

feat: update ActivateHalfHourLoad

parent 708c71bd
No related branches found
No related tags found
1 merge request!319accessibility buttons
...@@ -6,7 +6,7 @@ import configureStore from 'redux-mock-store' ...@@ -6,7 +6,7 @@ import configureStore from 'redux-mock-store'
import { globalStateData } from '../../../tests/__mocks__/globalStateData.mock' import { globalStateData } from '../../../tests/__mocks__/globalStateData.mock'
import * as reactRedux from 'react-redux' import * as reactRedux from 'react-redux'
import { userChallengeExplo1OnGoing } from '../../../tests/__mocks__/userChallengeData.mock' import { userChallengeExplo1OnGoing } from '../../../tests/__mocks__/userChallengeData.mock'
import MuiButton from '@material-ui/core/Button' import Button from '@material-ui/core/Button'
jest.mock('cozy-ui/transpiled/react/I18n', () => { jest.mock('cozy-ui/transpiled/react/I18n', () => {
return { return {
...@@ -39,7 +39,7 @@ describe('ActivateHalfHourLoad component test', () => { ...@@ -39,7 +39,7 @@ describe('ActivateHalfHourLoad component test', () => {
global.open = jest.fn() global.open = jest.fn()
wrapper.find(MuiButton).simulate('click') wrapper.find(Button).simulate('click')
expect(global.open).toHaveBeenCalledWith( expect(global.open).toHaveBeenCalledWith(
'https://mon-compte-particulier.enedis.fr/donnees/', 'https://mon-compte-particulier.enedis.fr/donnees/',
'_blank' '_blank'
......
...@@ -2,7 +2,7 @@ import React from 'react' ...@@ -2,7 +2,7 @@ import React from 'react'
import { IuseI18n, useI18n } from 'cozy-ui/transpiled/react/I18n' import { IuseI18n, useI18n } from 'cozy-ui/transpiled/react/I18n'
import ConfigService from 'services/fluidConfig.service' import ConfigService from 'services/fluidConfig.service'
import MuiButton from '@material-ui/core/Button' import Button from '@material-ui/core/Button'
import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import StyledIcon from 'components/CommonKit/Icon/StyledIcon'
import iconEnedisLogo from 'assets/icons/visu/enedis-logo.svg' import iconEnedisLogo from 'assets/icons/visu/enedis-logo.svg'
import './activateHalfHourLoad.scss' import './activateHalfHourLoad.scss'
...@@ -20,7 +20,8 @@ const ActivateHalfHourLoad = () => { ...@@ -20,7 +20,8 @@ const ActivateHalfHourLoad = () => {
<div className="activatehalfhour-box-header header-text text-16-normal"> <div className="activatehalfhour-box-header header-text text-16-normal">
{t('timestep.activate.enedis.info')} {t('timestep.activate.enedis.info')}
</div> </div>
<MuiButton <Button
aria-label={t('timestep.activate.enedis.accessibility.button_activate')}
onClick={() => { onClick={() => {
setValidExploration(UserExplorationID.EXPLORATION004) setValidExploration(UserExplorationID.EXPLORATION004)
window.open(fluidConfig[0].konnectorConfig.activation, '_blank') window.open(fluidConfig[0].konnectorConfig.activation, '_blank')
...@@ -38,7 +39,7 @@ const ActivateHalfHourLoad = () => { ...@@ -38,7 +39,7 @@ const ActivateHalfHourLoad = () => {
<div> {t('timestep.activate.enedis.label1')}</div> <div> {t('timestep.activate.enedis.label1')}</div>
</div> </div>
</div> </div>
</MuiButton> </Button>
</div> </div>
) )
} }
......
...@@ -314,7 +314,10 @@ ...@@ -314,7 +314,10 @@
"activate": { "activate": {
"enedis": { "enedis": {
"info": "Pour visualiser vos consommations à la 1/2 heure, il vous faut valider l'activation de l'enregistrement de votre consommation horaire sur votre compte Enedis", "info": "Pour visualiser vos consommations à la 1/2 heure, il vous faut valider l'activation de l'enregistrement de votre consommation horaire sur votre compte Enedis",
"label1": "Activer sur mon compte Enedis" "label1": "Activer sur mon compte Enedis",
"accessibility": {
"button_activate": "Aller sur mon compte Enedis"
}
} }
} }
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment