Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • build
  • build-dev
  • build-test
  • dev
  • lint/testing-libraby-plugin
  • master
  • renovate/copy-webpack-plugin-13.x
  • renovate/couchdb-3.x
  • renovate/cozy-client-49.x
  • renovate/cozy-device-helper-3.x
  • renovate/cozy-flags-4.x
  • renovate/cozy-harvest-lib-32.x
  • renovate/cozy-harvest-lib-9.x
  • renovate/cozy-realtime-5.x
  • renovate/cozy-scripts-8.x
  • renovate/devdependencies-(non-major)
  • renovate/eslint-9.x
  • renovate/eslint-config-prettier-10.x
  • renovate/eslint-plugin-testing-library-7.x
  • renovate/major-react-monorepo
  • renovate/major-react-router-monorepo
  • renovate/major-typescript-eslint-monorepo
  • renovate/react-19.x
  • renovate/react-dom-19.x
  • renovate/react-inspector-6.x
  • renovate/sass-loader-16.x
  • 0.1.0
  • 0.1.1
  • 0.1.2
  • 0.1.6
  • 0.1.7
  • 1.0.2
  • 1.0.3
  • 1.0.5
  • 1.0.6
  • 1.0.7
  • 1.0.8
  • 1.0.9
  • 1.1.0
  • 1.2.0
  • 1.2.1
  • 1.2.4-beta.1
  • V1.11.0
  • v1.10.0
  • v1.10.1
  • v1.10.2
  • v1.12.0
  • v1.12.1
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.2.3
  • v1.2.4
  • v1.2.4-beta.1
  • v1.3.0
  • v1.4.0
  • v1.4.1
  • v1.4.2
  • v1.4.3
  • v1.4.4
  • v1.5.0
  • v1.5.1
  • v1.6.0
  • v1.6.1
  • v1.6.2
  • v1.6.3
  • v1.6.4
  • v1.6.5
  • v1.7.0
  • v1.7.1
  • v1.7.2
  • v1.7.3
  • v1.7.4
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.3
  • v1.9.0
  • v1.9.1
  • v1.9.2
  • v1.9.3
  • v1.9.4
  • v2.0.0
  • v2.0.1
  • v2.0.2
  • v2.1.0
  • v2.1.1
  • v2.2.0
  • v2.2.1
  • v2.2.2
  • v2.3.0
  • v2.3.1
  • v2.4.0
  • v2.5.0
  • v2.5.1
  • v2.6.0
  • v2.7.0
  • v2.7.1
  • v2.7.2
  • v2.8.0
  • v3.0.0
  • v3.1.0
  • v3.1.1
103 results

Target

Select target project
  • web-et-numerique/factory/llle_project/ecolyo
1 result
Select Git revision
  • build
  • build-dev
  • build-test
  • dev
  • lint/testing-libraby-plugin
  • master
  • renovate/copy-webpack-plugin-13.x
  • renovate/couchdb-3.x
  • renovate/cozy-client-49.x
  • renovate/cozy-device-helper-3.x
  • renovate/cozy-flags-4.x
  • renovate/cozy-harvest-lib-32.x
  • renovate/cozy-harvest-lib-9.x
  • renovate/cozy-realtime-5.x
  • renovate/cozy-scripts-8.x
  • renovate/devdependencies-(non-major)
  • renovate/eslint-9.x
  • renovate/eslint-config-prettier-10.x
  • renovate/eslint-plugin-testing-library-7.x
  • renovate/major-react-monorepo
  • renovate/major-react-router-monorepo
  • renovate/major-typescript-eslint-monorepo
  • renovate/react-19.x
  • renovate/react-dom-19.x
  • renovate/react-inspector-6.x
  • renovate/sass-loader-16.x
  • 0.1.0
  • 0.1.1
  • 0.1.2
  • 0.1.6
  • 0.1.7
  • 1.0.2
  • 1.0.3
  • 1.0.5
  • 1.0.6
  • 1.0.7
  • 1.0.8
  • 1.0.9
  • 1.1.0
  • 1.2.0
  • 1.2.1
  • 1.2.4-beta.1
  • V1.11.0
  • v1.10.0
  • v1.10.1
  • v1.10.2
  • v1.12.0
  • v1.12.1
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.2.3
  • v1.2.4
  • v1.2.4-beta.1
  • v1.3.0
  • v1.4.0
  • v1.4.1
  • v1.4.2
  • v1.4.3
  • v1.4.4
  • v1.5.0
  • v1.5.1
  • v1.6.0
  • v1.6.1
  • v1.6.2
  • v1.6.3
  • v1.6.4
  • v1.6.5
  • v1.7.0
  • v1.7.1
  • v1.7.2
  • v1.7.3
  • v1.7.4
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.3
  • v1.9.0
  • v1.9.1
  • v1.9.2
  • v1.9.3
  • v1.9.4
  • v2.0.0
  • v2.0.1
  • v2.0.2
  • v2.1.0
  • v2.1.1
  • v2.2.0
  • v2.2.1
  • v2.2.2
  • v2.3.0
  • v2.3.1
  • v2.4.0
  • v2.5.0
  • v2.5.1
  • v2.6.0
  • v2.7.0
  • v2.7.1
  • v2.7.2
  • v2.8.0
  • v3.0.0
  • v3.1.0
  • v3.1.1
