fix: satisfy attendance workflow lint
Some checks failed
CI / check (pull_request) Failing after 3m33s
Some checks failed
CI / check (pull_request) Failing after 3m33s
This commit is contained in:
@@ -103,11 +103,6 @@ describe('attendance workflow integration', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('imports students, builds a teacher class schedule, refreshes punches, and scopes reads', async () => {
|
it('imports students, builds a teacher class schedule, refreshes punches, and scopes reads', async () => {
|
||||||
let classId: number;
|
|
||||||
let scheduleId: number;
|
|
||||||
let studentA: Student;
|
|
||||||
let studentB: Student;
|
|
||||||
|
|
||||||
const roleRepo = app.get<Repository<Role>>(getRepositoryToken(Role));
|
const roleRepo = app.get<Repository<Role>>(getRepositoryToken(Role));
|
||||||
const userRepo = app.get<Repository<User>>(getRepositoryToken(User));
|
const userRepo = app.get<Repository<User>>(getRepositoryToken(User));
|
||||||
const studentRepo = app.get<Repository<Student>>(getRepositoryToken(Student));
|
const studentRepo = app.get<Repository<Student>>(getRepositoryToken(Student));
|
||||||
@@ -168,7 +163,7 @@ describe('attendance workflow integration', () => {
|
|||||||
.expect(201);
|
.expect(201);
|
||||||
expect(importResult.body).toMatchObject({ imported: 2, skipped: 0 });
|
expect(importResult.body).toMatchObject({ imported: 2, skipped: 0 });
|
||||||
|
|
||||||
[studentA, studentB] = await Promise.all([
|
const [studentA, studentB] = await Promise.all([
|
||||||
studentRepo.findOneByOrFail({ phone: '13800000001' }),
|
studentRepo.findOneByOrFail({ phone: '13800000001' }),
|
||||||
studentRepo.findOneByOrFail({ phone: '13800000002' }),
|
studentRepo.findOneByOrFail({ phone: '13800000002' }),
|
||||||
]);
|
]);
|
||||||
@@ -189,7 +184,7 @@ describe('attendance workflow integration', () => {
|
|||||||
endDate: LESSON_DATE,
|
endDate: LESSON_DATE,
|
||||||
})
|
})
|
||||||
.expect(201);
|
.expect(201);
|
||||||
classId = classResult.body.id;
|
const classId = classResult.body.id;
|
||||||
|
|
||||||
await request(app.getHttpServer())
|
await request(app.getHttpServer())
|
||||||
.post(`/api/classes/${classId}/students`)
|
.post(`/api/classes/${classId}/students`)
|
||||||
@@ -227,7 +222,7 @@ describe('attendance workflow integration', () => {
|
|||||||
scheduleType: 'INTERNAL',
|
scheduleType: 'INTERNAL',
|
||||||
})
|
})
|
||||||
.expect(201);
|
.expect(201);
|
||||||
scheduleId = scheduleResult.body.id;
|
const scheduleId = scheduleResult.body.id;
|
||||||
|
|
||||||
const initialPull = await request(app.getHttpServer())
|
const initialPull = await request(app.getHttpServer())
|
||||||
.post(`/api/attendance-lessons/schedules/${scheduleId}/pull`)
|
.post(`/api/attendance-lessons/schedules/${scheduleId}/pull`)
|
||||||
|
|||||||
Reference in New Issue
Block a user