fix(rd21): retain draft revisions and qualify conflict recovery
This commit is contained in:
@@ -140,7 +140,7 @@ for (const sample of matrix) {
|
||||
test.setTimeout(120_000);
|
||||
const profile = { version: '1', contact: { fullName: 'Åse Kunnskapsbank', headline: 'Canonical source' },
|
||||
jobs: [{ title: 'Engineer', company: 'Dokumentasjon AS', bullets: ['Recorded work, no invented outcomes.'] }], skills: ['C#', 'Norsk'] };
|
||||
expect((await page.request.put(`${apiUrl}/career/profile`, { headers: owner.headers, data: { profile } })).status()).toBe(200);
|
||||
expect((await page.request.put(`${apiUrl}/career/profile`, { headers: owner.headers, data: { expectedVersion: (await (await page.request.get(`${apiUrl}/career/profile`)).json()).revision, profile } })).status()).toBe(200);
|
||||
const before = await (await page.request.get(`${apiUrl}/career/profile`)).json();
|
||||
const cvs: CvVariant[] = [];
|
||||
for (let i = 0; i < 4; i++) {
|
||||
@@ -229,7 +229,7 @@ for (const failedPath of ['/career/profile', '/profile-cv/runs', '/cv/variants']
|
||||
test('[P7-02 PRES-C04 E09] evidence pending/failure/read retry and failed save preserve drafts across section changes, cancellation and actual deletion', async ({ page, owner }, info) => {
|
||||
test.setTimeout(120_000);
|
||||
const sample: Sample = { language: 'en', theme: 'light', width: 390, height: 844 };
|
||||
expect((await page.request.put(`${apiUrl}/career/profile`, { headers: owner.headers, data: {
|
||||
expect((await page.request.put(`${apiUrl}/career/profile`, { headers: owner.headers, data: { expectedVersion: (await (await page.request.get(`${apiUrl}/career/profile`)).json()).revision,
|
||||
profile: { version: '1', contact: { fullName: 'Independent canonical source' }, skills: ['Original source fact'] }, cvText: 'Original raw source',
|
||||
} })).status()).toBe(200);
|
||||
const canonicalBefore = await (await page.request.get(`${apiUrl}/career/profile`)).json();
|
||||
@@ -332,8 +332,8 @@ test('[P7-02 PRES-C01 C02] existing raw source copy and history entry remain rea
|
||||
const sample: Sample = { language: 'en', theme: 'light', width: 1440, height: 900 };
|
||||
const profile = { version: '1', contact: { fullName: 'Canonical source' }, skills: ['Recorded skill'] };
|
||||
const raw = 'Exact raw source — æøå\nA supported owner claim.\n';
|
||||
expect((await page.request.put(`${apiUrl}/career/profile`, { headers: owner.headers, data: { profile: { ...profile, skills: ['Recorded skill', 'Recorded later skill'] }, cvText: raw } })).status()).toBe(200);
|
||||
expect((await page.request.put(`${apiUrl}/career/profile`, { headers: owner.headers, data: { profile, cvText: raw } })).status()).toBe(200);
|
||||
expect((await page.request.put(`${apiUrl}/career/profile`, { headers: owner.headers, data: { expectedVersion: (await (await page.request.get(`${apiUrl}/career/profile`)).json()).revision, profile: { ...profile, skills: ['Recorded skill', 'Recorded later skill'] }, cvText: raw } })).status()).toBe(200);
|
||||
expect((await page.request.put(`${apiUrl}/career/profile`, { headers: owner.headers, data: { expectedVersion: (await (await page.request.get(`${apiUrl}/career/profile`)).json()).revision, profile, cvText: raw } })).status()).toBe(200);
|
||||
const before = await (await page.request.get(`${apiUrl}/career/profile`)).json();
|
||||
const history = await (await page.request.get(`${apiUrl}/career/profile/versions`)).json();
|
||||
await context.grantPermissions(['clipboard-read', 'clipboard-write']);
|
||||
|
||||
Reference in New Issue
Block a user