diff --git a/scripts/createConnections.js b/scripts/createConnections.js index d1008101e4828615a49e61b39cd913c2454f93af..80a42cca29c97e4b56491e2be571224144e4e3ff 100644 --- a/scripts/createConnections.js +++ b/scripts/createConnections.js @@ -9,7 +9,11 @@ const headers = { 'content-type': 'application/json', } +const COZY_PREFIX = 'cozy35ba44d2d1749e6f21646edce51e7190' + +const ENEDIS_ACCOUNT_ID = '70e68b8450cee09fe2f077610901094d' const dataEnedisAccount = JSON.stringify({ + id: ENEDIS_ACCOUNT_ID, account_type: 'enedissgegrandlyon', name: '', auth: { @@ -25,32 +29,32 @@ const dataEnedisAccount = JSON.stringify({ expirationDate: '2023-09-26', offPeakHours: '22H00-6H00', }, - id: '70e68b8450cee09fe2f077610901094d', identifier: 'address', state: null, }) -// TODO update this to have auth field ? +const GRDF_ACCOUNT_ID = '89e68b8450cee09fe2f077610901094d' const dataGrdfAccount = JSON.stringify({ + id: GRDF_ACCOUNT_ID, account_type: 'grdfgrandlyon', auth: { credentials_encrypted: 'bmFjbMKrNCS+4Liakxdu+xNu9I3sSyvda8iAp0o3U3OAymbIeoLhLtxPdsa+3mu/8yTnDudBcJo=', login: 'test', }, - id: '89e68b8450cee09fe2f077610901094d', identifier: 'login', state: null, }) +const EGL_ACCOUNT_ID = '90e68b8450cee09fe2f077610901094d' const dataEglAccount = JSON.stringify({ + id: EGL_ACCOUNT_ID, account_type: 'eglgrandlyon', auth: { credentials_encrypted: 'bmFjbHI5OoL+VNCT6JDFYea1dNiBGGNJM1zY0M4uWcjhALJcQT9uk9p9WPD7+1OryCAoYf9eaSE=', login: 'test', }, - id: '90e68b8450cee09fe2f077610901094d', identifier: 'login', state: null, }) @@ -60,14 +64,14 @@ const dataEnedisTrigger = JSON.stringify({ attributes: { _id: '3ed832cec67e6e0b2c6382edd30df11c', domain: 'cozy.tools:8080', - prefix: 'cozy35ba44d2d1749e6f21646edce51e7190', + prefix: COZY_PREFIX, type: '@cron', worker: 'konnector', arguments: '0 47 8 * * *', debounce: '', options: null, message: { - account: '70e68b8450cee09fe2f077610901094d', + account: ENEDIS_ACCOUNT_ID, konnector: 'enedissgegrandlyon', }, cozyMetadata: { @@ -86,14 +90,14 @@ const dataGrdfTrigger = JSON.stringify({ attributes: { _id: '4ed832cec67e6e0b2c6382edd30df11c', domain: 'cozy.tools:8080', - prefix: 'cozy35ba44d2d1749e6f21646edce51e7190', + prefix: COZY_PREFIX, type: '@cron', worker: 'konnector', arguments: '0 47 8 * * *', debounce: '', options: null, message: { - account: '89e68b8450cee09fe2f077610901094d', + account: GRDF_ACCOUNT_ID, konnector: 'grdfgrandlyon', }, cozyMetadata: { @@ -112,14 +116,14 @@ const dataEglTrigger = JSON.stringify({ attributes: { _id: '5ed832cec67e6e0b2c6382edd30df11c', domain: 'cozy.tools:8080', - prefix: 'cozy35ba44d2d1749e6f21646edce51e7190', + prefix: COZY_PREFIX, type: '@cron', worker: 'konnector', arguments: '0 47 8 * * *', debounce: '', options: null, message: { - account: '90e68b8450cee09fe2f077610901094d', + account: EGL_ACCOUNT_ID, konnector: 'eglgrandlyon', }, cozyMetadata: { @@ -137,7 +141,7 @@ async function launch() { // Enedis await axios({ method: 'put', - url: 'http://cozy.tools:8080/data/io.cozy.accounts/70e68b8450cee09fe2f077610901094d', + url: `http://cozy.tools:8080/data/io.cozy.accounts/${ENEDIS_ACCOUNT_ID}`, headers: headers, data: dataEnedisAccount, }) @@ -164,7 +168,7 @@ async function launch() { // GRDF await axios({ method: 'put', - url: 'http://cozy.tools:8080/data/io.cozy.accounts/89e68b8450cee09fe2f077610901094d', + url: `http://cozy.tools:8080/data/io.cozy.accounts/${GRDF_ACCOUNT_ID}`, headers: headers, data: dataGrdfAccount, }) @@ -191,7 +195,7 @@ async function launch() { // EGL await axios({ method: 'put', - url: 'http://cozy.tools:8080/data/io.cozy.accounts/90e68b8450cee09fe2f077610901094d', + url: `http://cozy.tools:8080/data/io.cozy.accounts/${EGL_ACCOUNT_ID}`, headers: headers, data: dataEglAccount, }) diff --git a/src/components/Options/HelpLink/HelpLink.tsx b/src/components/Options/HelpLink/HelpLink.tsx index 4702a64fac00f1f6c8d99aa4daac80313101200c..a5b9d5460c54e5d342eb34162d256b3db5f8e712 100644 --- a/src/components/Options/HelpLink/HelpLink.tsx +++ b/src/components/Options/HelpLink/HelpLink.tsx @@ -20,6 +20,7 @@ const HelpLink = () => { <Link className="help-card-link" onClick={() => dispatch(openFeedbackModal(true))} + tabIndex={0} > <div className="card"> <div className="help-card"> diff --git a/src/components/Options/__snapshots__/OptionsView.spec.tsx.snap b/src/components/Options/__snapshots__/OptionsView.spec.tsx.snap index 7fb5e230cdcb6ac88ed868538296e64bed7c86e7..d45aefbaa1974c6e62cee34dfda12c2bd8489318 100644 --- a/src/components/Options/__snapshots__/OptionsView.spec.tsx.snap +++ b/src/components/Options/__snapshots__/OptionsView.spec.tsx.snap @@ -217,6 +217,7 @@ exports[`OptionsView component should be rendered correctly 1`] = ` </div> <a class="MuiTypography-root MuiLink-root MuiLink-underlineHover help-card-link MuiTypography-colorPrimary" + tabindex="0" > <div class="card"