Skip to content

Commit

Permalink
fix(frontend): fix unit tests for referrers
Browse files Browse the repository at this point in the history
  • Loading branch information
pYassine committed Feb 17, 2025
1 parent 81aeab3 commit 045150f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 23 deletions.
Binary file modified packages/backend/src/excel/_templates/export-structure-stats.xlsx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,4 @@ export const UsagersControllerSecurityTests: AppTestHttpClientSecurityTestDef[]
),
}),
},
{
label: `${CONTROLLER}.assignReferrersToAnotherUser`,
query: async (context: AppTestContext) => ({
response: await AppTestHttpClient.post(
"/usagers/check-duplicates-name",
{
context,
body: {
newReferrerId: 1,
usagersRefs: [1, 2],
},
}
),
expectedStatus: expectedResponseStatusBuilder.allowStructureOnly(
context.user,
{
validExpectedResponseStatus: HttpStatus.CREATED,
roles: ["simple", "responsable", "admin"],
validStructureIds: [1],
}
),
}),
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ReactiveFormsModule, FormsModule } from "@angular/forms";
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
import { StoreModule } from "@ngrx/store";
import { _usagerReducer } from "../../../../shared";
import { FullNamePipe } from "../../../shared/pipes";

describe("AssignReferrersComponent", () => {
let component: AssignReferrersComponent;
Expand All @@ -21,6 +22,7 @@ describe("AssignReferrersComponent", () => {
FormsModule,
HttpClientTestingModule,
StoreModule.forRoot({ app: _usagerReducer }),
FullNamePipe,
],
providers: [{ provide: APP_BASE_HREF, useValue: "/" }],
}).compileComponents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
import { StoreModule } from "@ngrx/store";
import { _usagerReducer } from "../../../../shared";
import { USER_STRUCTURE_MOCK } from "../../../../../_common/mocks";
import { FullNamePipe } from "../../../shared/pipes";

describe("AssignReferrersComponent", () => {
let component: AssignReferrersComponent;
Expand All @@ -23,6 +24,7 @@ describe("AssignReferrersComponent", () => {
FormsModule,
HttpClientTestingModule,
StoreModule.forRoot({ app: _usagerReducer }),
FullNamePipe,
],
providers: [{ provide: APP_BASE_HREF, useValue: "/" }],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
Expand Down

0 comments on commit 045150f

Please sign in to comment.