Back to Consul

Yadda → QUnit acceptance test migration tracker

ui/packages/consul-ui/YADDA_MIGRATION.md

2.0.326.5 KB
Original Source

Yadda → QUnit acceptance test migration tracker

Running tracker for migrating the UI's yadda/Gherkin acceptance tests (tests/acceptance/**/*.feature) to native QUnit acceptance tests.

Goals

  1. Replace yadda/Gherkin acceptance tests with native QUnit acceptance tests, one feature at a time, preserving behaviour and coverage (including the CE/ENT namespace matrix) at every step.
  2. Keep the suite green throughout. Yadda and native QUnit tests compile into the same test bundle and can coexist, so no flag flips or freezes are required — migrate incrementally and opportunistically as features are touched.
  3. Reduce the custom testing surface. Native tests use standard @ember/test-helpers, qunit and assert.dom, which are easier to debug, type-check and onboard onto than the bespoke yadda step DSL.
  4. Reach zero .feature files, then remove the yadda toolchain entirely (see below).

End state: removing yadda (do this only once the table below is 100% migrated)

When no .feature files remain, complete the migration by deleting the yadda toolchain and its supporting infrastructure:

  • Dependency: remove ember-cli-yadda from package.json (line ~141) and update the lockfile. This addon pulls in yadda transitively and is what compiled .feature files into test modules — nothing else should depend on it once features are gone.
  • Runner / gating: delete tests/helpers/yadda-annotations.js (the annotation-driven test generator and namespace matrix — now reproduced by nspaceScenario in the harness).
  • Step DSL: delete tests/steps.js and the entire tests/steps/ tree (doubles/, interactions/, assertions/, debug/) — the request/interaction/assertion vocabulary, now reproduced as plain helpers in the harness.
  • Feature wiring: delete the entire tests/acceptance/steps/ tree (the *-steps.js stubs and steps.js) that bound each .feature to the shared steps.
  • Dictionary: delete tests/dictionary.js (the yadda term converters and @namespace string substitution).
  • Step-listing CLI: delete the lib/commands/ addon (the steps:list ember command in lib/commands/index.js that listed available yadda steps).

Keep (still used by native tests): tests/helpers/api.js and the api-double, tests/pages.js / tests/pages/, tests/lib/page-object/, and tests/helpers/acceptance.js.

Final verification before declaring done:

  • grep -r "yadda" package.json tests lib returns nothing.
  • find tests -name '*.feature' -o -name '*-steps.js' returns nothing.
  • pnpm test (or test:oss for CE) passes with the same scenario/assertion count as before.

How to use this document

When you migrate a feature:

  1. Rewrite the .feature as a -test.js using the harness (copy the reference test).
  2. Wrap each scenario in nspaceScenario(...), carrying over @onlyNamespaceable / @notNamespaceable / @ignore as options so the CE/ENT namespace matrix is preserved.
  3. git rm the .feature and its matching tests/acceptance/steps/**/<name>-steps.js.
  4. Update this table: set Status to ✅ Migrated and fill in the Native test link.

The Description column summarises what each feature verifies so you can reproduce it manually in the running UI if needed.

Status legend: ☐ Not migrated  ·  🔄 In progress  ·  ✅ Migrated  ·  ⏭️ Won't migrate (delete/obsolete)

Summary

MetricCount
Feature files remaining (yadda)117
Scenarios remaining (yadda)277
Feature files migrated12
Scenarios migrated16

Completed

Feature (was)DescriptionScenariosNative test
dc/intentions/create.featureCreate an intention from the intentions form (source/destination, deny action) and assert the PUT payload; namespaces on and off.2tests/acceptance/dc/intentions/create-test.js
components/copy-button.featureCopy-to-clipboard button copies the expected value when clicked. Carried the feature-level @ignore, preserved as a skipped test.1tests/acceptance/components/copy-button-test.js
components/kv-filter.featureFree-text filter on the KV list narrows results by the typed text.1 (2 rows)tests/acceptance/components/kv-filter-test.js
components/text-input.featureText-input component behaves correctly (KV create page enables submit once filled).1tests/acceptance/components/text-input-test.js
settings/show.featureSettings page shows Blocking Queries; CONSUL_UI_DISABLE_REALTIME hides them. @notNamespaceable (CE-only, as before).2tests/acceptance/settings/show-test.js
settings/update.featureSaving settings with no input typed. Carried the feature-level @ignore, preserved as a skipped test.1tests/acceptance/settings/update-test.js
dc/error.featureRecovering from a datacenter 500 error: error status shown, then switching dc via the nav recovers and lists services.1tests/acceptance/dc/error-test.js
dc/forwarding.featureArriving at a dc with only the dc in the URL redirects to its services overview. @notNamespaceable (CE-only, as before).1tests/acceptance/dc/forwarding-test.js
dc/index.featureDatacenters index lands on the services page. Carried the scenario @ignore, preserved as a skipped test.1tests/acceptance/dc/index-test.js
dc/list.featureGeneric model listing pages render (nodes/kv/tokens/policies).1 (4 rows)tests/acceptance/dc/list-test.js
dc/list-blocking.featureListing pages live-update via blocking queries when Consul changes externally. Second scenario carried a FIXME @ignore, preserved as a skipped test.2tests/acceptance/dc/list-blocking-test.js
dc/routing-config.featureView a routing config (no 404, correct title) and its source pill.2tests/acceptance/dc/routing-config-test.js

