Skip to content
Snippets Groups Projects
Commit 763976d3 authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

Merge branch 'dev' of...

Merge branch 'dev' of https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo into 137-amelioration-design-pour-petits-ecran-de-smart-phone
parents 5b153cef 84188426
Branches
Tags
2 merge requests!440Resolve "Amélioration Design pour "petits" écran de Smart Phone",!435WIP: 1.4.0
...@@ -120,6 +120,7 @@ describe('Action Service', () => { ...@@ -120,6 +120,7 @@ describe('Action Service', () => {
describe('getCustomActions function', () => { describe('getCustomActions function', () => {
it('shoud return filtered and sorted ecogestures and not complete the list', async () => { it('shoud return filtered and sorted ecogestures and not complete the list', async () => {
jest.spyOn(utils, 'getSeason').mockReturnValueOnce(Season.WINTER)
mockgetAllUserChallengeEntities.mockResolvedValueOnce(userChallengeData) mockgetAllUserChallengeEntities.mockResolvedValueOnce(userChallengeData)
mockgetAllEcogestures.mockResolvedValueOnce(AllEcogestureData) mockgetAllEcogestures.mockResolvedValueOnce(AllEcogestureData)
mockgetEcogesturesByIds.mockResolvedValueOnce([ mockgetEcogesturesByIds.mockResolvedValueOnce([
...@@ -130,6 +131,7 @@ describe('Action Service', () => { ...@@ -130,6 +131,7 @@ describe('Action Service', () => {
AllEcogestureData[4], AllEcogestureData[4],
AllEcogestureData[5], AllEcogestureData[5],
]) ])
const result = await actionService.getCustomActions([0, 2]) const result = await actionService.getCustomActions([0, 2])
expect(result).toEqual([ expect(result).toEqual([
AllEcogestureData[0], AllEcogestureData[0],
...@@ -138,6 +140,7 @@ describe('Action Service', () => { ...@@ -138,6 +140,7 @@ describe('Action Service', () => {
]) ])
}) })
it('shoud return filtered and sorted ecogestures and complete the list with default ecogesture', async () => { it('shoud return filtered and sorted ecogestures and complete the list with default ecogesture', async () => {
jest.spyOn(utils, 'getSeason').mockReturnValueOnce(Season.WINTER)
mockgetAllUserChallengeEntities.mockResolvedValueOnce(userChallengeData) mockgetAllUserChallengeEntities.mockResolvedValueOnce(userChallengeData)
mockgetAllEcogestures.mockResolvedValueOnce(AllEcogestureData) mockgetAllEcogestures.mockResolvedValueOnce(AllEcogestureData)
mockgetEcogesturesByIds.mockResolvedValueOnce([ mockgetEcogesturesByIds.mockResolvedValueOnce([
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment