https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43430

--- Comment #4 from Paul Derscheid <[email protected]> ---
Created attachment 208900
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208900&action=edit
Bug 43430: (QA follow-up) Refine advanced editor tests

- The suite and per-test hooks both logged in. Keep browser setup in
  beforeEach so each case establishes its own session. Check login
  before creating bibliographic fixtures so authentication errors are
  reported at login instead of a later API request.
- Modifying stored MARC XML with SQL depends on its serialization and
  bypasses normal record handling. Create the missing, blank, and
  populated 008 cases in the API payload instead. Read each record back
  so a field dropped during fixture creation cannot be mistaken for
  successful editor behavior.
- Require the documented HTTP 200 JSON response and a valid record ID,
  rather than accepting redirects or guessing an ID from other response
  shapes. Read original preferences through the existing API as well,
  avoiding another direct database query.
- A value returned from then() is a snapshot: retrying an assertion on
  it does not read CodeMirror again. Read and assert field values inside
  should() so retries observe the current editor contents.
- Restore preferences before deleting fixtures so a deletion failure
  does not prevent restoration of the shared settings.
- Retain scoped, parameterized SQL for framework setup and cleanup,
  since framework configuration has no REST CRUD routes.

Test plan:
1. Run:
   yarn cypress run \
     --spec t/cypress/integration/AdvancedEditorMissing008_spec.ts
2. Confirm all five tests pass.

Assisted-by: GPT-6.1-sol (OpenAI)
Signed-off-by: Paul Derscheid <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to