Remaining features

Feature fileDescriptionScenariosStatusNative test
api-prefix.featureUI honours a configured API path prefix when making requests.1☐ Not migrated
dc/acls/access.featureACLs access page behaviour when ACLs are disabled.1☐ Not migrated
dc/acls/auth-methods/index.featureAuth-methods list renders and is searchable.2☐ Not migrated
dc/acls/auth-methods/navigation.featureNavigate into an auth-method from the list and back.1☐ Not migrated
dc/acls/auth-methods/sorting.featureSorting the auth-methods list.1☐ Not migrated
dc/acls/index.featureACL index page forwards/redirects to the correct sub-page.1☐ Not migrated
dc/acls/policies/as-many/add-existing.featureAttach an existing policy as a child of a token/role.1☐ Not migrated
dc/acls/policies/as-many/add-new.featureAdd a new policy, service identity or node identity to a token/role, incl. error and code-editor cases.6☐ Not migrated
dc/acls/policies/as-many/list.featureList the policies attached to a token/role.1☐ Not migrated
dc/acls/policies/as-many/nspaces.featurePolicy "as many" selector behaviour across namespaces.1☐ Not migrated
dc/acls/policies/as-many/remove.featureRemove attached policies from a token/role.1☐ Not migrated
dc/acls/policies/as-many/reset.featureThe attached-policy sub-form resets correctly.1☐ Not migrated
dc/acls/policies/create.featureCreate an ACL policy; no Namespace sent when namespaces are disabled.3☐ Not migrated
dc/acls/policies/delete.featureDelete a policy from the list and detail pages, incl. error handling.3☐ Not migrated
dc/acls/policies/index.featurePolicies list renders and is searchable; global-management can't be deleted.3☐ Not migrated
dc/acls/policies/navigation.featureNavigate into a policy from the list and back.1☐ Not migrated
dc/acls/policies/sorting.featureSorting the policies list.1☐ Not migrated
dc/acls/policies/update.featureUpdate a policy (name/rules/description); error handling; no Namespace when disabled.3☐ Not migrated
dc/acls/policies/view-management.featureThe built-in management policy is shown read-only.1☐ Not migrated
dc/acls/policies/view-read-only.featureRead-only policy view.1☐ Not migrated
dc/acls/roles/as-many/add-existing.featureAttach an existing role as a child of a token.1☐ Not migrated
dc/acls/roles/as-many/add-new.featureAdd a new role with/without policies and service identities; cancel the form.5☐ Not migrated
dc/acls/roles/as-many/list.featureList the roles attached to a token.1☐ Not migrated
dc/acls/roles/as-many/remove.featureRemove attached roles from a token.1☐ Not migrated
dc/acls/roles/create.featureCreate an ACL role; no Namespace sent when namespaces are disabled.3☐ Not migrated
dc/acls/roles/index.featureRoles list renders and is searchable.2☐ Not migrated
dc/acls/roles/navigation.featureNavigate into a role from the list and back.1☐ Not migrated
dc/acls/roles/sorting.featureSorting the roles list.1☐ Not migrated
dc/acls/roles/update.featureUpdate a role (name/rules/description); error handling; no Namespace when disabled.3☐ Not migrated
dc/acls/tokens/anonymous-no-delete.featureThe anonymous token exposes no delete buttons on list or detail pages.2☐ Not migrated
dc/acls/tokens/clone.featureClone an ACL token from the list and detail pages.2☐ Not migrated
dc/acls/tokens/create.featureCreate an ACL token; no Namespace sent when namespaces are disabled.3☐ Not migrated
dc/acls/tokens/index.featureToken list: view, no-write access, search, and legacy-token message.5☐ Not migrated
dc/acls/tokens/navigation.featureNavigate into a token from the list and back.1☐ Not migrated
dc/acls/tokens/own-no-delete.featureYour currently-used token exposes no delete button.1☐ Not migrated
dc/acls/tokens/sorting.featureSorting the tokens list.1☐ Not migrated
dc/acls/tokens/update.featureUpdate a token (name); error handling; no Namespace when disabled.3☐ Not migrated
dc/acls/tokens/use.featureSwitch to (use) an ACL token from the list and detail pages.2☐ Not migrated
dc/intentions/delete.featureDelete intentions from list/detail incl. error and duplicate-intention error.4☐ Not migrated
dc/intentions/filtered-select.featureService select dropdowns show services but exclude proxy services; handles same-name services in different namespaces.2☐ Not migrated
dc/intentions/form-select.featureType into the autocomplete and select a custom/future service.1☐ Not migrated
dc/intentions/index.featureIntentions list: view, no-write access, live updates, with/without CRDs, empty states.7☐ Not migrated
dc/intentions/navigation.featureNavigate into an intention and to the create form, and back.2☐ Not migrated
dc/intentions/permissions/create.featureCreate an intention with L7 permissions.1☐ Not migrated
dc/intentions/permissions/warn.featureWarning shown when adding permissions to an intention.1☐ Not migrated
dc/intentions/read-only.featureViewing a read-only intention.1☐ Not migrated
dc/intentions/sorting.featureSorting the intentions list.1☐ Not migrated
dc/intentions/update.featureUpdate an intention (description/action); error handling.2☐ Not migrated
dc/kvs/create.featureCreate a root KV and folders, incl. creating from within a folder.4☐ Not migrated
dc/kvs/delete.featureDelete a KV from list/detail incl. error handling.3☐ Not migrated
dc/kvs/edit.featureView a KV: URL-unsafe characters, attached lock session, no-write / no-read access.6☐ Not migrated
dc/kvs/index.featureKV list view incl. no-write access.2☐ Not migrated
dc/kvs/list-order.featureKV keys/folders listed alphabetically.1☐ Not migrated
dc/kvs/sessions/invalidate.featureInvalidate a lock session attached to a KV incl. error.2☐ Not migrated
dc/kvs/trailing-slash.featureKV folder view resolves with and without a trailing slash.2☐ Not migrated
dc/kvs/update.featureUpdate KV values incl. whitespace/empty/newline values and error handling.7☐ Not migrated
dc/nodes/empty-ids.featureNode list handles nodes that arrive with no ID.1☐ Not migrated
dc/nodes/index.featureNodes list: unhealthy node/service checks, synthetic nodes hidden, leader indicator, search, empty state.7☐ Not migrated
dc/nodes/navigation.featureNavigate into a node from the list and back.1☐ Not migrated
dc/nodes/no-leader.featureBehaviour when no leader has been elected.1☐ Not migrated
dc/nodes/services/list.featureNode → Services tab listing.1☐ Not migrated
dc/nodes/sessions/invalidate.featureInvalidate a lock session on a node incl. error.2☐ Not migrated
dc/nodes/sessions/list.featureNode lock-sessions list: string TTLs, nanosecond LockDelay, ACL enabled/disabled empty states.4☐ Not migrated
dc/nodes/show.featureNode detail: tab visibility/selection, deregister warning while blocking, RTT display.5☐ Not migrated
dc/nodes/show/health-checks.featureNode serf health check passing/failing display.2☐ Not migrated
dc/nodes/sorting.featureSorting the nodes list.1☐ Not migrated
dc/nspaces/create.featureCreate a namespace.2☐ Not migrated
dc/nspaces/delete.featureDelete a namespace from list/detail incl. error handling.3☐ Not migrated
dc/nspaces/index.featureNamespaces list and search; the default namespace can't be deleted.3☐ Not migrated
dc/nspaces/manage.featureManaging namespaces.1☐ Not migrated
dc/nspaces/sorting.featureSorting the namespaces list.1☐ Not migrated
dc/nspaces/update.featureUpdate a namespace (description); error handling.2☐ Not migrated
dc/peers/create.featureGenerate a peering token (create peer).1☐ Not migrated
dc/peers/delete.featureDelete a peer incl. error; a peer already deleting can't be deleted again.3☐ Not migrated
dc/peers/establish.featureEstablish peering from a peering token.1☐ Not migrated
dc/peers/index.featurePeers list: view, sort, search, and empty states (ACLs on/off).5☐ Not migrated
dc/peers/regenerate.featureRegenerate a peering token.2☐ Not migrated
dc/peers/show.featurePeer detail tabs: dialer/receiver, imported/exported services (empty & populated), addresses.8☐ Not migrated
dc/services/dc-switch.featureServices list reflects a datacenter switch.1☐ Not migrated
dc/services/error.featureService page error / not-found handling.2☐ Not migrated
dc/services/index.featureServices list: services, gateways, mesh state, associated-service counts, empty states.6☐ Not migrated
dc/services/instances/error.featureMissing service-instance handling.1☐ Not migrated
dc/services/instances/exposed-paths.featureExposed Paths tab shown only when the instance has a proxy.2☐ Not migrated
dc/services/instances/gateway.featureGateway service-instance detail page.1☐ Not migrated
dc/services/instances/health-checks.featureInstance serf checks pass/fail; node health-check visibility on agentless vs non-agentless.4☐ Not migrated
dc/services/instances/navigation.featureNavigate into a service instance from the list and back.1☐ Not migrated
dc/services/instances/show.featureService-instance detail: proxy presence, deregister warning while blocking, synthetic node.4☐ Not migrated
dc/services/instances/upstreams.featureUpstreams tab shown only when the instance has a proxy.2☐ Not migrated
dc/services/list-blocking.featureService listing live-updates via blocking queries.1☐ Not migrated
dc/services/list.featureListing services incl. peered services.2☐ Not migrated
dc/services/navigation.featureNavigate into a (peered) service from the list and back.2☐ Not migrated
dc/services/show-routing.featureRouting tab display; hidden/no error when connect is disabled.2☐ Not migrated
dc/services/show-with-slashes.featureA service with slashes in its name lists and opens correctly.1☐ Not migrated
dc/services/show.featureService detail: external-source logos, tags, instance nodes, dashboard template, access removal.10☐ Not migrated
dc/services/show/dc-switch.featureService detail reflects a datacenter switch.1☐ Not migrated
dc/services/show/intentions/create.featureCreate an intention from a service page (namespaces on/off).2☐ Not migrated
dc/services/show/intentions/index.featurePer-service intentions tab: view and delete.2☐ Not migrated
dc/services/show/navigation.featureAccessing a peered service directly by URL.1☐ Not migrated
dc/services/show/services.featureLinked Services tab visibility and list.3☐ Not migrated
dc/services/show/tags.featureService tags display incl. duplicate tags.2☐ Not migrated
dc/services/show/topology/index.featureTopology tab display; hidden/no error when connect is disabled.2☐ Not migrated
dc/services/show/topology/intentions.featureAllow a connection by saving an intention from topology; error handling.2☐ Not migrated
dc/services/show/topology/metrics.featureTopology metrics with/without a prometheus provider; API Gateway source.3☐ Not migrated
dc/services/show/topology/notices.featureTopology notices: default ACL policy, wildcard intentions, ACL-filtered response, TProxy states.5☐ Not migrated
dc/services/show/topology/routing-config.featureTopology shows source type and redirects to the Routing Config page.2☐ Not migrated
dc/services/show/topology/stats.featureTopology metric stats enabled/disabled incl. ingress-gateway cases.4☐ Not migrated
dc/services/show/upstreams.featureUpstreams tab visibility and list.3☐ Not migrated
dc/services/sorting.featureSorting the services list.1☐ Not migrated
deleting.featureGeneric delete flow: confirmation dialog plus success/error notifications.3☐ Not migrated
index-forwarding.featureIndex page forwards straight through when there is only one datacenter.1☐ Not migrated
login-errors.featureLogin 500-error handling (non-legacy-token case).1☐ Not migrated
login.featureLogging in via an ACL token and via SSO.2☐ Not migrated
navigation-links.featureMain-navigation link visibility (e.g. no KV read access, empty-state login button).2☐ Not migrated
page-navigation.featureNavigation across pages routes correctly and calls the expected API endpoints; cancel/create flows.10☐ Not migrated
startup.featureApp boots when loading index.html into a browser.1☐ Not migrated
submit-blank.featureBlank create forms keep the submit button disabled.2☐ Not migrated
token-header.featureAPI requests send the Consul token header after a token is set.2☐ Not migrated