Skip to content

fix(e2e): establish the organisation baseline instead of inheriting it - #1509

Closed
rubenvdlinde wants to merge 1 commit into
developmentfrom
fix/organisation-step-establishes-its-baseline
Closed

rubenvdlinde wants to merge 1 commit into
developmentfrom
fix/organisation-step-establishes-its-baseline

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

fix(e2e): establish the organisation baseline instead of inheriting it

development has been red on this one test since the ADR-111 demo-data
step landed (304 passed, 1 failed).

The test asserts a FLIP: organisation.done goes false -> true when the
details are saved. It read the "false" end off whatever the instance
happened to hold:

const before = await api(page, 'GET', `${APP}/api/setup/status`)
expect(before.json?.steps?.organisation?.done).toBe(false)

That is no longer empty. The demo-data setup step seeds an organisation,
so on any instance where demo data ran, receipt_company_name is already
set and the step is already done — expected false, received true.

Clearing the three keys first costs one request and makes the flip
attributable to this test rather than to which specs happened to run
before it. The finally block already restores them, so the test remains
a no-op for its neighbours.

The precondition also gains a message. Expected: false / Received: true
on a bare boolean says nothing about which of the two possible causes it
is — the step not resetting, or the save not landing.

Supersedes #1503, which fixed the same failure by seeding the value the
test then asserted was absent; that inverts the flip rather than
establishing it, and the PR went stale and conflicted.

`development` has been red on this one test since the ADR-111 demo-data
step landed (304 passed, 1 failed).

The test asserts a FLIP: organisation.done goes false -> true when the
details are saved. It read the "false" end off whatever the instance
happened to hold:

    const before = await api(page, 'GET', `${APP}/api/setup/status`)
    expect(before.json?.steps?.organisation?.done).toBe(false)

That is no longer empty. The `demo-data` setup step seeds an organisation,
so on any instance where demo data ran, `receipt_company_name` is already
set and the step is already done — expected false, received true.

Clearing the three keys first costs one request and makes the flip
attributable to this test rather than to which specs happened to run
before it. The `finally` block already restores them, so the test remains
a no-op for its neighbours.

The precondition also gains a message. `Expected: false / Received: true`
on a bare boolean says nothing about which of the two possible causes it
is — the step not resetting, or the save not landing.

Supersedes #1503, which fixed the same failure by seeding the value the
test then asserted was absent; that inverts the flip rather than
establishing it, and the PR went stale and conflicted.
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/pipelinq @ d0ebe7a

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
check-manifest
check-vue-demi
test-l10n
format
check-schema-l10n
check-l10n-js
composer ✅ 106/106
npm ✅ 645/645
app:check-code ⏭️
info.xml
REUSE
PHPUnit
Newman
Playwright 🚨 NO VERDICT — enabled but never ran
Hydra gates

Quality workflow — 2026-08-28 18:51 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde

Copy link
Copy Markdown
Contributor Author

Superseded — development already carries this fix.

Merging development in produced two conflicts, both purely cosmetic: the
code is character-for-character the same fix (clear the three
receipt_company_* keys, then assert organisation.done === false with a
message), and only the surrounding comment and the assertion wording differ.

Development's version:

// Precondition: unset, so the flip below is caused by this test.
//
// ESTABLISHED, not asserted. ... Since the demo-data step began seeding on
// install, `receipt_company_name` is populated before this spec runs ...
await api(page, 'POST', `${APP}/api/setup/config`, { receipt_company_name: '', ... })

Same diagnosis, same remedy, landed independently while this was open.
Closing rather than pushing a merge whose only content is a reworded
comment — that would churn development and re-run the full matrix for no
behavioural change.

The E2E failure this was opened for is therefore already addressed on
development; nothing here is lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant