Skip to content

CLARIN-DSpace v9/Port #1292 (CLARIN licence-section status icon e2e step) to the v9 base - #1497

Merged
milanmajchrak merged 1 commit into
dtq-dev-9-basefrom
ufal/port-1292-9-base
Sep 9, 2026
Merged

CLARIN-DSpace v9/Port #1292 (CLARIN licence-section status icon e2e step) to the v9 base#1497
milanmajchrak merged 1 commit into
dtq-dev-9-basefrom
ufal/port-1292-9-base

Conversation

@milanmajchrak

Copy link
Copy Markdown
Collaborator

What

Card PB-08 (tranche T3) — the CLARIN licence-section status icon step, adapted from the fork's
submission-ui.cy.ts into the v9 submission.cy.ts. Source: 0645e7e9d9 (dtq-dev PR #1292).

Why this is e2e only

The spec half of #1292 is already present on the base: PR #1396 (card FE-25) brought it under a different
test name and stub, and the six differing lines are that PR's deliberate supersede. All five required
assertions are intact, so this branch carries only the e2e work.

The conditional, and why it is required

Decision D-03 records that this step must be adapted conditionally, because CI e2e runs against the vanilla
backend image dspace/dspace:dspace-9_x-test, which ships no clarin-license submission step. The block is:

cy.get('body').then((body) => {
  if (body.find('div[id="section_clarin-license"]').length === 0) { cy.log(...); return; }
   four assertions 
});

section_clarin-license renders only when the backend ships that step, so on CI the block logs and returns.
Against a CLARIN backend all four assertions run: header visible, no warning icon, no danger icon,
.fa-check-circle.text-success within 15 s. cy.wait(1000) and { timeout: 15000 } are carried over verbatim.
It sits in the first test, which uploads no file — the fork's own precondition.

Testing

npm run lint:nobuild -- --quiet     All files pass linting.        exit 0
npx madge (check-circ-deps)         ✔ No circular dependency found!
npm run test:headless -- --include=…  TOTAL: 2 SUCCESS
npm run build:prod                  exit 0; 8 hits = 4 NG8113 warnings counted per bundle, 0 errors

Guards: X6 clarin*.spec.ts count 5 on the base and 5 on this head, and 0 removed cy./expect(
lines under cypress/. X5b no i18n file touched. X1 runtime hunk-level parity 0 gaps.

Note for the reviewer

An out-of-scope gap surfaced while doing this: four fork-only cypress files never reached the v9 base —
submission-ui.cy.ts (8 it()), tombstone.cy.ts (8), admin-menu.cy.ts (1), handle-page.cy.ts (1).
This restores one behaviour out of the first; the remaining 17 have no card. All target CLARIN behaviour, so
any restoration needs the same conditional treatment. Recorded for the X-04 / PB-10 sweep.

Source: 0645e7e9d9 (dtq-dev PR #1292) · card PB-08.

🤖 Generated with Claude Code

…om sections.license

TESTS-ONLY completion of the #1292 port. The runtime hunk (the CLARIN license
section PATCHes /sections/clarin-license/select instead of sections.license)
arrived with the v9 squash, and the karma spec that pins the PATCH path arrived
with #1396 (card FE-25) - section-license.component.spec.ts already asserts
body[0].path === '/sections/clarin-license/select'. Nothing to add there.

What was still missing is the e2e half. #1292 also hardened
cypress/e2e/submission-ui.cy.ts so that the CLARIN licence section's card
header is asserted to carry the green status icon (.fa-check-circle.text-success,
15 s timeout) when no file has been uploaded. That file does not exist on the v9
base - the fork's submission-ui.cy.ts was replaced by the vanilla
submission.cy.ts - so the step is adapted into submission.cy.ts instead.

v9 notes:
- The step is conditional on div[id="section_clarin-license"] existing (decision
  D-03). CI e2e runs against a vanilla backend image, which does not ship the
  clarin-license submission step, so an unconditional step would fail there. On a
  CLARIN backend the section is present and the assertions run.
- It is placed in the first test ("should create a new submission when using
  /submit path"), which uploads no file - the same precondition as the fork's
  "should not show validation warnings when no file is uploaded (metadata-only)"
  test the hunk came from.
- The fork's cy.wait(1000) settle and the 15 s retry timeout are kept verbatim.
- No cy./expect() step is removed or weakened (guard X6).

Card PB-08 (tranche T3).

Source: 0645e7e (dtq-dev PR #1292)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@milanmajchrak
milanmajchrak merged commit 5f16046 into dtq-dev-9-base Sep 9, 2026
9 checks passed
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