test(ssr): assert bank-account edits persist through the Client wizard save

Locks in the sub-editor → session → save-client! round-trip the earlier blank-address
fix unblocked: edit the seeded account's nickname via the bank-account sub-editor, Accept,
save the client, reopen, walk back to the bank-accounts step, and confirm the new nickname
is shown and the old one is gone (renamed in place, not duplicated). Full e2e suite 72/72.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-26 08:37:47 -07:00
parent 3251b364a1
commit 8114db9988

View File

@@ -124,4 +124,28 @@ test.describe('Client wizard (acceptance)', () => {
await openClientList(page);
await expect(page.locator('#entity-table')).toContainText('Test Client RENAMED');
});
test('a bank-account edit persists through save and is shown on reopen', async ({ page }) => {
// edit the seeded account's nickname via the sub-editor, then save the whole client
await openEditTestClient(page);
await advance(page); await advance(page); await advance(page); // -> bank-accounts
await page.locator('#wizard-form [hx-get*="/bank-account/edit"]').first().click();
await page.waitForTimeout(450);
await page.locator('#wizard-form input[name="bank-account/name"]').fill('Persisted Checking');
await page.locator('#wizard-form button[data-primary]:has-text("Accept")').first().click();
await page.waitForTimeout(450);
await expect(page.locator('#wizard-form')).toContainText('Persisted Checking');
// bank-accounts -> integrations -> cash-flow -> other-settings, then Save
await advance(page); await advance(page); await advance(page);
await expect(page.locator('#wizard-form')).toContainText('Feature Flags');
await page.locator('#wizard-form button[data-primary]').first().click();
await page.waitForTimeout(1200);
// reopen the client and walk back to the bank-accounts step: the new nickname is there,
// and the seeded "Test Checking" name is gone (it was renamed, not duplicated)
await openEditTestClient(page);
await advance(page); await advance(page); await advance(page); // -> bank-accounts
const form = page.locator('#wizard-form');
await expect(form).toContainText('Persisted Checking');
await expect(form).not.toContainText('Test Checking');
});
});