Skip to content

Commit 357c751

Browse files
committed
test(rest): the translated-section row asserts the strip ran over it; the strip control stands alone
Claude-Session: https://claude.ai/code/session_01Q9PZ5Pzqcus4woVvTZwWNU Co-authored-by: Claude <noreply@anthropic.com>
1 parent 980fb8d commit 357c751

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎packages/rest/src/public-form-section-i18n.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ describe('[#23497] GET /forms/:slug — section headings are localized under Acc
150150
it('zh-CN: a named section with a `_sections` key is served its translated label and description', async () => {
151151
const res = await buildServer(formView()).get('zh-CN');
152152
expect(section(res, 0)).toMatchObject({ name: 'about', label: ABOUT_ZH, description: ABOUT_DESC_ZH });
153+
// The translated section is the one the strip ran over: its lookup is gone.
154+
expect(section(res, 0).fields).toEqual(['subject']);
153155
});
154156

155157
it('zh-CN: a named section whose key the bundle lacks keeps its authored label and description', async () => {
@@ -196,9 +198,8 @@ describe('[#23497] GET /forms/:slug — section headings are localized under Acc
196198
expect(en.body.objectSchema.fields.subject.label).toBe('Subject');
197199
});
198200

199-
it('CONTROL: the lookup strip still removes a lookup field from a translated section', async () => {
201+
it('CONTROL: under zh-CN the lookup strip still removes a lookup field from its section', async () => {
200202
const res = await buildServer(formView()).get('zh-CN');
201-
expect(section(res, 0).label).toBe(ABOUT_ZH);
202203
expect(renderedFields(res)).toEqual([['subject'], ['email'], ['status']]);
203204
});
204205

0 commit comments

Comments
 (0)