Closes #449. - SASJS_SERVER_VERSION 3.6.2 -> 3.12.1 in build.yaml. 3.12.0 is the floor: /ddc-host with `timing=early` (the replay that lands before the app bootstraps) arrived there, and it is absent from 3.11.3, which has no /ddc-host at all. - DDC_HOST_ENABLED=true in the job's .env. The server 404s /ddc-host unless it is set - it is a testing tool and does not announce itself - so enabling the spec without this would have failed on the first case. - va-ddc-host moves from EXCLUDED to the END of SPECS in cypress-specs.sh: it clears the DC_JSLIB filter tables before each case, so it must run last on the shared mock estate. The ordering contract at the top of that file now records that, and metanav's licence key, which no longer has to avoid being last itself.
66 lines
3.3 KiB
Bash
Executable File
66 lines
3.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# The Cypress specs CI runs, and the order they run in.
|
|
#
|
|
# ORDER MATTERS. These specs share one mock estate that is seeded once per job,
|
|
# so several of them depend on the state they find:
|
|
#
|
|
# - csv-limited asserts the free-tier "Locked Feature" modal, which an earlier
|
|
# spec can remove by planting a valid licence. It has always run first.
|
|
# - hook-programs asserts that an edit raises an approval row against its
|
|
# target table; it runs early, before other specs have added rows to the
|
|
# approval tables.
|
|
# - metanav only reads the metadata tree, and applies a licence key so it can
|
|
# run on its own; it runs after every spec that asserts a free-tier or
|
|
# unlicensed state (csv-limited first), because that key removes the "Locked
|
|
# Feature" modal. Anything placed after it must not depend on the absence of
|
|
# a licence - va-ddc-host is the one that does, and it asserts nothing about
|
|
# licensing.
|
|
# - va-ddc-host goes last: it clears the DC_JSLIB filter tables
|
|
# (mpe_filtersource, mpe_filteranytable, mpe_maxkeyvalues) before each case,
|
|
# and every spec in this job shares one mock estate, so it has to run after
|
|
# everything that reads or writes them. See resetFilterStore in
|
|
# client/cypress/e2e/va-ddc-host.cy.ts.
|
|
#
|
|
# Specs added later are appended rather than inserted, so the sequence that was
|
|
# known green keeps its shape.
|
|
#
|
|
# download was held out while its selectors were stale - see
|
|
# https://git.datacontroller.io/dc/dc/issues/398. Its first case uploads a fixture
|
|
# to mpe_x_test and submits it, so it creates the approval it downloads instead of
|
|
# depending on what earlier specs leave behind. That approval stays: the CI job
|
|
# deletes the appLoc and re-runs makedata before the specs, so nothing accumulates
|
|
# between runs, but a hand-run against a reused estate leaves one pending row per
|
|
# run. It is appended because a spec added later goes on the end rather than
|
|
# reordering the sequence that was known green.
|
|
set -euo pipefail
|
|
|
|
SPECS="csv-limited hook-programs liveness editor excel-multi-load excel csv filtering filter-panel licensing viewer-labels full-table-search viewbox stage browser-info ddl-export row-cell-limits derived-variables startupservice-launcher coltype-delete-record submitted-details embed-va download metanav va-ddc-host"
|
|
|
|
# Specs that exist but are held out of CI, each with the reason. Listed here so
|
|
# the coverage check below can tell a deliberate exclusion from a forgotten file.
|
|
# Nothing is held out at present.
|
|
EXCLUDED=""
|
|
|
|
case "${1:-}" in
|
|
all)
|
|
# comma separated, the form `cypress run --spec` takes
|
|
for name in $SPECS; do printf 'cypress/e2e/%s.cy.ts,' "$name"; done | sed 's/,$//'
|
|
;;
|
|
coverage)
|
|
on_disk=$(cd "$2/client" && ls cypress/e2e/*.cy.ts | xargs -n1 basename | sed 's/\.cy\.ts$//' | sort)
|
|
listed=$(printf '%s\n' $SPECS $EXCLUDED | sort)
|
|
missing=$(comm -23 <(echo "$on_disk") <(echo "$listed"))
|
|
if [ -n "$missing" ]; then
|
|
echo "Specs that are neither run nor explicitly excluded:"
|
|
echo "$missing"
|
|
echo "Add them to SPECS (or EXCLUDED, with a reason) in .gitea/scripts/cypress-specs.sh"
|
|
exit 1
|
|
fi
|
|
echo "All $(echo "$on_disk" | wc -l) specs are accounted for: $(echo $SPECS | wc -w) run, $(echo $EXCLUDED | wc -w) excluded."
|
|
;;
|
|
*)
|
|
echo "usage: $0 {all|coverage <repo-root>}" >&2
|
|
exit 2
|
|
;;
|
|
esac
|