103 results
Show changes
Commits on Source (5)
Showing
with 56 additions and 85 deletions
......@@ -28,6 +28,7 @@ module.exports = {
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
// JSDOC extends overrides: disable some of extends rules
// JSdoc is not always needed
......
......@@ -46,9 +46,8 @@ const ChallengeCardUnlocked = ({
const launchChallenge = useCallback(async () => {
if (fluidTypes.length > 0 && statusRequirementOk) {
const challengeService = new ChallengeService(client)
const updatedChallenge = await challengeService.startUserChallenge(
userChallenge
)
const updatedChallenge =
await challengeService.startUserChallenge(userChallenge)
await UsageEventService.addEvent(client, {
type: UsageEventType.CHALLENGE_LAUNCH_EVENT,
target: userChallenge.id,
......
......@@ -34,9 +34,8 @@ const DuelUnlocked = ({ userChallenge }: { userChallenge: UserChallenge }) => {
userChallenge,
UserChallengeUpdateFlag.DUEL_START
)
const dataloads = await challengeService.getUserChallengeDataload(
updatedChallenge
)
const dataloads =
await challengeService.getUserChallengeDataload(updatedChallenge)
await UsageEventService.addEvent(client, {
type: UsageEventType.DUEL_LAUNCH_EVENT,
target: userChallenge.duel.id,
......
......@@ -144,9 +144,8 @@ const EcogestureTabsView = () => {
dispatch(updateProfile({ ecogestureHash }))
}
const availableList = await ecogestureService.getEcogestureListByProfile(
profileEcogesture
)
const availableList =
await ecogestureService.getEcogestureListByProfile(profileEcogesture)
const filteredList = availableList.filter(
ecogesture => ecogesture.viewedInSelection === false
)
......
......@@ -233,9 +233,8 @@ const KonnectorViewerCard = ({
)
}
// const partnersInfo = await partnersInfoService.getPartnersInfo()
const updatedFluidStatus = await fluidService.getFluidStatus(
partnersInfo
)
const updatedFluidStatus =
await fluidService.getFluidStatus(partnersInfo)
dispatch(setFluidStatus(updatedFluidStatus))
}
......
......@@ -56,9 +56,8 @@ const ProfileTypeFinished = ({ profileType }: { profileType: ProfileType }) => {
const myProfileTypes: ProfileType[] | null =
await profileTypeEntityService.getAllProfileTypes(chosenPeriod)
if (myProfileTypes !== null) {
const destroyPT = await profileTypeEntityService.deleteProfileTypes(
myProfileTypes
)
const destroyPT =
await profileTypeEntityService.deleteProfileTypes(myProfileTypes)
if (destroyPT) {
await createNewProfileType(client, consistentProfileType)
setIsSaved(true)
......
......@@ -98,9 +98,8 @@ const SplashRoot = ({ fadeTimer = 1000, children }: SplashRootProps) => {
async (profile: Profile, partnersInfo: PartnersInfo) => {
if (partnersInfo.notification_activated && !profile?.isFirstConnection) {
const fluidService = new FluidService(client)
const _updatedFluidStatus = await fluidService.getFluidStatus(
partnersInfo
)
const _updatedFluidStatus =
await fluidService.getFluidStatus(partnersInfo)
dispatch(setFluidStatus(_updatedFluidStatus))
}
},
......@@ -163,9 +162,8 @@ const SplashRoot = ({ fadeTimer = 1000, children }: SplashRootProps) => {
const loadProfileType = useCallback(
async (profileType: ProfileType) => {
const profileTypeEntityService = new ProfileTypeEntityService(client)
const updatedProfileType = await profileTypeEntityService.saveProfileType(
profileType
)
const updatedProfileType =
await profileTypeEntityService.saveProfileType(profileType)
if (updatedProfileType) {
dispatch(setProfileType(updatedProfileType))
}
......
......@@ -10,9 +10,7 @@ import { triggersEnedisData } from 'tests/__mocks__/triggersData.mock'
import AccountService from './account.service'
jest.mock('cozy-harvest-lib/dist/connections/accounts')
const mockHavestLibAccounts = harvestLibAccounts as jest.Mocked<
typeof harvestLibAccounts
>
const mockHavestLibAccounts = harvestLibAccounts
const mockGetTriggerForAccount = jest.fn()
jest.mock('./triggers.service', () => {
......
......@@ -58,9 +58,8 @@ export default class ActionService {
*/
public async getDefaultActions(): Promise<Ecogesture[]> {
const actionIds = ['ECOGESTURE0030', 'ECOGESTURE0014', 'ECOGESTURE0010']
const defaultActions = await this._ecogestureService.getEcogesturesByIds(
actionIds
)
const defaultActions =
await this._ecogestureService.getEcogesturesByIds(actionIds)
return defaultActions
}
......
......@@ -174,9 +174,8 @@ describe('Challenge service', () => {
mockGetUserExplorationFromExplorationEntities.mockReturnValue(
userExploration
)
const result = await challengeService.buildUserChallengeList(
fluidStatusData
)
const result =
await challengeService.buildUserChallengeList(fluidStatusData)
expect(result).toEqual(userChallengeData)
})
it('should return all user challenge plus create one missing', async () => {
......@@ -191,9 +190,8 @@ describe('Challenge service', () => {
mockClient.query.mockResolvedValueOnce(mockQueryResultQuiz)
mockClient.query.mockResolvedValueOnce(mockQueryResultExploration)
mockClient.query.mockResolvedValueOnce(mockQueryResultUser)
const result = await challengeService.buildUserChallengeList(
fluidStatusData
)
const result =
await challengeService.buildUserChallengeList(fluidStatusData)
expect(result).toEqual(userChallengeData)
})
it('should create all user challenge', async () => {
......@@ -214,9 +212,8 @@ describe('Challenge service', () => {
mockGetUserExplorationFromExplorationEntities.mockReturnValue(
explorationDefault
)
const result = await challengeService.buildUserChallengeList(
fluidStatusData
)
const result =
await challengeService.buildUserChallengeList(fluidStatusData)
expect(result).toEqual(userChallengeDefault)
})
})
......@@ -396,9 +393,8 @@ describe('Challenge service', () => {
},
}
mockGetGraphData.mockResolvedValueOnce(graphData)
const result = await challengeService.getUserChallengeDataload(
updatedUserChallenge
)
const result =
await challengeService.getUserChallengeDataload(updatedUserChallenge)
expect(result).toEqual(graphData.actualData)
})
it('should return a empty dataload list when duel has no start date', async () => {
......
......@@ -330,9 +330,8 @@ export default class ChallengeService {
const {
data: challengeEntityList,
included: duelEntities,
}: QueryResult<ChallengeEntity[], DuelEntity[]> = await this._client.query(
queryChallengeEntity
)
}: QueryResult<ChallengeEntity[], DuelEntity[]> =
await this._client.query(queryChallengeEntity)
const {
included: explorationEntities,
}: QueryResult<ChallengeEntity[], ExplorationEntity[]> =
......
......@@ -30,9 +30,8 @@ export default class ConnectionService {
): Promise<{ account: Account; trigger: Trigger }> {
// Retrieve konnector
const konnectorService = new KonnectorService(this._client)
const konnector: Konnector | null = await konnectorService.getKonnector(
konnectorId
)
const konnector: Konnector | null =
await konnectorService.getKonnector(konnectorId)
if (!konnector?.slug) {
const errorMessage = `Could not find konnector for ${konnectorId}`
logStack('error', errorMessage)
......
......@@ -425,9 +425,8 @@ describe('Consumption service', () => {
mockGetFirstDateData.mockResolvedValueOnce(
DateTime.fromISO('2020-09-03T23:59:59.999Z')
)
const result = await consumptionDataManager.fetchAllFirstDateData(
fluidTypes
)
const result =
await consumptionDataManager.fetchAllFirstDateData(fluidTypes)
expect(result).toEqual(expectedResult)
})
it('should return the latest date data of All fluid', async () => {
......@@ -450,9 +449,8 @@ describe('Consumption service', () => {
DateTime.fromISO('2020-09-03T23:59:59.999Z'),
DateTime.fromISO('2020-09-01T23:59:59.999Z'),
]
const result = await consumptionDataManager.fetchAllFirstDateData(
fluidTypes
)
const result =
await consumptionDataManager.fetchAllFirstDateData(fluidTypes)
expect(result).toEqual(expectedResult)
})
})
......@@ -464,9 +462,8 @@ describe('Consumption service', () => {
mockGetLastDateData.mockResolvedValueOnce(
DateTime.fromISO('2020-09-03T23:59:59.999Z')
)
const result = await consumptionDataManager.fetchAllLastDateData(
fluidTypes
)
const result =
await consumptionDataManager.fetchAllLastDateData(fluidTypes)
expect(result).toEqual(expectedResult)
})
it('should return the latest date data of All fluid', async () => {
......@@ -489,9 +486,8 @@ describe('Consumption service', () => {
DateTime.fromISO('2020-09-03T23:59:59.999Z'),
DateTime.fromISO('2020-09-01T23:59:59.999Z'),
]
const result = await consumptionDataManager.fetchAllLastDateData(
fluidTypes
)
const result =
await consumptionDataManager.fetchAllLastDateData(fluidTypes)
expect(result).toEqual(expectedResult)
})
})
......
......@@ -285,7 +285,7 @@ describe('Ecogesture service', () => {
jest
.spyOn(ecogestureService, 'getAllEcogestures')
.mockResolvedValueOnce(ecoData)
.mockResolvedValueOnce(mockedEcogesturesData as Ecogesture[])
.mockResolvedValueOnce(mockedEcogesturesData)
jest
.spyOn(ecogestureService, 'deleteAllEcogestures')
.mockResolvedValue(true)
......
......@@ -31,9 +31,8 @@ export default class EnedisMonthlyAnalysisDataService {
const query: QueryDefinition = Q(ENEDIS_MONTHLY_ANALYSIS_DATA_DOCTYPE)
const {
data: enedisMonthlyAnalysisData,
}: QueryResult<EnedisMonthlyAnalysisData[]> = await this._client.query(
query
)
}: QueryResult<EnedisMonthlyAnalysisData[]> =
await this._client.query(query)
return enedisMonthlyAnalysisData
}
......
......@@ -43,9 +43,8 @@ describe('Exploration service', () => {
}
const explorationId = 'EXPLORATION001'
mockClient.query.mockResolvedValueOnce(mockQueryResult)
const result = await explorationService.getExplorationEntityById(
explorationId
)
const result =
await explorationService.getExplorationEntityById(explorationId)
expect(result).toEqual(explorationEntity)
})
})
......
......@@ -560,9 +560,7 @@ describe('Fluid service', () => {
},
},
]
const result: FluidType[] = await FluidService.getOldFluidData(
mockFluidStatus
)
const result = await FluidService.getOldFluidData(mockFluidStatus)
expect(result).toEqual([FluidType.ELECTRICITY])
})
......@@ -595,9 +593,7 @@ describe('Fluid service', () => {
},
},
]
const result: FluidType[] = await FluidService.getOldFluidData(
mockFluidStatus
)
const result = await FluidService.getOldFluidData(mockFluidStatus)
expect(result).toEqual([])
})
......@@ -630,9 +626,8 @@ describe('Fluid service', () => {
},
},
]
const result: FluidType[] = await FluidService.getOldFluidData(
mockFluidStatus
)
const result: FluidType[] =
await FluidService.getOldFluidData(mockFluidStatus)
expect(result).toEqual([])
})
......@@ -665,9 +660,8 @@ describe('Fluid service', () => {
},
},
]
const result: FluidType[] = await FluidService.getOldFluidData(
mockFluidStatus
)
const result: FluidType[] =
await FluidService.getOldFluidData(mockFluidStatus)
expect(result).toEqual([])
})
......
......@@ -585,9 +585,8 @@ export default class InitializationService {
const startTime = performance.now()
const challengeService = new ChallengeService(this._client)
try {
const userChallengeList = await challengeService.buildUserChallengeList(
fluidStatus
)
const userChallengeList =
await challengeService.buildUserChallengeList(fluidStatus)
if (userChallengeList) {
logDuration('[Initialization] initUserChallenges', startTime)
return userChallengeList
......
......@@ -373,9 +373,8 @@ export default class ProfileTypeService {
warmingFluid !== null &&
(fluidType as number) === (warmingFluid as number)
) {
detailsMonthlyForecast.heatingConsumption = await this.getMonthHeating(
month
)
detailsMonthlyForecast.heatingConsumption =
await this.getMonthHeating(month)
}
if (
hotWaterFluid !== null &&
......