Phase 12 v9: draft opens in Word + Thai word-breaking fix (FR-16)
แก้ตามผลใช้งานจริง 2 ประเด็น: 1. เปิดใน Word ทันที — generate-draft เปลี่ยนจากคืนไฟล์ตรงๆ เป็นเก็บ ชั่วคราวใต้ drafts/ (lifecycle ลบรายวัน, config Minio__DraftRetentionDays) + คืน presigned URL ให้เว็บเปิดผ่าน ms-word:ofe พร้อมลิงก์สำรอง (useVersionOpen.openDocxUrl แยกแกนเปิด docx URL ใช้ร่วมกับ flow v0) 2. ตัดคำไทย — T14 แตก placeholder เป็น [ / ข้อความ / ] โดย run ข้อความ ถือ w:hint="cs" + w:cs เท่านั้น; เดิมเขียนค่าลง run ปีกกาทำให้ Word จัดหน้าไทยผิด — แก้เป็นเขียนที่ run ข้อความยาวสุด + SDT เปล่าสืบทอด rPr จาก sdtPr (ใช้ร่วมทั้ง generate และ generate-draft) - ถอดของที่เลิกใช้: CORS expose Content-Disposition, downloadFile init, useApi.spec · Spec v9 + ADR 0002 Amendment + acceptance-review AC-19 - Tests: backend 84 / web 56 + build; QA reviewer PASS (2 rounds, 10 findings แก้ครบ — รวม bug จริงที่ test ใหม่จับได้: lifecycle Rules null ทำ startup ตั้ง rule ล้มแบบเงียบ) · ค้าง manual บน Word จริง Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
parent
b3c1c667f7
commit
70f71f4c5c
23 changed files with 408 additions and 241 deletions
|
|
@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Hosting;
|
|||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Testcontainers.Minio;
|
||||
using Testcontainers.PostgreSql;
|
||||
using WordVersioning.Api.Data;
|
||||
|
|
@ -152,6 +153,14 @@ public sealed class IntegrationTestFixture : IAsyncLifetime
|
|||
.UseNpgsql(_postgres.GetConnectionString())
|
||||
.Options);
|
||||
|
||||
/// <summary>บริการ storage จริงจาก host ของ API — ใช้ทดสอบกับ MinIO container ตรงๆ (เช่น lifecycle rule)</summary>
|
||||
public WordVersioning.Api.Services.IObjectStorageService CreateStorage() =>
|
||||
_factory.Services.GetRequiredService<WordVersioning.Api.Services.IObjectStorageService>();
|
||||
|
||||
/// <summary>config MinIO ที่ host ใช้จริง (ชื่อ bucket ฯลฯ)</summary>
|
||||
public WordVersioning.Api.Services.MinioOptions MinioConfig =>
|
||||
_factory.Services.GetRequiredService<Microsoft.Extensions.Options.IOptions<WordVersioning.Api.Services.MinioOptions>>().Value;
|
||||
|
||||
/// <summary>user token จริงผ่าน password grant (client word-versioning-web ของ realm test เปิดให้ตอน test เท่านั้น)
|
||||
/// — token มี aud = word-versioning-web จาก audience mapper ของ realm ตามที่ backend validate
|
||||
/// (เลี่ยง PKCE dance ของ production flow — ตัว validate ฝั่ง backend คือตัวเดิมทดสอบเต็มรูปแบบ)</summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue