Unskip the listing-create suite, updating tests to current command behavior - #681
Conversation
…havior The suite predated three deliberate behavior changes, so the tests asserted stale contracts rather than catching bugs: - Auto-patch work (name, summary, links, specs) moved off the command's critical path onto the result's backgroundWork promise; tests now await it before asserting those fields. - Only the listed export of the main module gets a spec, so a module defining both Author and AuthorCompany yields one spec, not two. - SearchAndChoose presents candidates as an id-less numbered list and expects option numbers back; the LLM mock now answers with the wanted entry's number, and link assertions compare card names instead of realm-specific ids (the candidate pool spans every readable realm). Two tests stay skipped with reasons in place: they're written against the pre-storefront isolated-view DOM and the retired open-on-stack flow (the create-listing-modal now navigates to code mode with an isolated preview). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Staging Submissions PreviewThis PR's content is pushed to the staging submissions realm: https://realms-staging.stack.cards/submissions/ Changed folders:
Updated at 2026-08-03 04:14:09 UTC for commit |
There was a problem hiding this comment.
Pull request overview
Re-enables the listing create live acceptance suite and updates the tests to match current ListingCreateCommand behavior (notably: async background auto-patch/link work, updated spec-linking semantics, and SearchAndChoose’s numbered-option prompting).
Changes:
- Unskips the
listing createsuite and converts key cases fromskiptotest. - Updates the proxy/LLM mock to handle SearchAndChoose’s numbered candidate list and asserts linked entities by stable names instead of realm-specific ids.
- Awaits
result.backgroundWorkbefore asserting auto-patched/link-populated fields and updates spec assertions to expect only the listed export to be spec’d.
Suppressed comments (1)
tests/live/catalog-app/listing-create.test.gts:345
- This test is now un-skipped, but it never awaits the command’s
backgroundWork. SincelinkSpecsruns in the background andbackgroundWorkusesallSettled(doesn’t throw), the laterlisting.specs.every(...)assertion can pass vacuously whenspecsis still empty, reducing the test’s ability to catch regressions. AwaitbackgroundWorkand assert that specs were actually generated.
test('listing will only create specs with recognised imports from realms it can read from', async function (assert) {
const cardId = mockCatalogURL + 'UnrecognisedImports/example';
const commandService = getService('tool-service');
const command = new ListingCreateCommand(
commandService.commandContext,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Always answer with a JSON selection (empty for candidate types the mock doesn't know) and match the candidate-type marker case-insensitively. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The open-on-stack test asserted navigation the command no longer does — the create-listing-modal owns that flow (code mode with isolated preview) — so it's gone rather than skipped. In its place, cover the supportingCards contract: open cards that aren't instances of the listed type are linked as supportingCards, explicit supportingCardIds are honored verbatim, and a card classified as an example is never duplicated into supportingCards. Assertions read the persisted document's relationships — that's what the command writes; the in-memory instance's linksToMany entries resolve lazily. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
[Claude Code 🤖] Two updates in d423931, following review discussion:
Suite now: 3 pass / 1 skip (the app-listing test, pending the storefront-DOM rewrite) / 0 fail. |
The create command can no longer produce an AppListing — ListingType is card/skill/theme/field/component — so the test exercised a retired creation path (on top of asserting the pre-storefront DOM). The AppListing card class itself remains for existing instances. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Turns the listing-create live suite back on. The suite was skipped wholesale by the host→catalog migration and its tests had drifted behind three deliberate behavior changes — they were asserting stale contracts, not catching bugs:
backgroundWorkpromise on the result (the create-listing-modal awaits it the same way). Tests now await it before asserting those fields.linkSpecsdeliberately specs just the listed export of the main module, so a module defining bothAuthorandAuthorCompanyyields one spec.Two tests remain skipped with reasons in the file: they're written against the pre-storefront isolated-view DOM (
data-test-catalog-listing-embedded-*) and the retired open-on-stack flow — the create-listing-modal now navigates to code mode with an isolated preview after the command runs. They need a rewrite against that flow (same bucket as the browse-suite DOM rewrite).Test plan
listing createsuite locally: 2 pass / 2 skip / 0 failrecognised importstest passes unchanged (guards spec-creation realm boundaries)Part of the Eliminate Skipped Tests in Catalog CI project (CS-11462).
🤖 Generated with Claude Code