Skip to content

Commit ab3d3a9

Browse files
committed
test: the receiver meta-test and the metadata-form population pins count the new requiresFeature row
Claude-Session: https://claude.ai/code/session_016WV4cyCnzVPr9GuD38DdGt Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7f20b88 commit ab3d3a9

4 files changed

Lines changed: 19 additions & 8 deletions

File tree

‎packages/lint/src/validate-expressions.test.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4480,6 +4480,11 @@ describe('validateStackExpressions — reads only keys the spec declares (meta-t
44804480
// from the flow's collected names and the root judge's `provable`, and
44814481
// its screen-field name set (Set methods) — never read off metadata.
44824482
'flowBare', 'screenFields',
4483+
// [#30692] A field group predicate's CEL text and the gate suffix a
4484+
// `requiresFeature` lowering appends (`withoutLoweredFeatureGate`).
4485+
// Their keys are String methods, never metadata keys; the predicate is
4486+
// read off the tabled `fieldGroup` receiver.
4487+
'loweredSource', 'loweredTail',
44834488
]);
44844489
expect(receivers.filter((r) => !tabled.has(r) && !PLUMBING.has(r))).toEqual([]);
44854490
});

‎packages/lint/src/validate-expressions.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,14 +1052,14 @@ const FIELD_GROUP_VISIBLE_WHEN_SLOT = 'field group visibleWhen';
10521052
* `a) && (b`) is told apart from the lowering's single parenthesised group.
10531053
*/
10541054
export function withoutLoweredFeatureGate(raw: unknown): unknown {
1055-
const source = celSourceOf(raw);
1056-
if (source === undefined) return raw;
1055+
const loweredSource = celSourceOf(raw);
1056+
if (loweredSource === undefined) return raw;
10571057
for (const flag of PUBLIC_AUTH_FEATURE_NAMES) {
10581058
const gate = featureGatePredicate(flag);
1059-
if (source === gate) return undefined;
1060-
const tail = `) && ${gate}`;
1061-
if (!source.startsWith('(') || !source.endsWith(tail)) continue;
1062-
const authored = source.slice(1, source.length - tail.length);
1059+
if (loweredSource === gate) return undefined;
1060+
const loweredTail = `) && ${gate}`;
1061+
if (!loweredSource.startsWith('(') || !loweredSource.endsWith(loweredTail)) continue;
1062+
const authored = loweredSource.slice(1, loweredSource.length - loweredTail.length);
10631063
if (!collectCelRootIdentifiers(authored).ok) return raw;
10641064
return typeof raw === 'string' ? authored : { ...(raw as AnyRec), source: authored };
10651065
}

‎packages/platform-objects/src/apps/translations/object-collapsed-sections-echo-decisions.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,10 @@ describe('#19403 round 8 — the population, DERIVED from the form and a shape',
978978
// `fieldGroups` repeater its `relatedList` sub-row — four leaves (two
979979
// labels, two help texts), authored in all three locales, so `openEchoes`
980980
// stays at zero.
981-
expect(OPEN_LEAVES.length).toBe(122);
981+
// 124 since #30692 gave the `fieldGroups` repeater its `requiresFeature`
982+
// sub-row (the deployment feature a group needs) — label and help text,
983+
// authored in all three locales, so `openEchoes` stays at zero.
984+
expect(OPEN_LEAVES.length).toBe(124);
982985
expect(PANEL_LEAVES.some((l) => l.path === 'fields.placeholder')).toBe(false);
983986
expect(OPEN_LEAVES.some((l) => l.path === 'fields.placeholder')).toBe(true);
984987
for (const path of ['name', 'label', 'fields', 'fields.valueDomain', 'fields.deleteBehavior', 'fields.expression']) {

‎packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,10 @@ describe('#19403 round 10 — the verdicts, on the live bundles', () => {
12661266
// `selection` / `pagination` / `userFilters` (with the `fields` repeater's
12671267
// six row properties) / `appearance` / `userActions` / `navigation` /
12681268
// `sharing` composites — thirty row labels, authored in all three locales.
1269-
expect(translated.length, `${locale} positive control`).toBe(732);
1269+
// 733 since #30692: the object form's `fieldGroups` repeater offers
1270+
// `requiresFeature` (the deployment feature a group needs) — one row
1271+
// label, authored in all three locales.
1272+
expect(translated.length, `${locale} positive control`).toBe(733);
12701273
}
12711274
// ⭐ DARK — the blindness, executable. On a synthetic two-locale catalog the
12721275
// all-three predicate returns 0 while the per-locale one returns 1, so the

0 commit comments

Comments
 (0)