diff --git a/src/components/Action/ActionDone.tsx b/src/components/Action/ActionDone.tsx index 749803180eddfc5b2598c143ebc21ead5d67c78a..18f84913bd18ad75239d8d40d1fca8d60a7b03ac 100644 --- a/src/components/Action/ActionDone.tsx +++ b/src/components/Action/ActionDone.tsx @@ -11,7 +11,7 @@ import { useHistory } from 'react-router-dom' import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import starFilled from 'assets/icons/visu/challenge/starFilled.svg' import './actionDone.scss' -import { toogleChallengeActionNotification } from 'store/global/global.actions' +import { toggleChallengeActionNotification } from 'store/global/global.actions' interface ActionDoneProps { currentChallenge: UserChallenge } @@ -29,7 +29,7 @@ const ActionDone: React.FC<ActionDoneProps> = ({ currentChallenge, UserChallengeUpdateFlag.ACTION_DONE ) - dispatch(toogleChallengeActionNotification(false)) + dispatch(toggleChallengeActionNotification(false)) dispatch(updateUserChallengeList(updatedChallenge)) history.goBack() }, [currentChallenge, dispatch, client, history]) diff --git a/src/components/Analysis/AnalysisView.spec.tsx b/src/components/Analysis/AnalysisView.spec.tsx index 4fee1caf00e4ec7cabd6c8fc5ab163c83d2fe1a1..c9ae694797ae45f81af436af1e18abc6d9f5fdd4 100644 --- a/src/components/Analysis/AnalysisView.spec.tsx +++ b/src/components/Analysis/AnalysisView.spec.tsx @@ -30,9 +30,9 @@ jest.mock('components/Analysis/MonthlyAnalysis', () => () => ( const useSelectorSpy = jest.spyOn(reactRedux, 'useSelector') const useDispatchSpy = jest.spyOn(reactRedux, 'useDispatch') -const toogleAnalysisNotificationSpy = jest.spyOn( +const toggleAnalysisNotificationSpy = jest.spyOn( globalActions, - 'toogleAnalysisNotification' + 'toggleAnalysisNotification' ) const updateProfileSpy = jest.spyOn(profileActions, 'updateProfile') @@ -43,7 +43,7 @@ describe('AnalysisView component', () => { store = createMockStore(mockInitialEcolyoState) useSelectorSpy.mockClear() useDispatchSpy.mockClear() - toogleAnalysisNotificationSpy.mockClear() + toggleAnalysisNotificationSpy.mockClear() updateProfileSpy.mockClear() }) @@ -63,7 +63,7 @@ describe('AnalysisView component', () => { expect(wrapper.find('#monthlyanalysis')).toBeTruthy() }) - it('should update profile and toogle analysis notification to false if notification is true', () => { + it('should update profile and toggle analysis notification to false if notification is true', () => { useSelectorSpy.mockReturnValue({ global: { ...globalStateData, @@ -87,7 +87,7 @@ describe('AnalysisView component', () => { expect(updateProfileSpy).toHaveBeenCalledWith({ haveSeenLastAnalysis: true, }) - expect(toogleAnalysisNotificationSpy).toBeCalledTimes(1) - expect(toogleAnalysisNotificationSpy).toHaveBeenCalledWith(false) + expect(toggleAnalysisNotificationSpy).toBeCalledTimes(1) + expect(toggleAnalysisNotificationSpy).toHaveBeenCalledWith(false) }) }) diff --git a/src/components/Analysis/AnalysisView.tsx b/src/components/Analysis/AnalysisView.tsx index 63d2a75ca59bae6e52ebedda830e0869bf26217b..b6e55107785cbddb4c813e0eb92aba5f39d158df 100644 --- a/src/components/Analysis/AnalysisView.tsx +++ b/src/components/Analysis/AnalysisView.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect, useCallback } from 'react' import { useSelector, useDispatch } from 'react-redux' import { updateProfile } from 'store/profile/profile.actions' -import { toogleAnalysisNotification } from 'store/global/global.actions' +import { toggleAnalysisNotification } from 'store/global/global.actions' import { AppStore } from 'store' import CozyBar from 'components/Header/CozyBar' @@ -27,7 +27,7 @@ const AnalysisView: React.FC = () => { const updateAnalysisNotification = () => { if (analysisNotification) { dispatch(updateProfile({ haveSeenLastAnalysis: true })) - dispatch(toogleAnalysisNotification(false)) + dispatch(toggleAnalysisNotification(false)) } } diff --git a/src/components/Connection/ConnectionFormOAuth.tsx b/src/components/Connection/ConnectionFormOAuth.tsx index 84ccbd6302f34171b7a517796bbe42d0efd6c949..86a2a41c3e3ff35b70e9dc08e99b8ffcad8f433b 100644 --- a/src/components/Connection/ConnectionFormOAuth.tsx +++ b/src/components/Connection/ConnectionFormOAuth.tsx @@ -86,7 +86,7 @@ const ConnectionFormOAuth: React.FC<ConnectionFormOAuthProps> = ({ {t('auth.' + konnectorSlug + '.no_account.text')} </div> </div> - <div className="koauthform-button"> + {/* <div className="koauthform-button"> <Button aria-label={t('auth.accessibility.button_create_account')} onClick={() => window.open(siteLink, '_blank')} @@ -97,7 +97,7 @@ const ConnectionFormOAuth: React.FC<ConnectionFormOAuthProps> = ({ > {t('auth.' + konnectorSlug + '.create_account')} </Button> - </div> + </div> */} </div> ) } diff --git a/src/components/Duel/DuelOngoing.tsx b/src/components/Duel/DuelOngoing.tsx index ef3a1cb146cec90daaac01d174983dfdad899aad..0eaf5926ba87a261fdf4444de2f0a54c0e0dfaa7 100644 --- a/src/components/Duel/DuelOngoing.tsx +++ b/src/components/Duel/DuelOngoing.tsx @@ -9,7 +9,7 @@ import { unlockNextUserChallenge, updateUserChallengeList, } from 'store/challenge/challenge.actions' -import { toogleChallengeDuelNotification } from 'store/global/global.actions' +import { toggleChallengeDuelNotification } from 'store/global/global.actions' import { formatNumberValues } from 'utils/utils' import { UserDuel, UserChallenge } from 'models' @@ -63,7 +63,7 @@ const DuelOngoing: React.FC<DuelOngoingProps> = ({ ) dispatch(updateUserChallengeList(updatedChallenge)) dispatch(unlockNextUserChallenge(updatedChallenge)) - dispatch(toogleChallengeDuelNotification(false)) + dispatch(toggleChallengeDuelNotification(false)) history.push('/challenges') }, [client, dispatch, userChallenge, history, winChallenge]) diff --git a/src/components/Exploration/ExplorationFinished.tsx b/src/components/Exploration/ExplorationFinished.tsx index de05d075324919ffba26079dcd414df43205c0ee..9ff992a397a5e04ebf411e074de269a1567ecec6 100644 --- a/src/components/Exploration/ExplorationFinished.tsx +++ b/src/components/Exploration/ExplorationFinished.tsx @@ -12,7 +12,7 @@ import { updateUserChallengeList } from 'store/challenge/challenge.actions' import ChallengeService from 'services/challenge.service' import { Client, useClient } from 'cozy-client' import { useDispatch } from 'react-redux' -import { toogleChallengeExplorationNotification } from 'store/global/global.actions' +import { toggleChallengeExplorationNotification } from 'store/global/global.actions' interface ExplorationFinishedProps { userChallenge: UserChallenge @@ -33,7 +33,7 @@ const ExplorationFinished: React.FC<ExplorationFinishedProps> = ({ userChallenge, UserChallengeUpdateFlag.EXPLORATION_DONE ) - dispatch(toogleChallengeExplorationNotification(false)) + dispatch(toggleChallengeExplorationNotification(false)) dispatch(updateUserChallengeList(updatedChallenge)) } }, [client, dispatch, userChallenge]) diff --git a/src/components/FAQ/FAQContent.tsx b/src/components/FAQ/FAQContent.tsx index b65429a99f881c2ee77feb6b217f52749d024004..8dfd1d9a1986bbbb61aeacb608d8412e93c44a72 100644 --- a/src/components/FAQ/FAQContent.tsx +++ b/src/components/FAQ/FAQContent.tsx @@ -72,7 +72,7 @@ const FAQContent: React.FC = () => { }} > <ExpansionPanelSummary - aria-label={t('faq.accessibility.button_toogle_detail')} + aria-label={t('faq.accessibility.button_toggle_detail')} expandIcon={<StyledIcon icon={ChevronOffIcon} />} classes={{ root: 'expansion-panel-summary small bold-text', diff --git a/src/components/Hooks/useExploration.tsx b/src/components/Hooks/useExploration.tsx index 3b88c07629296d89a2c33767bf8fcca44525196c..75c99610d640af84c82abdd29725cac31c0e77bc 100644 --- a/src/components/Hooks/useExploration.tsx +++ b/src/components/Hooks/useExploration.tsx @@ -7,7 +7,7 @@ import { AppStore } from 'store' import ExplorationService from 'services/exploration.service' import { updateUserChallengeList } from 'store/challenge/challenge.actions' import { UserExplorationState } from 'enum/userExploration.enum' -import { toogleChallengeExplorationNotification } from 'store/global/global.actions' +import { toggleChallengeExplorationNotification } from 'store/global/global.actions' const useExploration = (): [string, Dispatch<SetStateAction<string>>] => { const client: Client = useClient() @@ -41,7 +41,7 @@ const useExploration = (): [string, Dispatch<SetStateAction<string>>] => { updatedChallenge.exploration.state === UserExplorationState.NOTIFICATION ) { - dispatch(toogleChallengeExplorationNotification(true)) + dispatch(toggleChallengeExplorationNotification(true)) } }) if (subscribed) setExplorationID('') diff --git a/src/components/Konnector/KonnectorViewerCard.tsx b/src/components/Konnector/KonnectorViewerCard.tsx index 25cc8c6eeb74c20f7c334030d7de20f3dde306bd..0ff83d4bbe70a07359fd72329ffb940ace10af5f 100644 --- a/src/components/Konnector/KonnectorViewerCard.tsx +++ b/src/components/Konnector/KonnectorViewerCard.tsx @@ -21,7 +21,7 @@ import { updateProfile } from 'store/profile/profile.actions' import { setChallengeConsumption } from 'store/challenge/challenge.actions' import { setFluidStatus, - toogleChallengeDuelNotification, + toggleChallengeDuelNotification, updatedFluidConnection, } from 'store/global/global.actions' import FluidService from 'services/fluid.service' @@ -131,7 +131,7 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({ updatedUserChallenge, dataloads ) - dispatch(toogleChallengeDuelNotification(isDone)) + dispatch(toggleChallengeDuelNotification(isDone)) } }, [client, dispatch, currentChallenge]) @@ -257,7 +257,7 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({ > <ExpansionPanelSummary aria-label={t( - `konnector_options.accessibility.button_toogle_detail_${FluidType[ + `konnector_options.accessibility.button_toggle_detail_${FluidType[ fluidStatus.fluidType ].toLowerCase()}` )} diff --git a/src/components/Options/ProfileTypeOptions.tsx b/src/components/Options/ProfileTypeOptions.tsx index 0e9c1f13cde1f1cd92479e017c5d4d764ad806e1..742ab706eb35935362b2f77b700f8254464a1b37 100644 --- a/src/components/Options/ProfileTypeOptions.tsx +++ b/src/components/Options/ProfileTypeOptions.tsx @@ -58,7 +58,7 @@ const ProfileTypeOptions: React.FC = () => { > <ExpansionPanelSummary aria-label={t( - 'profile_type.accessibility.button_toogle_detail_profile' + 'profile_type.accessibility.button_toggle_detail_profile' )} expandIcon={<Icon icon={chevronDown} size={16} />} classes={{ diff --git a/src/components/Splash/SplashRoot.tsx b/src/components/Splash/SplashRoot.tsx index 350e8b85f3a4c1b2e3c1da20420b140c6cd53d3b..3f8cea74ad51eb810ebf5fefb466d04263e1f1ad 100644 --- a/src/components/Splash/SplashRoot.tsx +++ b/src/components/Splash/SplashRoot.tsx @@ -3,10 +3,10 @@ import { useClient } from 'cozy-client' import classNames from 'classnames' import { useDispatch } from 'react-redux' import { - toogleAnalysisNotification, - toogleChallengeExplorationNotification, - toogleChallengeActionNotification, - toogleChallengeDuelNotification, + toggleAnalysisNotification, + toggleChallengeExplorationNotification, + toggleChallengeActionNotification, + toggleChallengeDuelNotification, setFluidStatus, } from 'store/global/global.actions' import { updateProfile } from 'store/profile/profile.actions' @@ -129,7 +129,7 @@ const SplashRoot = ({ profile = resultAnalysis.profile } dispatch(updateProfile(profile)) - dispatch(toogleAnalysisNotification(!profile.haveSeenLastAnalysis)) + dispatch(toggleAnalysisNotification(!profile.haveSeenLastAnalysis)) } // Init Fluid status && lastDate for the chart const fluidStatus = await initializationService.initFluidStatus() @@ -161,7 +161,7 @@ const SplashRoot = ({ filteredCurrentOngoingChallenge[0].exploration.state === UserExplorationState.NOTIFICATION ) { - dispatch(toogleChallengeExplorationNotification(true)) + dispatch(toggleChallengeExplorationNotification(true)) } // Set Notification if action state is notification if ( @@ -175,7 +175,7 @@ const SplashRoot = ({ ) if (updatedUserChallenge) { dispatch(updateUserChallengeList(updatedUserChallenge)) - dispatch(toogleChallengeActionNotification(true)) + dispatch(toggleChallengeActionNotification(true)) } } const filteredCurrentDuelChallenge = userChallengeList.filter( @@ -199,7 +199,7 @@ const SplashRoot = ({ updatedUserChallenge, dataloads ) - dispatch(toogleChallengeDuelNotification(isDone)) + dispatch(toggleChallengeDuelNotification(isDone)) } } } diff --git a/src/locales/fr.json b/src/locales/fr.json index 25a26f896c6d5ed655dda5a9c40bb4d7bf9f6672..f787dee09e9a67bd9c9708fffc52f3aa6e42e719 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -124,7 +124,7 @@ }, "no_account": { "title": "Pas de compte GRDF ?", - "text": "Vous pouvez le créer en vous munissant d'une facture de gaz." + "text": "Pas de panique, vous pouvez le créer facilement en cliquant également sur le bouton jaune ci-dessus. N'oubliez pas de vous munir d'une facture de gaz." }, "create_account": "Je crée mon compte GRDF", "authModal": { @@ -342,7 +342,7 @@ "title_faq": "Foire aux questions", "read_faq": "Lire la FAQ", "accessibility": { - "button_toogle_detail": "Afficher ou masquer le détail de la question" + "button_toggle_detail": "Afficher ou masquer le détail de la question" } }, "feedback": { @@ -399,9 +399,9 @@ "label_connect_to_water": "Se connecter à l'eau", "label_connect_to_gas": "Se connecter au gaz", "accessibility": { - "button_toogle_detail_electricity": "Afficher ou masquer le détail de la connexion a l'électricité", - "button_toogle_detail_water": "Afficher ou masquer le détail de la connexion à l'eau", - "button_toogle_detail_gas": "Afficher ou masquer le détail de la connexion au gaz" + "button_toggle_detail_electricity": "Afficher ou masquer le détail de la connexion a l'électricité", + "button_toggle_detail_water": "Afficher ou masquer le détail de la connexion à l'eau", + "button_toggle_detail_gas": "Afficher ou masquer le détail de la connexion au gaz" } }, "konnector_modal": { @@ -640,7 +640,7 @@ "button_next": "Aller à la section suivante", "button_previous": "Retour à la section précédente", "button_update_profile": "Ouvrir la page de mise à jour du profil", - "button_toogle_detail_profile": "Afficher ou masquer le détail du profil", + "button_toggle_detail_profile": "Afficher ou masquer le détail du profil", "button_validate": "Valider" } }, diff --git a/src/store/global/global.action.spec.ts b/src/store/global/global.action.spec.ts index b374527590ebff484375efccd5fa59390696c19c..1695a6e0ca852ac3840304c2144e4bcc20d8373f 100644 --- a/src/store/global/global.action.spec.ts +++ b/src/store/global/global.action.spec.ts @@ -2,16 +2,16 @@ import { ScreenType } from 'enum/screen.enum' import { mockInitialGlobalState } from '../../../tests/__mocks__/store' import { CHANGE_SCREEN_TYPE, - TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, - TOOGLE_CHALLENGE_ACTION_NOTIFICATION, - TOOGLE_CHALLENGE_DUEL_NOTIFICATION, - TOOGLE_ANALYSIS_NOTIFICATION, + TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + TOGGLE_CHALLENGE_ACTION_NOTIFICATION, + TOGGLE_CHALLENGE_DUEL_NOTIFICATION, + TOGGLE_ANALYSIS_NOTIFICATION, SET_FLUID_STATUS, changeScreenType, - toogleChallengeExplorationNotification, - toogleChallengeActionNotification, - toogleChallengeDuelNotification, - toogleAnalysisNotification, + toggleChallengeExplorationNotification, + toggleChallengeActionNotification, + toggleChallengeDuelNotification, + toggleAnalysisNotification, setFluidStatus, } from './global.actions' @@ -25,46 +25,46 @@ describe('global actions', () => { expect(changeScreenType(screenType)).toEqual(expectedAction) }) - it('should create an action to toogle challenge exploration notification', () => { + it('should create an action to toggle challenge exploration notification', () => { const notification = true const expectedAction = { - type: TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + type: TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, payload: notification, } - expect(toogleChallengeExplorationNotification(notification)).toEqual( + expect(toggleChallengeExplorationNotification(notification)).toEqual( expectedAction ) }) - it('should create an action to toogle challenge action notification', () => { + it('should create an action to toggle challenge action notification', () => { const notification = true const expectedAction = { - type: TOOGLE_CHALLENGE_ACTION_NOTIFICATION, + type: TOGGLE_CHALLENGE_ACTION_NOTIFICATION, payload: notification, } - expect(toogleChallengeActionNotification(notification)).toEqual( + expect(toggleChallengeActionNotification(notification)).toEqual( expectedAction ) }) - it('should create an action to toogle challenge duel notification', () => { + it('should create an action to toggle challenge duel notification', () => { const notification = true const expectedAction = { - type: TOOGLE_CHALLENGE_DUEL_NOTIFICATION, + type: TOGGLE_CHALLENGE_DUEL_NOTIFICATION, payload: notification, } - expect(toogleChallengeDuelNotification(notification)).toEqual( + expect(toggleChallengeDuelNotification(notification)).toEqual( expectedAction ) }) - it('should create an action to toogle analysis notification', () => { + it('should create an action to toggle analysis notification', () => { const notification = true const expectedAction = { - type: TOOGLE_ANALYSIS_NOTIFICATION, + type: TOGGLE_ANALYSIS_NOTIFICATION, payload: notification, } - expect(toogleAnalysisNotification(notification)).toEqual(expectedAction) + expect(toggleAnalysisNotification(notification)).toEqual(expectedAction) }) it('should create an action to set fluid status', () => { diff --git a/src/store/global/global.actions.ts b/src/store/global/global.actions.ts index 2e3d82c40657a68321d231c6d77b0d8bcb5721dd..b32740abf6ca9519c60fb9a372f15260c0882416 100644 --- a/src/store/global/global.actions.ts +++ b/src/store/global/global.actions.ts @@ -3,13 +3,13 @@ import { ScreenType } from 'enum/screen.enum' import { FluidConnection, FluidStatus } from 'models' export const CHANGE_SCREEN_TYPE = 'CHANGE_SCREEN_TYPE' -export const TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION = - 'TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION' -export const TOOGLE_CHALLENGE_ACTION_NOTIFICATION = - 'TOOGLE_CHALLENGE_ACTION_NOTIFICATION' -export const TOOGLE_CHALLENGE_DUEL_NOTIFICATION = - 'TOOGLE_CHALLENGE_DUEL_NOTIFICATION' -export const TOOGLE_ANALYSIS_NOTIFICATION = 'TOOGLE_ANALYSIS_NOTIFICATION' +export const TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION = + 'TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION' +export const TOGGLE_CHALLENGE_ACTION_NOTIFICATION = + 'TOGGLE_CHALLENGE_ACTION_NOTIFICATION' +export const TOGGLE_CHALLENGE_DUEL_NOTIFICATION = + 'TOGGLE_CHALLENGE_DUEL_NOTIFICATION' +export const TOGGLE_ANALYSIS_NOTIFICATION = 'TOGGLE_ANALYSIS_NOTIFICATION' export const SET_FLUID_STATUS = 'SET_FLUID_STATUS' export const UPDATE_FLUID_CONNECTION = 'UPDATE_FLUID_CONNECTION' @@ -19,22 +19,22 @@ interface ChangeScreenType { } interface ToogleChallengeExplorationNotification { - type: typeof TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION + type: typeof TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION payload?: boolean } interface ToogleChallengeActionNotification { - type: typeof TOOGLE_CHALLENGE_ACTION_NOTIFICATION + type: typeof TOGGLE_CHALLENGE_ACTION_NOTIFICATION payload?: boolean } interface ToogleChallengeDuelNotification { - type: typeof TOOGLE_CHALLENGE_DUEL_NOTIFICATION + type: typeof TOGGLE_CHALLENGE_DUEL_NOTIFICATION payload?: boolean } interface ToogleAnalysisNotification { - type: typeof TOOGLE_ANALYSIS_NOTIFICATION + type: typeof TOGGLE_ANALYSIS_NOTIFICATION payload?: boolean } @@ -64,36 +64,36 @@ export function changeScreenType(screenType: ScreenType): GlobalActionTypes { } } -export function toogleChallengeExplorationNotification( +export function toggleChallengeExplorationNotification( notif: boolean ): GlobalActionTypes { return { - type: TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + type: TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, payload: notif, } } -export function toogleChallengeActionNotification( +export function toggleChallengeActionNotification( notif: boolean ): GlobalActionTypes { return { - type: TOOGLE_CHALLENGE_ACTION_NOTIFICATION, + type: TOGGLE_CHALLENGE_ACTION_NOTIFICATION, payload: notif, } } -export function toogleChallengeDuelNotification( +export function toggleChallengeDuelNotification( notif: boolean ): GlobalActionTypes { return { - type: TOOGLE_CHALLENGE_DUEL_NOTIFICATION, + type: TOGGLE_CHALLENGE_DUEL_NOTIFICATION, payload: notif, } } -export function toogleAnalysisNotification(notif: boolean): GlobalActionTypes { +export function toggleAnalysisNotification(notif: boolean): GlobalActionTypes { return { - type: TOOGLE_ANALYSIS_NOTIFICATION, + type: TOGGLE_ANALYSIS_NOTIFICATION, payload: notif, } } diff --git a/src/store/global/global.reducer.spec.ts b/src/store/global/global.reducer.spec.ts index 40a9bfb06d448c822c6de5e160ec7ca4309c181b..6e4eb48be0926451f4b69feb1be0954186038fc1 100644 --- a/src/store/global/global.reducer.spec.ts +++ b/src/store/global/global.reducer.spec.ts @@ -1,10 +1,10 @@ import { globalReducer } from './global.reducer' import { CHANGE_SCREEN_TYPE, - TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, - TOOGLE_CHALLENGE_ACTION_NOTIFICATION, - TOOGLE_CHALLENGE_DUEL_NOTIFICATION, - TOOGLE_ANALYSIS_NOTIFICATION, + TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + TOGGLE_CHALLENGE_ACTION_NOTIFICATION, + TOGGLE_CHALLENGE_DUEL_NOTIFICATION, + TOGGLE_ANALYSIS_NOTIFICATION, SET_FLUID_STATUS, } from './global.actions' import { ScreenType } from 'enum/screen.enum' @@ -53,9 +53,9 @@ describe('global reducer', () => { expect(result).toEqual(mockInitialGlobalState) }) - it('should handle TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION with payload', () => { + it('should handle TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION with payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + type: TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, payload: true, }) expect(result).toEqual({ @@ -64,16 +64,16 @@ describe('global reducer', () => { }) }) - it('should handle TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION without payload', () => { + it('should handle TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION without payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + type: TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, }) expect(result).toEqual(mockInitialGlobalState) }) - it('should handle TOOGLE_CHALLENGE_ACTION_NOTIFICATION with payload', () => { + it('should handle TOGGLE_CHALLENGE_ACTION_NOTIFICATION with payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_CHALLENGE_ACTION_NOTIFICATION, + type: TOGGLE_CHALLENGE_ACTION_NOTIFICATION, payload: true, }) expect(result).toEqual({ @@ -82,16 +82,16 @@ describe('global reducer', () => { }) }) - it('should handle TOOGLE_CHALLENGE_ACTION_NOTIFICATION without payload', () => { + it('should handle TOGGLE_CHALLENGE_ACTION_NOTIFICATION without payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_CHALLENGE_ACTION_NOTIFICATION, + type: TOGGLE_CHALLENGE_ACTION_NOTIFICATION, }) expect(result).toEqual(mockInitialGlobalState) }) - it('should handle TOOGLE_CHALLENGE_DUEL_NOTIFICATION with payload', () => { + it('should handle TOGGLE_CHALLENGE_DUEL_NOTIFICATION with payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_CHALLENGE_DUEL_NOTIFICATION, + type: TOGGLE_CHALLENGE_DUEL_NOTIFICATION, payload: true, }) expect(result).toEqual({ @@ -100,16 +100,16 @@ describe('global reducer', () => { }) }) - it('should handle TOOGLE_CHALLENGE_DUEL_NOTIFICATION without payload', () => { + it('should handle TOGGLE_CHALLENGE_DUEL_NOTIFICATION without payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_CHALLENGE_DUEL_NOTIFICATION, + type: TOGGLE_CHALLENGE_DUEL_NOTIFICATION, }) expect(result).toEqual(mockInitialGlobalState) }) - it('should handle TOOGLE_ANALYSIS_NOTIFICATION with payload', () => { + it('should handle TOGGLE_ANALYSIS_NOTIFICATION with payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_ANALYSIS_NOTIFICATION, + type: TOGGLE_ANALYSIS_NOTIFICATION, payload: true, }) expect(result).toEqual({ @@ -118,9 +118,9 @@ describe('global reducer', () => { }) }) - it('should handle TOOGLE_ANALYSIS_NOTIFICATION without payload', () => { + it('should handle TOGGLE_ANALYSIS_NOTIFICATION without payload', () => { const result = globalReducer(mockInitialGlobalState, { - type: TOOGLE_ANALYSIS_NOTIFICATION, + type: TOGGLE_ANALYSIS_NOTIFICATION, }) expect(result).toEqual(mockInitialGlobalState) }) diff --git a/src/store/global/global.reducer.ts b/src/store/global/global.reducer.ts index ce4c3f740322c93f59a9e77eec98e1a2cd80f0fb..3cd6ec45e78c58bb30621063370abc41f917abe1 100644 --- a/src/store/global/global.reducer.ts +++ b/src/store/global/global.reducer.ts @@ -1,10 +1,10 @@ import { Reducer } from 'redux' import { CHANGE_SCREEN_TYPE, - TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION, - TOOGLE_CHALLENGE_ACTION_NOTIFICATION, - TOOGLE_CHALLENGE_DUEL_NOTIFICATION, - TOOGLE_ANALYSIS_NOTIFICATION, + TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION, + TOGGLE_CHALLENGE_ACTION_NOTIFICATION, + TOGGLE_CHALLENGE_DUEL_NOTIFICATION, + TOGGLE_ANALYSIS_NOTIFICATION, SET_FLUID_STATUS, GlobalActionTypes, UPDATE_FLUID_CONNECTION, @@ -109,28 +109,28 @@ export const globalReducer: Reducer<GlobalState> = ( screenType: action.payload, } : state - case TOOGLE_CHALLENGE_EXPLORATION_NOTIFICATION: + case TOGGLE_CHALLENGE_EXPLORATION_NOTIFICATION: return action.payload != undefined ? { ...state, challengeExplorationNotification: action.payload, } : state - case TOOGLE_CHALLENGE_ACTION_NOTIFICATION: + case TOGGLE_CHALLENGE_ACTION_NOTIFICATION: return action.payload != undefined ? { ...state, challengeActionNotification: action.payload, } : state - case TOOGLE_CHALLENGE_DUEL_NOTIFICATION: + case TOGGLE_CHALLENGE_DUEL_NOTIFICATION: return action.payload != undefined ? { ...state, challengeDuelNotification: action.payload, } : state - case TOOGLE_ANALYSIS_NOTIFICATION: + case TOGGLE_ANALYSIS_NOTIFICATION: return action.payload != undefined ? { ...state,