test(18.1-06): taglist and flat reorder unit matrices, partitioned flat smoke and admin specs (task 2)

- TestTaglistFieldValidate: both modes, trim, dedupe, empty, null, wrong shapes,
  customTags false, required; TestTaglistFieldHydrate: stored NULL and bad text as []
- TestReorderFlatNodes: parent 422, duplicate and zero id 422, missing or extra 409,
  no depth or cycle check; TestReorderFlatCompile checks the localized list schema
- TestReorderFlatSmoke/partitioned: flat reorder within one partition on Postgres
- vitest: script markup as text, Backspace, blur, paste, datalist, customTags,
  string mode; flat ArrowUp/ArrowDown and the before/after drop zones
- export_test.go wrappers for the taglist save check, hydration and node check
- check-phase18.1.sh requires the new names in the go, admin and postgres stages
This commit is contained in:
Jakub Zych
2026-10-14 20:38:52 +02:00
parent 0f09586ec0
commit 323b6d684a
8 changed files with 841 additions and 10 deletions

View File

@@ -61,7 +61,10 @@ PG_LAYER="${PG_LAYER:-$ROOT/../vue-paymentgateway-layer}"
# must pass; a name that skips or does not run fails the stage.
# go stage: Docker-free framework suites (-short).
CABANA_SHORT_TESTS=(TestTaglistFieldCompile)
CABANA_SHORT_TESTS=(
TestTaglistFieldCompile TestTaglistFieldValidate TestTaglistFieldHydrate
TestReorderFlatCompile TestReorderFlatNodes
)
# plugins stage: Docker-free suites (-short), per repository and package.
# An empty list means the package is covered by vet and the -short run only.
@@ -72,7 +75,7 @@ PGSTRIPE_ROOT_TESTS=(TestSDKPin)
PGSTRIPE_SUBS_TESTS=()
# postgres stage: testcontainers suites, per repository and package.
PG_CABANA_TESTS=(TestTaglistFieldSmoke)
PG_CABANA_TESTS=(TestTaglistFieldSmoke TestReorderFlatSmoke TestReorderPostgres)
PG_PGSUB_TESTS=(TestSubscriptionsTracer)
PG_PGSTRIPE_ROOT_TESTS=()
PG_PGSTRIPE_SUBS_TESTS=(TestHostSubscriptionFlow)
@@ -80,17 +83,83 @@ PG_PGSTRIPE_SUBS_TESTS=(TestHostSubscriptionFlow)
# admin stage: vitest spec files and full test names (describe + it).
ADMIN_FILES=(
tests/form/TaglistField.test.ts
tests/views/ReorderView.test.ts
)
ADMIN_REQUIRE=(
"TaglistField renders a loaded list as chips and does not re-emit it untouched"
"TaglistField adds the typed tag on Enter and ignores a duplicate or empty text"
"TaglistField adds a tag on typing a comma"
"TaglistField removes a chip through its labelled remove button"
"TaglistField replaces the chips when the value changes from outside"
"TaglistField renders read-only chips without an input or remove buttons"
"TaglistField renders a tag holding markup as text"
"TaglistField splits and joins a string-mode value on its space separator"
"TaglistField joins a string-mode value with a comma by default"
"TaglistField refuses a tag outside the options when customTags is false"
"TaglistField renders the tags joined as text on the preview screen"
"TaglistField coverage renders a tag holding a script element as text and runs nothing"
"TaglistField coverage removes the last chip on Backspace in an empty input, and nothing while text is typed"
"TaglistField coverage adds the draft on blur"
"TaglistField coverage adds every complete tag of a pasted list and keeps the unfinished rest as the draft"
"TaglistField coverage offers the options as datalist suggestions bound to the input, and none without options"
"TaglistField coverage with customTags false ignores a free tag typed with the separator but adds a suggested one"
"TaglistField coverage splits a comma string-mode value, trims and drops duplicates, and emits the joined string"
"TaglistField coverage reads a string as no tags in array mode"
"TaglistField coverage marks the input required and invalid for the form"
"ReorderView flat offers no indent or outdent, ignores ArrowRight, drops a middle drag after the row and sends parent_id null"
"ReorderView flat moves by ArrowUp and ArrowDown on the handles, keeps focus and announces, then sends one save with null parents"
"ReorderView flat maps the top third of a row to before, the bottom third to after and the middle to after on a flat list"
"ReorderView flat maps the inside zone to after, keeps sibling moves and flattens with null parents"
)
ADMIN_REQUIRE=()
# layers stage: test files (must exist and match the test script's glob), TAP
# test names, and the minimum number of passing tests named "subscriptions: ...".
LAYER_FILES=(
tests/subscriptions.test.ts
tests/subscribe.test.ts
tests/subscriptionComponents.test.ts
tests/i18n.test.ts
)
LAYER_REQUIRE=(
'subscriptions: pl and en carry the same pg.subscriptions keys and placeholders'
'subscriptions: every status and interval is labelled and every pg.subscriptions key used in app/ exists'
'subscriptions: subscribe assigns checkout_url once and stays busy'
'subscriptions: a second click while the checkout runs sends no request'
'subscriptions: each refused status maps to its key and enables the button again'
'subscriptions: an answer without an http(s) URL is never followed'
'subscriptions: PgPlans lists the plans with a working PgSubscribeButton per paid plan'
'subscriptions: subscribe without a currency sends none, and a retry after a refusal clears the error'
'subscriptions: PgSubscribeButton and PgManageSubscriptionButton render enabled with their copy and fetch nothing before a click'
'subscriptions: PgPlans renders two plans with exact prices and features, and no subscribe button for a free plan'
'subscriptions: PgPlans keeps the API order, filters by planCodes and falls back to the first price'
'subscriptions: a plan text with markup renders as text'
'subscriptions: PgPlans shows skeleton cards, the load error with Retry, and the empty copy'
'subscriptions: PgMySubscription without a subscription shows the none copy and the plans link'
'subscriptions: an active subscription shows the status, period end, days until renewal, access, Manage and Cancel'
'subscriptions: a scheduled cancel shows the will-cancel notice with the date and no Cancel button'
'subscriptions: a past_due subscription shows the grace notice and the warning tone, without Cancel'
'subscriptions: PgMySubscription shows the login copy on a 401 and the load error with Retry otherwise'
'subscriptions: useSubscription turns the 404 into null and keeps other failures'
'subscriptions: the manage flow assigns portal_url once and maps a 404 to no_billing_account'
'subscriptions: the cancel flow resolves the updated subscription, or null with the mapped error'
'subscriptions: the plans currency prop picks the matching price in any case, and no currency shows the first'
'subscriptions: the confirmed none answer (404 Subscription not found) renders the no-subscription state'
'subscriptions: the cancel button shows only for an active or trialing subscription with no cancel scheduled'
'subscriptions: the manage flow maps 401 to the login key and 502 to the provider key on open and cancel'
'subscriptions: a second cancel while one runs sends nothing, and a cancel after a portal redirect is refused'
'subscriptions: plans GETs /plans and unwraps {data}; a body without a list is empty'
'subscriptions: every route hits its path with its method and body'
'subscriptions: the client never sends a redirect URL, a price, a subscriber or a subscription id'
'subscriptions: hasNoSubscription is a 404 only'
'subscriptions: planPrice picks the currency, else the first price; status and interval keys'
'subscriptions: on the server the composable uses the internal base, forwards the visitor and sends the bearer'
'subscriptions: in the browser the composable uses the public base and the bearer token only'
'subscriptions: without a token from the hook no authorization header is sent'
'subscriptions: a refused request rejects with the fetcher error unchanged on every route'
'subscriptions: usePlans reads GET /plans under the key pg:subscriptions:plans'
)
LAYER_REQUIRE=()
LAYER_PREFIX='subscriptions:'
LAYER_PREFIX_MIN=6
LAYER_PREFIX_MIN=36
usage() {
cat >&2 <<'EOF'