test: compare CV sibling preservation against durable readback
MariaDB persistence qualification / mariadb (push) Failing after 7s
MariaDB persistence qualification / mariadb (push) Failing after 7s
This commit is contained in:
@@ -98,7 +98,13 @@ for (const [mode, language, premium] of [['light', 'en', false], ['dark', 'nb',
|
||||
themeId: 'minimal', pageMarginMm: 16, baseFontSizePt: 10, bodyFont: 'Arial, Helvetica, sans-serif', accentColor: '#126b55', language: language === 'nb' ? 'nb-NO' : 'en',
|
||||
sections: [{ key: 'summary' }, { key: 'experience' }, { key: 'education' }, { key: 'skills' }, { key: 'interests', hidden: true }], overrides: {}, customSections: [],
|
||||
} } }); expect(created.status()).toBe(200); const cv = await created.json(); const cvUrl = `${apiUrl}/cv/variants/${cv.id}`;
|
||||
const sibling = await (await page.request.post(`${apiUrl}/cv/variants`, { headers, data: { name: 'Untouched sibling', settings: cv.settings } })).json();
|
||||
const siblingCreated = await page.request.post(`${apiUrl}/cv/variants`, { headers, data: { name: 'Untouched sibling', settings: cv.settings } });
|
||||
expect(siblingCreated.status()).toBe(200);
|
||||
const siblingId = (await siblingCreated.json()).id;
|
||||
// Compare durable state; MariaDB datetime(6) cannot retain the create response's seventh fractional digit.
|
||||
const siblingResponse = await page.request.get(`${apiUrl}/cv/variants/${siblingId}`);
|
||||
expect(siblingResponse.status()).toBe(200);
|
||||
const sibling = await siblingResponse.json();
|
||||
const read = async () => (await page.request.get(cvUrl)).json();
|
||||
const saved = async () => { await expect(page.getByText(t.cvEditorSaved, { exact: true })).toBeVisible(); };
|
||||
await page.setViewportSize({ width: 1440, height: 900 }); await page.goto(`/career/builder/${cv.id}`);
|
||||
|
||||
Reference in New Issue
Block a user