[stable32] test: multi signer e2e#7116
Merged
vitormattos merged 18 commits intostable32from Mar 5, 2026
Merged
Conversation
Upload PDF, add two email signers (signer01 and signer02), confirm the 'Sign in order' switch is visible and unchecked by default, send the request and verify via mailpit that both signers receive their notification email simultaneously, confirming parallel mode. Signed-off-by: Vitor Mattos <[email protected]>
Upload PDF, add two email signers, enable 'Sign in order' switch, send the request and verify via mailpit that only signer01 receives an email immediately (signer02 is still in Draft). Then signer01 signs via the email link and the test verifies that signer02 now receives their notification, confirming sequential mode. Signed-off-by: Vitor Mattos <[email protected]>
vuedraggable 4 (Vue 3) removed the default slot in favour of a named
#item slot. Using the old <transition-group> default-slot pattern causes
computeNodes() to throw "draggable element must have an item slot",
leaving componentStructure undefined and crashing the updated() hook.
Changes:
- add item-key="identify" (required by vuedraggable 4)
- replace <transition-group> default slot with <template #item="{ element, index }">
- remove orphaned .signer-list CSS transition classes (no longer used)
Signed-off-by: Vitor Mattos <[email protected]>
The draggable stub must render the #item named slot (not the default slot) to match vuedraggable 4's internal contract. Without this the stub never renders any Signer children, making all rendering assertions pass vacuously. - Replace template '<div><slot /></div>' with a loop over modelValue that yields '<slot name="item" :element :index />' per entry - Add itemKey to accepted props (vuedraggable 4 requires it) - Remove transition-group stub (no longer used in Signers.vue) Signed-off-by: Vitor Mattos <[email protected]>
…signingOrder The API returns signingOrder: 1 as the default for every signer. When the user enables "Sign in order", onPreserveOrderChange() checked Because git log -p === false, every signer was skipped and all remained at order 1, causing the backend to notify all signers simultaneously instead of sequentially. Fix: detect duplicate orders with a Set comparison and force re-assignment when duplicates are found. Signed-off-by: Vitor Mattos <[email protected]>
Covers the case where all signers arrive from the API with signingOrder: 1 (the backend default). Enabling sequential mode must reassign unique sequential orders to each signer. Signed-off-by: Vitor Mattos <[email protected]>
The previous condition only checked for a mismatch when the user had a non-empty email address. Users without an email (e.g. the admin) would silently pass through, letting the page load with nodeId: 0 and showing the generic "Document not found" error. Invert the guard: allow only when email matches, otherwise throw with a clear message asking the user to log out. Also improves the error message from the generic "Invalid user" to "This document is not yours. Log out and use the sign link again." Signed-off-by: Vitor Mattos <[email protected]>
…DifferentAccount Six cases covering all branches of the guard: - not authenticated → pass - authenticated email matches signer email → pass - authenticated user has no email set → throw - authenticated user has different email → throw - wrong email but token in progress (code set, not yet identified) → pass - wrong email and token already used (identified) → throw Signed-off-by: Vitor Mattos <[email protected]>
- Remove tab clicks: with only one method (email) enabled the tab bar
is not rendered; clicking by role='tab' would hang or fail
- Add .click() before .fill() on the Email placeholder to trigger
the Vue autocomplete event
- Replace getByRole('switch') with getByLabel(): NcCheckboxRadioSwitch
renders as <input type="checkbox">, not role="switch" (upstream bug)
Signed-off-by: Vitor Mattos <[email protected]>
…r test Selector fixes (same as parallel test): - Remove tab clicks, add .click() before .fill(), use getByLabel() for the switch state and getByText() to toggle it (input is hidden by CSS) Logout before sign link: - The email sign link is for an unauthenticated flow; accessing it while the admin session is active triggers the new backend error. Log out via Settings menu before navigating to avoid this. Validation page assertions: - After signer01 signs, assert the validation page shows both signers, with signer02 still in 'Not signed yet' state, proving the sequential flow held at that point. Signed-off-by: Vitor Mattos <[email protected]>
…slators
Using a generic {name} placeholder gives translators no context about
what the variable represents. Rename it to {signerName} so it is
immediately clear that the value is the signer's display name, email,
or "Unknown" if no identification is available.
Also improve the TRANSLATORS comments to reference {signerName}.
Signed-off-by: Vitor Mattos <[email protected]>
Replace five individual 'it' blocks that each set up a wrapper and assert the same computed property with a single it.each table. Each row is self-describing via the 'description' field shown in the test name ($description). The reactive toggle test is kept separate because it involves sequential state changes. Signed-off-by: Vitor Mattos <[email protected]>
…signing After signer01 signs and the validation page loads: - Click 'Expand details of Signer 01' (verifies the new accessible label) - Expand validation status and assert 'Document integrity verified' link - Expand document certification and assert 'Document has not been' link Signed-off-by: Vitor Mattos <[email protected]>
Signed-off-by: Vitor Mattos <[email protected]>
Signed-off-by: Vitor Mattos <[email protected]>
fill() sets the value atomically without firing real keyboard events, so NcSelect's @search handler (driven by vue-select's input event) doesn't trigger reliably in CI where the component may still be mounting. pressSequentially() types character by character, firing actual keyboard events that vue-select observes consistently. Also removes the workaround that waited for the form to close before opening the second dialog, which was masking the same root cause. Signed-off-by: Vitor Mattos <[email protected]>
Without a delay, keystrokes are dispatched in microseconds and vue-select may batch the input events, causing the @search handler to not fire reliably before the debounce timeout. Adding delay:50 spaces out the keystrokes so each event propagates through the Vue reactivity system before the next one arrives. Signed-off-by: Vitor Mattos <[email protected]>
…rker errors defineAsyncComponent triggers internal Vite dev-server fetch requests when the component is registered. When the vitest worker closes after all tests finish, those fetches are still pending, producing 13 'Closing rpc while fetch was pending' unhandled rejections. Mocking the three async component modules prevents the dynamic imports from ever being initiated during the test run. Signed-off-by: Vitor Mattos <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of PR #7060