feat: initialize ERP base platform (extracted from HMS)
- Stripped 11 business crates (health, ai, dialysis, plugins) - Cleaned AppState, AppConfig, main.rs from business coupling - Reduced migrations from 169 to 53 (base-only) - Removed health_provider trait from erp-core - Removed business integration tests - Removed gateway rate limiting middleware - Base capabilities: auth, RBAC, JWT, config, workflow, message, plugin, audit, crypto, RLS, multi-tenant Cargo check: OK Cargo test: OK
This commit is contained in:
38
apps/web/e2e/flows/appointment-flow.spec.ts
Normal file
38
apps/web/e2e/flows/appointment-flow.spec.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
// apps/web/e2e/flows/appointment-flow.spec.ts
|
||||
import { test, expect } from '../fixtures/auth.fixture';
|
||||
import { AppointmentPage } from '../pages/appointment.page';
|
||||
import { makePatient, makeDoctor, makeSchedule, makeAppointment } from '../fixtures/test-data';
|
||||
|
||||
test.describe('@flow 预约排班链路', () => {
|
||||
const cleanup: Array<() => Promise<void>> = [];
|
||||
|
||||
test.afterEach(async () => {
|
||||
for (const fn of cleanup.reverse()) {
|
||||
await fn().catch(() => {});
|
||||
}
|
||||
cleanup.length = 0;
|
||||
});
|
||||
|
||||
test('创建医生 → 设置排班 → 创建预约 → 查看列表', async ({ api, authenticatedPage: page }) => {
|
||||
const doctor = await api.createDoctor(makeDoctor());
|
||||
cleanup.push(() => api.deleteDoctor(doctor.id, doctor.version));
|
||||
|
||||
const patient = await api.createPatient(makePatient());
|
||||
cleanup.push(() => api.deletePatient(patient.id, patient.version));
|
||||
|
||||
const schedule = await api.createSchedule(makeSchedule(doctor.id));
|
||||
cleanup.push(() => api.deleteSchedule(schedule.id, schedule.version));
|
||||
|
||||
const appointmentPage = new AppointmentPage(page);
|
||||
await appointmentPage.gotoSchedule();
|
||||
|
||||
const appointment = await api.createAppointment(
|
||||
makeAppointment(patient.id, doctor.id, schedule.id),
|
||||
);
|
||||
cleanup.push(() => api.deleteAppointment(appointment.id, appointment.version));
|
||||
|
||||
await appointmentPage.gotoAppointments();
|
||||
const tableText = await page.locator('.ant-table-tbody').textContent();
|
||||
expect(tableText).toBeTruthy();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user